summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2019-05-20 19:52:17 -0500
committerPeter Scheibel <scheibel1@llnl.gov>2019-05-20 17:52:17 -0700
commitd1ea5ba2cdd7cb30f7b635a40dd3cc204f6307e7 (patch)
tree3766490dfcc41a3480538e24af19e8fa969533b6 /var
parente2065fad726a7b41e7fd4465c322b585b2aaa7f1 (diff)
downloadspack-d1ea5ba2cdd7cb30f7b635a40dd3cc204f6307e7.tar.gz
spack-d1ea5ba2cdd7cb30f7b635a40dd3cc204f6307e7.tar.bz2
spack-d1ea5ba2cdd7cb30f7b635a40dd3cc204f6307e7.tar.xz
spack-d1ea5ba2cdd7cb30f7b635a40dd3cc204f6307e7.zip
OpenMPI: update behavior for fabrics/schedulers=auto (#11431)
* When fabrics=auto or schedulers=auto, the intent is to defer to the OpenMPI configure and let it determine and use what it finds available on the system. The current behavior for 'with_or_without' in the case of 'auto' explicitly disables all possible values. This updates the logic to call 'with_or_without' only when the value of fabrics/schedulers is not 'auto'. * To allow explicitly disabling all fabrics/schedulers, each of these variants has added support for 'none' (which is also the default value). * Add a conflict for the loadleveler scheduler for openmpi-3 and above as it is no longer a valid configure option.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py29
1 files changed, 19 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index dadc4b51de..87a7203b07 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -185,18 +185,22 @@ class Openmpi(AutotoolsPackage):
patch('btl_vader.patch', when='@3.0.1:3.0.2')
patch('btl_vader.patch', when='@3.1.0:3.1.2')
- fabrics = ('psm', 'psm2', 'verbs', 'mxm', 'ucx', 'libfabric')
variant(
- 'fabrics', values=auto_or_any_combination_of(*fabrics).with_default(
- 'auto' if _verbs_dir() is None else 'verbs'
- ),
- description="List of fabrics that are enabled",
+ 'fabrics',
+ values=disjoint_sets(
+ ('auto',), ('psm', 'psm2', 'verbs', 'mxm', 'ucx', 'libfabric')
+ ).with_non_feature_values('auto', 'none'),
+ description="List of fabrics that are enabled; "
+ "'auto' lets openmpi determine",
)
- schedulers = ('alps', 'lsf', 'tm', 'slurm', 'sge', 'loadleveler')
variant(
- 'schedulers', values=auto_or_any_combination_of(*schedulers),
- description='List of schedulers for which support is enabled'
+ 'schedulers',
+ values=disjoint_sets(
+ ('auto',), ('alps', 'lsf', 'tm', 'slurm', 'sge', 'loadleveler')
+ ).with_non_feature_values('auto', 'none'),
+ description="List of schedulers for which support is enabled; "
+ "'auto' lets openmpi determine",
)
# Additional support options
@@ -263,6 +267,9 @@ class Openmpi(AutotoolsPackage):
conflicts('+pmi', when='@:1.5.4') # PMI support was added in 1.5.5
conflicts('schedulers=slurm ~pmi', when='@1.5.4:',
msg='+pmi is required for openmpi(>=1.5.5) to work with SLURM.')
+ conflicts('schedulers=loadleveler', when='@3.0.0:',
+ msg='The loadleveler scheduler is not supported with '
+ 'openmpi(>=3.0.0).')
filter_compiler_wrappers('openmpi/*-wrapper-data*', relative_root='share')
conflicts('fabrics=libfabric', when='@:1.8') # libfabric support was added in 1.10.0
@@ -397,9 +404,11 @@ class Openmpi(AutotoolsPackage):
config_args.append('--enable-mpi1-compatibility')
# Fabrics
- config_args.extend(self.with_or_without('fabrics'))
+ if 'fabrics=auto' not in spec:
+ config_args.extend(self.with_or_without('fabrics'))
# Schedulers
- config_args.extend(self.with_or_without('schedulers'))
+ if 'schedulers=auto' not in spec:
+ config_args.extend(self.with_or_without('schedulers'))
config_args.extend(self.enable_or_disable('memchecker'))
if spec.satisfies('+memchecker', strict=True):