parent
8ceac2ba9b
commit
ec02369dba
1 changed files with 19 additions and 44 deletions
|
@ -233,7 +233,6 @@ class Openmpi(AutotoolsPackage, CudaPackage):
|
||||||
variant('thread_multiple', default=False, when='@1.5.4:2',
|
variant('thread_multiple', default=False, when='@1.5.4:2',
|
||||||
description='Enable MPI_THREAD_MULTIPLE support')
|
description='Enable MPI_THREAD_MULTIPLE support')
|
||||||
variant('pmi', default=False, when='@1.5.5:4', description='Enable PMI support')
|
variant('pmi', default=False, when='@1.5.5:4', description='Enable PMI support')
|
||||||
variant('pmix', default=True, when='@2:4', description='Enable PMIx support')
|
|
||||||
variant('wrapper-rpath', default=True, when='@1.7.4:',
|
variant('wrapper-rpath', default=True, when='@1.7.4:',
|
||||||
description='Enable rpath support in the wrappers')
|
description='Enable rpath support in the wrappers')
|
||||||
variant('cxx', default=False, when='@:4',
|
variant('cxx', default=False, when='@:4',
|
||||||
|
@ -283,8 +282,6 @@ class Openmpi(AutotoolsPackage, CudaPackage):
|
||||||
depends_on('perl', type='build')
|
depends_on('perl', type='build')
|
||||||
depends_on('pkgconfig', type='build')
|
depends_on('pkgconfig', type='build')
|
||||||
|
|
||||||
depends_on('libevent@2:', when='@4:')
|
|
||||||
|
|
||||||
depends_on('hwloc@2:', when='@4: ~internal-hwloc')
|
depends_on('hwloc@2:', when='@4: ~internal-hwloc')
|
||||||
# ompi@:3.0.0 doesn't support newer hwloc releases:
|
# ompi@:3.0.0 doesn't support newer hwloc releases:
|
||||||
# "configure: error: OMPI does not currently support hwloc v2 API"
|
# "configure: error: OMPI does not currently support hwloc v2 API"
|
||||||
|
@ -321,14 +318,17 @@ class Openmpi(AutotoolsPackage, CudaPackage):
|
||||||
depends_on('lsf', when='schedulers=lsf')
|
depends_on('lsf', when='schedulers=lsf')
|
||||||
depends_on('pbs', when='schedulers=tm')
|
depends_on('pbs', when='schedulers=tm')
|
||||||
depends_on('slurm', when='schedulers=slurm')
|
depends_on('slurm', when='schedulers=slurm')
|
||||||
depends_on('libevent', when='+pmix')
|
|
||||||
|
|
||||||
# PMIx is unavailable for @1, an option for @2:4 and required for @5:
|
# PMIx is unavailable for @1, and required for @2:
|
||||||
# In @4, if it's not disabled (and PMI is not explicitly enabled), an
|
# OpenMPI @2: includes a vendored version:
|
||||||
# internal copy will be used instead
|
# depends_on('pmix@1.1.2', when='@2.1.6')
|
||||||
# Vendored version: depends_on('pmix@3.2.3', when='@4.1.2')
|
# depends_on('pmix@3.2.3', when='@4.1.2')
|
||||||
depends_on('pmix', when='+pmix')
|
depends_on('pmix@1.0:1', when='@2.0:2')
|
||||||
depends_on('pmix@3.2:', when='@4.0:4 +pmix')
|
depends_on('pmix@3.2:', when='@4.0:4')
|
||||||
|
depends_on('pmix@5:', when='@5.0:5')
|
||||||
|
|
||||||
|
# Libevent is required when *vendored* PMIx is used
|
||||||
|
depends_on('libevent@2:', when='@main')
|
||||||
|
|
||||||
depends_on('openssh', type='run', when='+rsh')
|
depends_on('openssh', type='run', when='+rsh')
|
||||||
|
|
||||||
|
@ -356,17 +356,12 @@ class Openmpi(AutotoolsPackage, CudaPackage):
|
||||||
# knem support was added in 1.5
|
# knem support was added in 1.5
|
||||||
conflicts('fabrics=knem', when='@:1.4')
|
conflicts('fabrics=knem', when='@:1.4')
|
||||||
|
|
||||||
conflicts('schedulers=slurm ~pmi', when='@1.5.4:2',
|
conflicts('schedulers=slurm ~pmi', when='@1.5.4',
|
||||||
msg='+pmi is required for openmpi to work with SLURM.')
|
msg='+pmi is required for openmpi to work with SLURM.')
|
||||||
conflicts('schedulers=slurm ~pmi ~pmix', when='@3:',
|
|
||||||
msg='+pmi or +pmix is required for openmpi to work with SLURM.')
|
|
||||||
conflicts('schedulers=loadleveler', when='@3:',
|
conflicts('schedulers=loadleveler', when='@3:',
|
||||||
msg='The loadleveler scheduler is not supported with '
|
msg='The loadleveler scheduler is not supported with '
|
||||||
'openmpi(>=3).')
|
'openmpi(>=3).')
|
||||||
|
|
||||||
# PMIx or PMI is required in OpenMPI 4
|
|
||||||
conflicts('~pmi', when='~pmix @4.0:4')
|
|
||||||
|
|
||||||
# According to this comment on github:
|
# According to this comment on github:
|
||||||
#
|
#
|
||||||
# https://github.com/open-mpi/ompi/issues/4338#issuecomment-383982008
|
# https://github.com/open-mpi/ompi/issues/4338#issuecomment-383982008
|
||||||
|
@ -497,13 +492,6 @@ def determine_variants(cls, exes, version):
|
||||||
else:
|
else:
|
||||||
variants.append('~pmi')
|
variants.append('~pmi')
|
||||||
|
|
||||||
# pmix
|
|
||||||
if version in spack.version.ver('2:4'):
|
|
||||||
if re.search(r'\bMCA pmix', output):
|
|
||||||
variants.append('+pmix')
|
|
||||||
else:
|
|
||||||
variants.append('~pmix')
|
|
||||||
|
|
||||||
# fabrics
|
# fabrics
|
||||||
fabrics = get_options_from_variant(cls, "fabrics")
|
fabrics = get_options_from_variant(cls, "fabrics")
|
||||||
used_fabrics = []
|
used_fabrics = []
|
||||||
|
@ -699,9 +687,6 @@ def configure_args(self):
|
||||||
|
|
||||||
config_args.extend(self.enable_or_disable('static'))
|
config_args.extend(self.enable_or_disable('static'))
|
||||||
|
|
||||||
if spec.satisfies('@3:'):
|
|
||||||
config_args.append('--with-zlib={0}'.format(spec['zlib'].prefix))
|
|
||||||
|
|
||||||
if spec.satisfies('@4.0.0:4.0.2'):
|
if spec.satisfies('@4.0.0:4.0.2'):
|
||||||
# uct btl doesn't work with some UCX versions so just disable
|
# uct btl doesn't work with some UCX versions so just disable
|
||||||
config_args.append('--enable-mca-no-build=btl-uct')
|
config_args.append('--enable-mca-no-build=btl-uct')
|
||||||
|
@ -734,34 +719,24 @@ def configure_args(self):
|
||||||
if spec.satisfies('+memchecker', strict=True):
|
if spec.satisfies('+memchecker', strict=True):
|
||||||
config_args.extend([
|
config_args.extend([
|
||||||
'--enable-debug',
|
'--enable-debug',
|
||||||
'--with-valgrind={0}'.format(spec['valgrind'].prefix),
|
|
||||||
])
|
])
|
||||||
|
|
||||||
# Singularity container support
|
# Package dependencies
|
||||||
if spec.satisfies('+singularity'):
|
for dep in ['libevent', 'lustre', 'pmix', 'singularity', 'valgrind',
|
||||||
singularity_opt = '--with-singularity={0}'.format(
|
'zlib']:
|
||||||
spec['singularity'].prefix)
|
if '^' + dep in spec:
|
||||||
config_args.append(singularity_opt)
|
config_args.append('--with-{0}={1}'.format(
|
||||||
# Lustre filesystem support
|
dep, spec[dep].prefix))
|
||||||
if spec.satisfies('+lustre'):
|
|
||||||
lustre_opt = '--with-lustre={0}'.format(spec['lustre'].prefix)
|
|
||||||
config_args.append(lustre_opt)
|
|
||||||
# External libevent/pmix
|
|
||||||
if spec.satisfies('@5:') or spec.satisfies('+pmix'):
|
|
||||||
config_args.append('--with-pmix={0}'.format(spec['pmix'].prefix))
|
|
||||||
config_args.append('--with-libevent={0}'.format(spec['libevent'].prefix))
|
|
||||||
elif spec.satisfies('~pmix'):
|
|
||||||
config_args.append('--without-pmix')
|
|
||||||
|
|
||||||
# Hwloc support
|
# Hwloc support
|
||||||
if '^hwloc' in spec:
|
if '^hwloc' in spec:
|
||||||
config_args.append('--with-hwloc={0}'.format(spec['hwloc'].prefix))
|
config_args.append('--with-hwloc=' + spec['hwloc'].prefix)
|
||||||
# Java support
|
# Java support
|
||||||
if '+java' in spec:
|
if '+java' in spec:
|
||||||
config_args.extend([
|
config_args.extend([
|
||||||
'--enable-java',
|
'--enable-java',
|
||||||
'--enable-mpi-java',
|
'--enable-mpi-java',
|
||||||
'--with-jdk-dir={0}'.format(spec['java'].home)
|
'--with-jdk-dir=' + spec['java'].home
|
||||||
])
|
])
|
||||||
elif spec.satisfies('@1.7.4:'):
|
elif spec.satisfies('@1.7.4:'):
|
||||||
config_args.extend([
|
config_args.extend([
|
||||||
|
|
Loading…
Reference in a new issue