From a57f56c5b927001deb02d295ed5c46b047757a4e Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Tue, 6 Apr 2021 03:40:33 -0400 Subject: [PATCH] openmpi: allow to build with ^slurm ~pmi for >3.0.0 with PMIx (#22086) --- var/spack/repos/builtin/packages/openmpi/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 1b664ac88c..e529760b26 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -337,7 +337,7 @@ class Openmpi(AutotoolsPackage): # knem support was added in 1.5 conflicts('fabrics=knem', when='@:1.4') - conflicts('schedulers=slurm ~pmi', when='@1.5.4:', + conflicts('schedulers=slurm ~pmi', when='@1.5.4:2.999.999', 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 ' @@ -631,7 +631,11 @@ def configure_args(self): # for versions older than 3.0.3,3.1.3,4.0.0 # Presumably future versions after 11/2018 should support slurm+static if spec.satisfies('schedulers=slurm'): - config_args.append('--with-pmi={0}'.format(spec['slurm'].prefix)) + if spec.satisfies('+pmi'): + config_args.append('--with-pmi={0}'.format( + spec['slurm'].prefix)) + else: + config_args.extend(self.with_or_without('pmi')) if spec.satisfies('@3.1.3:') or spec.satisfies('@3.0.3'): if '+static' in spec: config_args.append('--enable-static')