summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py41
1 files changed, 39 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index 9b4144dfde..e0e3eaecb7 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -29,9 +29,16 @@ class Mpich(AutotoolsPackage):
version('3.0.4', '9c5d5d4fe1e17dd12153f40bc5b6dbc0')
variant('hydra', default=True, description='Build the hydra process manager')
- variant('pmi', default=True, description='Build with PMI support')
variant('romio', default=True, description='Enable ROMIO MPI I/O implementation')
variant('verbs', default=False, description='Build support for OpenFabrics verbs.')
+ variant('slurm', default=False, description='Enable SLURM support')
+ variant(
+ 'pmi',
+ default='pmi',
+ description='''PMI interface.''',
+ values=('off', 'pmi', 'pmi2', 'pmix'),
+ multi=False
+ )
variant(
'device',
default='ch3',
@@ -65,15 +72,31 @@ spack package at this time.''',
patch('mpich32_clang.patch', when='@3.2:3.2.0%clang')
depends_on('findutils', type='build')
+ depends_on('pkgconfig', type='build')
depends_on('libfabric', when='netmod=ofi')
+ depends_on('libpciaccess')
+ depends_on('libxml2')
+
+ # Starting with version 3.3, Hydra can use libslurm for nodelist parsing
+ depends_on('slurm', when='+slurm')
+
+ depends_on('pmix', when='pmi=pmix')
+
conflicts('device=ch4', when='@:3.2')
conflicts('netmod=ofi', when='@:3.1.4')
conflicts('netmod=ucx', when='device=ch3')
conflicts('netmod=mxm', when='device=ch4')
conflicts('netmod=mxm', when='@:3.1.3')
conflicts('netmod=tcp', when='device=ch4')
+ conflicts('pmi=pmi2', when='device=ch3 netmod=ofi')
+ conflicts('pmi=pmix', when='device=ch3')
+
+ def setup_environment(self, spack_env, run_env):
+ # mpich configure fails when F90 and F90FLAGS are set
+ spack_env.unset('F90')
+ spack_env.unset('F90FLAGS')
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
# On Cray, the regular compiler wrappers *are* the MPI wrappers.
@@ -135,11 +158,19 @@ spack package at this time.''',
config_args = [
'--enable-shared',
'--with-pm={0}'.format('hydra' if '+hydra' in spec else 'no'),
- '--with-pmi={0}'.format('yes' if '+pmi' in spec else 'no'),
'--{0}-romio'.format('enable' if '+romio' in spec else 'disable'),
'--{0}-ibverbs'.format('with' if '+verbs' in spec else 'without')
]
+ if 'pmi=off' in spec:
+ config_args.append('--with-pmi=no')
+ elif 'pmi=pmi' in spec:
+ config_args.append('--with-pmi=simple')
+ elif 'pmi=pmi2' in spec:
+ config_args.append('--with-pmi=pmi2/simple')
+ elif 'pmi=pmix' in spec:
+ config_args.append('--with-pmix={0}'.format(spec['pmix'].prefix))
+
# setup device configuration
device_config = ''
if 'device=ch4' in spec:
@@ -158,4 +189,10 @@ spack package at this time.''',
config_args.append(device_config)
+ # Specify libfabric's path explicitly, otherwise configure might fall
+ # back to an embedded version of libfabric.
+ if 'netmod=ofi' in spec:
+ config_args.append('--with-libfabric={0}'.format(
+ spec['libfabric'].prefix))
+
return config_args