summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/openmpi/package.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py
index d3991a8f21..dd8d313694 100644
--- a/var/spack/repos/builtin/packages/openmpi/package.py
+++ b/var/spack/repos/builtin/packages/openmpi/package.py
@@ -6,6 +6,7 @@
import os
import sys
+import llnl.util.tty as tty
def _verbs_dir():
@@ -478,7 +479,13 @@ class Openmpi(AutotoolsPackage):
# 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)