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.
This commit is contained in:
parent
3988732ef4
commit
f237c81060
9
var/spack/repos/builtin/packages/openmpi/nolegacylaunchers.sh
Executable file
9
var/spack/repos/builtin/packages/openmpi/nolegacylaunchers.sh
Executable file
@ -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
|
@ -484,8 +484,12 @@ def delete_mpirun_mpiexec(self):
|
|||||||
self.prefix.bin.shmemrun,
|
self.prefix.bin.shmemrun,
|
||||||
self.prefix.bin.oshrun
|
self.prefix.bin.oshrun
|
||||||
]
|
]
|
||||||
|
script_stub = join_path(os.path.dirname(__file__),
|
||||||
|
"nolegacylaunchers.sh")
|
||||||
for exe in exe_list:
|
for exe in exe_list:
|
||||||
try:
|
try:
|
||||||
os.remove(exe)
|
os.remove(exe)
|
||||||
except OSError:
|
except OSError:
|
||||||
tty.debug("File not present: " + exe)
|
tty.debug("File not present: " + exe)
|
||||||
|
else:
|
||||||
|
copy(script_stub, exe)
|
||||||
|
Loading…
Reference in New Issue
Block a user