Skip to content

Commit

Permalink
Merge pull request #914 from ocaisa/scotch
Browse files Browse the repository at this point in the history
Make threading an explicit option rather than relying on the MPI impl…
  • Loading branch information
boegel committed May 13, 2016
2 parents af8386a + c954170 commit 62f636e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions easybuild/easyblocks/s/scotch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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."""

Expand Down Expand Up @@ -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'):
Expand Down

0 comments on commit 62f636e

Please sign in to comment.