summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Ryan Strong <drkrynstrng@pm.me>2024-08-12 02:40:02 -0700
committerGitHub <noreply@github.com>2024-08-12 11:40:02 +0200
commit91412fb595820c8bb2cbf677bfb9589f70847181 (patch)
treed70f405dbfadd14505454d8d488bf57915cbdb6c
parent678c9954159b9e5be468c56d19aeebb016113a32 (diff)
downloadspack-91412fb595820c8bb2cbf677bfb9589f70847181.tar.gz
spack-91412fb595820c8bb2cbf677bfb9589f70847181.tar.bz2
spack-91412fb595820c8bb2cbf677bfb9589f70847181.tar.xz
spack-91412fb595820c8bb2cbf677bfb9589f70847181.zip
openmpi: restrict versions for launcher variants (#45624)
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index 02fa6434d5..5b2fb93783 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -542,6 +542,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
variant(
"orterunprefix",
default=False,
+ when="@1.3:4",
description="Prefix Open MPI to PATH and LD_LIBRARY_PATH on local and remote hosts",
)
# Adding support to build a debug version of OpenMPI that activates
@@ -560,6 +561,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
variant(
"legacylaunchers",
default=False,
+ when="@1.6:4 schedulers=slurm",
description="Do not remove mpirun/mpiexec when building with slurm",
)
# Variants to use internal packages
@@ -1030,9 +1032,9 @@ class Openmpi(AutotoolsPackage, CudaPackage):
config_args.append("--enable-mca-no-build=plm-rsh")
# Useful for ssh-based environments
- if spec.satisfies("@1.3:"):
- if spec.satisfies("+orterunprefix"):
- config_args.append("--enable-orterun-prefix-by-default")
+ # For v4 and lower
+ if spec.satisfies("+orterunprefix"):
+ config_args.append("--enable-orterun-prefix-by-default")
# some scientific packages ignore deprecated/remove symbols. Re-enable
# them for now, for discussion see
@@ -1264,6 +1266,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
if self.compiler.name == "nag":
x.filter("-Wl,--enable-new-dtags", "", string=True, backup=False)
+ # For v4 and lower
@run_after("install")
def delete_mpirun_mpiexec(self):
# The preferred way to run an application when Slurm is the
@@ -1273,7 +1276,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
# applications via mpirun or mpiexec, and leaves srun as the
# only sensible choice (orterun is still present, but normal
# users don't know about that).
- if "@1.6: ~legacylaunchers schedulers=slurm" in self.spec:
+ if self.spec.satisfies("~legacylaunchers schedulers=slurm"):
exe_list = [
self.prefix.bin.mpirun,
self.prefix.bin.mpiexec,