Skip to content

Commit 9daa79b

Browse files
authored
Merge pull request #3511 from Flamefire/20241119101313_new_pr_openmpi
Unset PMIX variables when configuring OpenMPI
2 parents a78a255 + 03971af commit 9daa79b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

easybuild/easyblocks/o/openmpi.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import re
3333
from easybuild.tools import LooseVersion
3434

35+
import easybuild.tools.environment as env
3536
import easybuild.tools.toolchain as toolchain
3637
from easybuild.easyblocks.generic.configuremake import ConfigureMake
3738
from easybuild.framework.easyconfig.constants import EASYCONFIG_CONSTANTS
@@ -140,6 +141,13 @@ def config_opt_used(key, enable_opt=False):
140141
else:
141142
self.cfg.update('configopts', '--without-verbs')
142143

144+
if '--with-pmix' in self.cfg['configopts']:
145+
# Unset PMIX variables potentially set by SLURM which may cause configure errors such as
146+
# > configure: WARNING: OPAL_VAR_SCOPE_PUSH called on "PMIX_VERSION",
147+
# > configure: WARNING: but it is already defined with value "3.2.3"
148+
# > configure: WARNING: This usually indicates an error in configure.
149+
# > configure: error: Cannot continue
150+
env.unset_env_vars([v for v in os.environ if v.startswith("PMIX_")])
143151
super().configure_step()
144152

145153
def test_step(self):

0 commit comments

Comments
 (0)