Skip to content
Snippets Groups Projects
gpi_2.py 945 B
Newer Older
  • Learn to ignore specific revisions
  • Easy Build's avatar
    Easy Build committed
    #!/usr/bin/env python
    #
    #  Copyright (C) 2015 IT4Innovations
    #  Lumir Jasiok
    #  lumir.jasiok@vsb.cz
    #  http://www.it4i.cz
    #
    #
    #
    
    """
    EasyBuild support for building and installing GPI-2,
    implemented as an easyblock.
    
    @author: Lumir Jasiok (IT4 Innovations)
    """
    
    from easybuild.framework.easyblock import EasyBlock
    from easybuild.tools.run import run_cmd
    
    
    class EB_GPI_minus_2(EasyBlock):
        """Support for building and installing GPI-2."""
    
        def build_step(self):
            """Simply run install.sh skript with installdir path"""
            # Do we have enabled MPI support?
            if self.toolchain.options.get('usempi', None):
                self.log.info("Build with MPI support")
                cmd = "./install.sh -p %s --with-mpi=$EBROOTOPENMPI" \
                      % self.installdir
            else:
                self.log.info("Build without MPI support")
                cmd = "./install.sh -p %s" % self.installdir
            run_cmd(cmd, log_all=True)