openmpi: restrict versions for launcher variants (#45624)

This commit is contained in:
Derek Ryan Strong 2024-08-12 02:40:02 -07:00 committed by GitHub
parent 678c995415
commit 91412fb595
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -542,6 +542,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
variant( variant(
"orterunprefix", "orterunprefix",
default=False, default=False,
when="@1.3:4",
description="Prefix Open MPI to PATH and LD_LIBRARY_PATH on local and remote hosts", 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 # Adding support to build a debug version of OpenMPI that activates
@ -560,6 +561,7 @@ class Openmpi(AutotoolsPackage, CudaPackage):
variant( variant(
"legacylaunchers", "legacylaunchers",
default=False, default=False,
when="@1.6:4 schedulers=slurm",
description="Do not remove mpirun/mpiexec when building with slurm", description="Do not remove mpirun/mpiexec when building with slurm",
) )
# Variants to use internal packages # Variants to use internal packages
@ -1030,9 +1032,9 @@ def configure_args(self):
config_args.append("--enable-mca-no-build=plm-rsh") config_args.append("--enable-mca-no-build=plm-rsh")
# Useful for ssh-based environments # Useful for ssh-based environments
if spec.satisfies("@1.3:"): # For v4 and lower
if spec.satisfies("+orterunprefix"): if spec.satisfies("+orterunprefix"):
config_args.append("--enable-orterun-prefix-by-default") config_args.append("--enable-orterun-prefix-by-default")
# some scientific packages ignore deprecated/remove symbols. Re-enable # some scientific packages ignore deprecated/remove symbols. Re-enable
# them for now, for discussion see # them for now, for discussion see
@ -1264,6 +1266,7 @@ def filter_pc_files(self):
if self.compiler.name == "nag": if self.compiler.name == "nag":
x.filter("-Wl,--enable-new-dtags", "", string=True, backup=False) x.filter("-Wl,--enable-new-dtags", "", string=True, backup=False)
# For v4 and lower
@run_after("install") @run_after("install")
def delete_mpirun_mpiexec(self): def delete_mpirun_mpiexec(self):
# The preferred way to run an application when Slurm is the # The preferred way to run an application when Slurm is the
@ -1273,7 +1276,7 @@ def delete_mpirun_mpiexec(self):
# applications via mpirun or mpiexec, and leaves srun as the # applications via mpirun or mpiexec, and leaves srun as the
# only sensible choice (orterun is still present, but normal # only sensible choice (orterun is still present, but normal
# users don't know about that). # users don't know about that).
if "@1.6: ~legacylaunchers schedulers=slurm" in self.spec: if self.spec.satisfies("~legacylaunchers schedulers=slurm"):
exe_list = [ exe_list = [
self.prefix.bin.mpirun, self.prefix.bin.mpirun,
self.prefix.bin.mpiexec, self.prefix.bin.mpiexec,