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.
This commit is contained in:
Glenn Johnson 2019-05-20 19:52:17 -05:00 committed by Peter Scheibel
parent e2065fad72
commit d1ea5ba2cd

View File

@ -185,18 +185,22 @@ class Openmpi(AutotoolsPackage):
patch('btl_vader.patch', when='@3.0.1:3.0.2') patch('btl_vader.patch', when='@3.0.1:3.0.2')
patch('btl_vader.patch', when='@3.1.0:3.1.2') patch('btl_vader.patch', when='@3.1.0:3.1.2')
fabrics = ('psm', 'psm2', 'verbs', 'mxm', 'ucx', 'libfabric')
variant( variant(
'fabrics', values=auto_or_any_combination_of(*fabrics).with_default( 'fabrics',
'auto' if _verbs_dir() is None else 'verbs' values=disjoint_sets(
), ('auto',), ('psm', 'psm2', 'verbs', 'mxm', 'ucx', 'libfabric')
description="List of fabrics that are enabled", ).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( variant(
'schedulers', values=auto_or_any_combination_of(*schedulers), 'schedulers',
description='List of schedulers for which support is enabled' 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 # 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('+pmi', when='@:1.5.4') # PMI support was added in 1.5.5
conflicts('schedulers=slurm ~pmi', when='@1.5.4:', conflicts('schedulers=slurm ~pmi', when='@1.5.4:',
msg='+pmi is required for openmpi(>=1.5.5) to work with SLURM.') 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') filter_compiler_wrappers('openmpi/*-wrapper-data*', relative_root='share')
conflicts('fabrics=libfabric', when='@:1.8') # libfabric support was added in 1.10.0 conflicts('fabrics=libfabric', when='@:1.8') # libfabric support was added in 1.10.0
@ -397,9 +404,11 @@ def configure_args(self):
config_args.append('--enable-mpi1-compatibility') config_args.append('--enable-mpi1-compatibility')
# Fabrics # Fabrics
config_args.extend(self.with_or_without('fabrics')) if 'fabrics=auto' not in spec:
config_args.extend(self.with_or_without('fabrics'))
# Schedulers # 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')) config_args.extend(self.enable_or_disable('memchecker'))
if spec.satisfies('+memchecker', strict=True): if spec.satisfies('+memchecker', strict=True):