Exemple #1
0
    def configure(self):
        """Configure build: set require config and make options, and run configure script."""

        # configure options
        deps = ["Szip", "zlib"]
        for dep in deps:
            root = get_software_root(dep)
            if root:
                self.updatecfg('configopts', '--with-%s=%s' % (dep.lower(), root))
            else:
                self.log.error("Dependency module %s not loaded." % dep)

        fcomp = 'FC="%s"' % os.getenv('F77')

        self.updatecfg('configopts', "--with-pic --with-pthread --enable-shared")
        self.updatecfg('configopts', "--enable-cxx --enable-fortran %s" % fcomp)

        # MPI and C++ support enabled requires --enable-unsupported, because this is untested by HDF5
        if self.toolkit().opts['usempi']:
            self.updatecfg('configopts', "--enable-unsupported")

        # make options
        self.updatecfg('makeopts', fcomp)

        Application.configure(self)
Exemple #2
0
    def configure(self):
        """Configure build: <single-line description how this deviates from standard configure>"""

        # set generic make options
        self.updatecfg('makeopts', 'CC="%s" OPTFLAGS="%s"' % (os.getenv('MPICC'), os.getenv('CFLAGS')))

        if LooseVersion(self.version()) >= LooseVersion("3.2"):

            # set correct startfrom dir, and change into it
            self.setcfg('startfrom', os.path.join(self.getcfg('startfrom'),'src'))
            try:
                os.chdir(self.getcfg('startfrom'))
            except OSError, err:
                self.log.error("Failed to change to correct source dir %s: %s" % (self.getcfg('startfrom'), err))

            # run autoconf to generate configure script
            cmd = "autoconf"
            run_cmd(cmd)

            # set config opts
            beagle = get_software_root('BEAGLE')
            if beagle:
                self.updatecfg('configopts', '--with-beagle=%s' % beagle)
            else:
                self.log.error("BEAGLE module not loaded?")

            if self.toolkit().opts['usempi']:
                self.updatecfg('configopts', '--enable-mpi')

            # configure
            Application.configure(self)
Exemple #3
0
    def configure(self):

        # things might go wrong if a previous install dir is present, so let's get rid of it
        if not self.getcfg('keeppreviousinstall'):
            self.log.info("Making sure any old installation is removed before we start the build...")
            Application.make_dir(self, self.installdir, True, dontcreateinstalldir=True)

        # additional configuration options
        add_configopts = '--with-rdma=%s ' % self.getcfg('rdma_type')

        # use POSIX threads
        add_configopts += '--with-thread-package=pthreads '

        if self.getcfg('debug'):
            # debug build, with error checking, timing and debug info
            # note: this will affact performance
            add_configopts += '--enable-fast=none '
        else:
            # optimized build, no error checking, timing or debug info
            add_configopts += '--enable-fast '

        # enable shared libraries, using GCC and GNU ld options
        add_configopts += '--enable-shared --enable-sharedlibs=gcc '

        # enable Fortran 77/90 and C++ bindings
        add_configopts += '--enable-f77 --enable-fc --enable-cxx '

        # MVAPICH configure script complains when F90 or F90FLAGS are set,
        # they should be replaced with FC/FCFLAGS instead
        for (envvar, new_envvar) in [("F90", "FC"), ("F90FLAGS", "FCFLAGS")]:
            envvar_val = os.getenv(envvar)
            if envvar_val:
                if not os.getenv(new_envvar):
                    env.set(new_envvar, envvar_val)
                    env.set(envvar, '')
                else:
                    self.log.error("Both %(ev)s and %(nev)s set, can I overwrite %(nev)s with %(ev)s (%(evv)s) ?" %
                                     {
                                      'ev': envvar,
                                      'nev': new_envvar,
                                      'evv': envvar_val
                                     })

        # enable specific support options (if desired)
        if self.getcfg('withmpe'):
            add_configopts += '--enable-mpe '
        if self.getcfg('withlimic2'):
            add_configopts += '--enable-limic2 '
        if self.getcfg('withchkpt'):
            add_configopts += '--enable-checkpointing --with-hydra-ckpointlib=blcr '

        self.updatecfg('configopts', add_configopts)

        Application.configure(self)
Exemple #4
0
    def configure(self):
        """Configure build: set config options and configure"""

        if self.toolkit().opts['pic']:
            self.updatecfg('configopts', "--with-pic")

        self.updatecfg('configopts', 'FCFLAGS="%s" FC="%s"' % (os.getenv('FFLAGS'), os.getenv('F90')))

        # add -DgFortran to CPPFLAGS when building with GCC
        if self.toolkit().comp_family() == toolkit.GCC:
            env.set('CPPFLAGS', "%s -DgFortran" % os.getenv('CPPFLAGS'))

        Application.configure(self)