Fix Axom: index out of range when configuring axom~mpi on toss_4 (#43186)
This commit is contained in:
parent
8f56eb620f
commit
102811adb9
@ -415,21 +415,21 @@ def initconfig_mpi_entries(self):
|
||||
entries.append(cmake_cache_option("ENABLE_MPI", True))
|
||||
if spec["mpi"].name == "spectrum-mpi":
|
||||
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
|
||||
]
|
||||
del entries[mpi_exec_index[0]]
|
||||
entries.append(cmake_cache_path("MPIEXEC_EXECUTABLE", srun_wrapper))
|
||||
else:
|
||||
entries.append(cmake_cache_option("ENABLE_MPI", False))
|
||||
|
||||
# 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
|
||||
]
|
||||
del entries[mpi_exec_index[0]]
|
||||
entries.append(cmake_cache_path("MPIEXEC_EXECUTABLE", srun_wrapper))
|
||||
|
||||
return entries
|
||||
|
||||
def find_path_replacement(self, path1, path2, path_replacements, name, entries):
|
||||
|
Loading…
Reference in New Issue
Block a user