OpenMPI: v4.0.0 + Slurm installation error (#10853)
shmemrun and oshrun do not exist in OpenMPI v4.0.0 (ref: https://www.open-mpi.org/doc/v4.0/) The Spack OpenMPI package was failing the install by trying to remove them. This guards the removal of several scripts when using the Slurm scheduler to handle the case where they don't exist.
This commit is contained in:
parent
1e6b13d335
commit
74b33e9f82
1 changed files with 11 additions and 4 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
import llnl.util.tty as tty
|
||||
|
||||
|
||||
def _verbs_dir():
|
||||
|
@ -478,7 +479,13 @@ def delete_mpirun_mpiexec(self):
|
|||
# only sensible choice (orterun is still present, but normal
|
||||
# users don't know about that).
|
||||
if '@1.6: ~legacylaunchers schedulers=slurm' in self.spec:
|
||||
os.remove(self.prefix.bin.mpirun)
|
||||
os.remove(self.prefix.bin.mpiexec)
|
||||
os.remove(self.prefix.bin.shmemrun)
|
||||
os.remove(self.prefix.bin.oshrun)
|
||||
exe_list = [self.prefix.bin.mpirun,
|
||||
self.prefix.bin.mpiexec,
|
||||
self.prefix.bin.shmemrun,
|
||||
self.prefix.bin.oshrun
|
||||
]
|
||||
for exe in exe_list:
|
||||
try:
|
||||
os.remove(exe)
|
||||
except OSError:
|
||||
tty.debug("File not present: " + exe)
|
||||
|
|
Loading…
Reference in a new issue