summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSeth R. Johnson <johnsonsr@ornl.gov>2019-04-02 20:34:25 -0400
committerPeter Scheibel <scheibel1@llnl.gov>2019-04-02 17:34:25 -0700
commitf237c81060b81a7ac9e58b3ad9ce1b83808cc75d (patch)
treeda755fb40b0c690becae1edd87604597a4d79d16 /var
parent3988732ef47d43daf70d33b11f595ae6549edecc (diff)
downloadspack-f237c81060b81a7ac9e58b3ad9ce1b83808cc75d.tar.gz
spack-f237c81060b81a7ac9e58b3ad9ce1b83808cc75d.tar.bz2
spack-f237c81060b81a7ac9e58b3ad9ce1b83808cc75d.tar.xz
spack-f237c81060b81a7ac9e58b3ad9ce1b83808cc75d.zip
openmpi: Add stub mpirun script for openmpi~legacylaunchers+slurm (#11059)
This adds a stub script for mpirun and other standard executables when installing OpenMPI with slurm. The purpose is to make the removal less of a surprise to administrators/users: it explains why they were removed and how to restore them.
Diffstat (limited to 'var')
-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)