diff --git a/easybuild/easyblocks/s/scotch.py b/easybuild/easyblocks/s/scotch.py index af90de8144b..f6bbd23c327 100644 --- a/easybuild/easyblocks/s/scotch.py +++ b/easybuild/easyblocks/s/scotch.py @@ -40,6 +40,7 @@ import easybuild.tools.toolchain as toolchain from easybuild.framework.easyblock import EasyBlock +from easybuild.framework.easyconfig import CUSTOM from easybuild.tools.build_log import EasyBuildError from easybuild.tools.filetools import copytree from easybuild.tools.run import run_cmd @@ -48,6 +49,14 @@ class EB_SCOTCH(EasyBlock): """Support for building/installing SCOTCH.""" + @staticmethod + def extra_options(extra_vars=None): + """Define custom easyconfig parameters specific to Scotch.""" + extra_vars = { + 'threadedmpi': [None, "Use threaded MPI calls.", CUSTOM], + } + return EasyBlock.extra_options(extra_vars) + def configure_step(self): """Configure SCOTCH build: locate the template makefile, copy it to a general Makefile.inc and patch it.""" @@ -108,9 +117,12 @@ def build_step(self): if self.toolchain.options['i8']: cflags += " -DINTSIZE64" - if not self.toolchain.mpi_family() in [toolchain.INTELMPI, toolchain.QLOGICMPI]: #@UndefinedVariable + if self.cfg['threadedmpi']: cflags += " -DSCOTCH_PTHREAD" - + #TODO For backwards compatability of v2.8.0 the following is necessary but could be removed on a major version upgrade + if self.cfg['threadedmpi'] is None and self.toolchain.mpi_family() not in [toolchain.INTELMPI, toolchain.QLOGICMPI]: + cflags += " -DSCOTCH_PTHREAD" + # actually build apps = ['scotch', 'ptscotch'] if LooseVersion(self.version) >= LooseVersion('6.0'):