summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kuhn <suraia@ikkoku.de>2019-02-27 20:13:44 +0100
committerPeter Scheibel <scheibel1@llnl.gov>2019-02-27 13:13:44 -0600
commitb1a04b7699c7b59f0f3ea5a688c7139e0e3ab370 (patch)
tree37568b3ddb54db85d556d1f8edc87b3722a1399d
parentab499a958d383df162a9e5ae048fb7e6de9806de (diff)
downloadspack-b1a04b7699c7b59f0f3ea5a688c7139e0e3ab370.tar.gz
spack-b1a04b7699c7b59f0f3ea5a688c7139e0e3ab370.tar.bz2
spack-b1a04b7699c7b59f0f3ea5a688c7139e0e3ab370.tar.xz
spack-b1a04b7699c7b59f0f3ea5a688c7139e0e3ab370.zip
mpich: Improve package (#10643)
- Add missing pkg-config, libpciaccess and libxml2 dependencies - Add slurm variant for nodelist parsing - Add missing configure flag for libfabric - Unset F90 and F90FLAGS - Allow selecting different PMI interfaces
-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