Remove axom workaround for running mpi on machines with flux
This commit is contained in:
parent
dcf19395fa
commit
269b3aa6bf
@ -8,7 +8,6 @@
|
|||||||
from os.path import join as pjoin
|
from os.path import join as pjoin
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.executable import which_string
|
|
||||||
|
|
||||||
|
|
||||||
def get_spec_path(spec, package_name, path_replacements={}, use_bin=False):
|
def get_spec_path(spec, package_name, path_replacements={}, use_bin=False):
|
||||||
@ -452,19 +451,6 @@ def initconfig_mpi_entries(self):
|
|||||||
entries.append(cmake_cache_option("ENABLE_MPI", True))
|
entries.append(cmake_cache_option("ENABLE_MPI", True))
|
||||||
if spec["mpi"].name == "spectrum-mpi":
|
if spec["mpi"].name == "spectrum-mpi":
|
||||||
entries.append(cmake_cache_string("BLT_MPI_COMMAND_APPEND", "mpibind"))
|
entries.append(cmake_cache_string("BLT_MPI_COMMAND_APPEND", "mpibind"))
|
||||||
|
|
||||||
# Replace /usr/bin/srun path with srun flux wrapper path on TOSS 4
|
|
||||||
# TODO: Remove this logic by adding `using_flux` case in
|
|
||||||
# spack/lib/spack/spack/build_systems/cached_cmake.py:196 and remove hard-coded
|
|
||||||
# path to srun in same file.
|
|
||||||
if "toss_4" in self._get_sys_type(spec):
|
|
||||||
srun_wrapper = which_string("srun")
|
|
||||||
mpi_exec_index = [
|
|
||||||
index for index, entry in enumerate(entries) if "MPIEXEC_EXECUTABLE" in entry
|
|
||||||
]
|
|
||||||
if mpi_exec_index:
|
|
||||||
del entries[mpi_exec_index[0]]
|
|
||||||
entries.append(cmake_cache_path("MPIEXEC_EXECUTABLE", srun_wrapper))
|
|
||||||
else:
|
else:
|
||||||
entries.append(cmake_cache_option("ENABLE_MPI", False))
|
entries.append(cmake_cache_option("ENABLE_MPI", False))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user