summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Pritchard <howardp@lanl.gov>2021-02-20 01:52:34 -0700
committerGitHub <noreply@github.com>2021-02-20 09:52:34 +0100
commit4bd8cd1916f1c9961bc069d922989318683961a3 (patch)
treecb165038d433930c94c82f909db49252f37fece7
parentaa01123bbae9c747d4f76c7251a6609762a0cfb2 (diff)
downloadspack-4bd8cd1916f1c9961bc069d922989318683961a3.tar.gz
spack-4bd8cd1916f1c9961bc069d922989318683961a3.tar.bz2
spack-4bd8cd1916f1c9961bc069d922989318683961a3.tar.xz
spack-4bd8cd1916f1c9961bc069d922989318683961a3.zip
openmpi: add variant for using internal hwloc (#19109)
It turns out there are certain cases where having Open MPI use an external hwloc messes up other applications that also rely on hwloc, but a different version. Signed-off-by: Howard Pritchard <howardp@lanl.gov>
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index 4984a28926..cf1e72b214 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -249,6 +249,8 @@ class Openmpi(AutotoolsPackage):
default=False,
description='Do not remove mpirun/mpiexec when building with slurm'
)
+ # Variants to use internal packages
+ variant('internal-hwloc', default=False, description='Use internal hwloc')
provides('mpi')
provides('mpi@:2.2', when='@1.6.5')
@@ -268,14 +270,14 @@ class Openmpi(AutotoolsPackage):
depends_on('libevent@2.0:', when='@4:')
- depends_on('hwloc@2.0:', when='@4:')
+ depends_on('hwloc@2.0:', when='@4: ~internal-hwloc')
# ompi@:3.0.0 doesn't support newer hwloc releases:
# "configure: error: OMPI does not currently support hwloc v2 API"
# Future ompi releases may support it, needs to be verified.
# See #7483 for context.
- depends_on('hwloc@:1.999', when='@:3.999.9999')
+ depends_on('hwloc@:1.999', when='@:3.999.999 ~internal-hwloc')
- depends_on('hwloc +cuda', when='+cuda')
+ depends_on('hwloc +cuda', when='+cuda ~internal-hwloc')
depends_on('java', when='+java')
depends_on('sqlite', when='+sqlite3@:1.11')
depends_on('zlib', when='@3.0.0:')
@@ -683,7 +685,7 @@ class Openmpi(AutotoolsPackage):
if spec.satisfies('@4.0.0:'):
config_args.append('--with-libevent={0}'.format(spec['libevent'].prefix))
# Hwloc support
- if spec.satisfies('@1.5.2:'):
+ if '~internal-hwloc' in spec and spec.satisfies('@1.5.2:'):
config_args.append('--with-hwloc={0}'.format(spec['hwloc'].prefix))
# Java support
if spec.satisfies('@1.7.4:'):