Skip to content

Commit

Permalink
Unset PMIX variables when configuring OpenMPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Nov 19, 2024
1 parent 57c0eae commit 4eb2562
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions easybuild/easyblocks/o/openmpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import re
from easybuild.tools import LooseVersion

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

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

def test_step(self):
Expand Down

0 comments on commit 4eb2562

Please sign in to comment.