summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xvar/spack/repos/builtin/packages/openmpi/nolegacylaunchers.sh9
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py4
2 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openmpi/nolegacylaunchers.sh b/var/spack/repos/builtin/packages/openmpi/nolegacylaunchers.sh
new file mode 100755
index 0000000000..b6defd69f0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/openmpi/nolegacylaunchers.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+echo "This version of Spack (openmpi ~legacylaunchers schedulers=slurm) "
+echo "is installed without the mpiexec/mpirun commands to prevent "
+echo "unintended performance issues. See https://github.com/spack/spack/pull/10340 "
+echo "for more details."
+echo "If you understand the potential consequences of a misconfigured `mpirun`, you can"
+echo "use spack to install `openmpi+legacylaunchers` to restore the executables."
+echo "Otherwise, use `srun` to launch your MPI executables."
+exit 2
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index dd8d313694..bdc1626c06 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -484,8 +484,12 @@ class Openmpi(AutotoolsPackage):
self.prefix.bin.shmemrun,
self.prefix.bin.oshrun
]
+ script_stub = join_path(os.path.dirname(__file__),
+ "nolegacylaunchers.sh")
for exe in exe_list:
try:
os.remove(exe)
except OSError:
tty.debug("File not present: " + exe)
+ else:
+ copy(script_stub, exe)