diff --git a/scripts/spack/packages/axom/package.py b/scripts/spack/packages/axom/package.py index 9c85102660..8fc9f0e912 100644 --- a/scripts/spack/packages/axom/package.py +++ b/scripts/spack/packages/axom/package.py @@ -7,8 +7,6 @@ import socket from os.path import join as pjoin -from spack.package import * -from spack.util.executable import which_string from spack_repo.builtin.build_systems.cached_cmake import ( CachedCMakePackage, cmake_cache_option, @@ -18,6 +16,9 @@ from spack_repo.builtin.build_systems.cuda import CudaPackage from spack_repo.builtin.build_systems.rocm import ROCmPackage +from spack.package import * + + def get_spec_path(spec, package_name, path_replacements={}, use_bin=False): """Extracts the prefix path for the given spack package path_replacements is a dictionary with string replacements for the path. @@ -70,10 +71,6 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage): version("0.3.0", tag="v0.3.0", commit="20068ccab4b4f70055918b4f17960ec3ed6dbce8") version("0.2.9", tag="v0.2.9", commit="9e9a54ede3326817c05f35922738516e43b5ec3d") - depends_on("c", type="build") - depends_on("cxx", type="build") - depends_on("fortran", type="build", when="+fortran") - # https://github.com/spack/spack/issues/31829 patch("examples-oneapi.patch", when="@0.6.1 +examples %oneapi") @@ -128,6 +125,10 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage): # Dependencies # ----------------------------------------------------------------------- # Basics + depends_on("c", type="build") + depends_on("cxx", type="build") + depends_on("fortran", type="build", when="+fortran") + depends_on("cmake@3.14:", type="build") depends_on("cmake@3.18:", type="build", when="@0.7.0:") depends_on("cmake@3.21:", type="build", when="+rocm") @@ -429,9 +430,7 @@ def initconfig_hardware_entries(self): if spec.satisfies("+fortran") and self.is_fortran_compiler("xlf"): # Grab lib directory for the current fortran compiler libdir = pjoin(os.path.dirname(os.path.dirname(self.compiler.fc)), "lib") - description = ( - "Adds a missing rpath for libraries " "associated with the fortran compiler" - ) + description = "Adds a missing rpath for libraries associated with the fortran compiler" linker_flags = "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath," + libdir @@ -496,19 +495,6 @@ 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 - ] - if mpi_exec_index: - del entries[mpi_exec_index[0]] - entries.append(cmake_cache_path("MPIEXEC_EXECUTABLE", srun_wrapper)) else: entries.append(cmake_cache_option("ENABLE_MPI", False))