diff --git a/.uberenv_config.json b/.uberenv_config.json index caacb8ac42..a9a72dc6e3 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -4,9 +4,9 @@ "package_final_phase" : "initconfig", "package_source_dir" : "../..", "spack_url": "https://github.com/spack/spack.git", -"spack_commit": "291644eb783a403d824aedc8970467b00002791c", +"spack_commit": "f626ad74eebc75b4994bb3a512957604bff52813", "spack_packages_url": "https://github.com/spack/spack-packages.git", -"spack_packages_commit": "11873c3822ff604b7a58f4f9107598dc298485d6", +"spack_packages_commit": "9baca9b4300ea4282c9daffe0ef0f51e5deb7e47", "spack_configs_path": "scripts/spack/configs", "spack_packages_path": ["scripts/spack/spack_repo/smith/packages"] } diff --git a/cmake/thirdparty/FindMFEM.cmake b/cmake/thirdparty/FindMFEM.cmake index cd7d45c8af..63298b02be 100644 --- a/cmake/thirdparty/FindMFEM.cmake +++ b/cmake/thirdparty/FindMFEM.cmake @@ -103,17 +103,6 @@ else() string(FIND "${mfem_tpl_lnk_flags}" "\n" mfem_tpl_lnl_flags_end_pos ) string(SUBSTRING "${mfem_tpl_lnk_flags}" 0 ${mfem_tpl_lnl_flags_end_pos} mfem_tpl_lnk_flags) string(STRIP "${mfem_tpl_lnk_flags}" mfem_tpl_lnk_flags) - - # filter out items containing "Xlinker" - set(_mfem_tpl_list ${mfem_tpl_lnk_flags}) - separate_arguments(_mfem_tpl_list) - list(FILTER _mfem_tpl_list EXCLUDE REGEX Xlinker) - # On Apple, -Wl,-rpath,... entries duplicate CMake's own rpath management - # (CMAKE_INSTALL_RPATH_USE_LINK_PATH) and cause ld "duplicate -rpath" warnings - if(APPLE) - list(FILTER _mfem_tpl_list EXCLUDE REGEX "^-Wl,-rpath,") - endif() - list(JOIN _mfem_tpl_list " " mfem_tpl_lnk_flags) else() message(WARNING "No third party library flags found in ${MFEM_CFG_DIR}/config.mk") endif() diff --git a/cmake/thirdparty/SetupSmithThirdParty.cmake b/cmake/thirdparty/SetupSmithThirdParty.cmake index d00c4a846e..7fc412606d 100644 --- a/cmake/thirdparty/SetupSmithThirdParty.cmake +++ b/cmake/thirdparty/SetupSmithThirdParty.cmake @@ -103,35 +103,19 @@ if (NOT SMITH_THIRD_PARTY_LIBRARIES_FOUND) endif() #------------------------------------------------------------------------------ - # Conduit (required by Axom) + # Conduit (found via Axom) #------------------------------------------------------------------------------ if(NOT CONDUIT_DIR) MESSAGE(FATAL_ERROR "Could not find Conduit. Conduit requires explicit CONDUIT_DIR.") endif() - smith_assert_is_directory(DIR_VARIABLE CONDUIT_DIR) - - set(_conduit_config "${CONDUIT_DIR}/lib/cmake/conduit/ConduitConfig.cmake") - if(NOT EXISTS ${_conduit_config}) - MESSAGE(FATAL_ERROR "Could not find Conduit CMake include file ${_conduit_config}") + #------------------------------------------------------------------------------ + # HDF5 (found via Axom) + #------------------------------------------------------------------------------ + if (NOT HDF5_DIR) + MESSAGE(FATAL_ERROR "Could not find HDF5. HDF5 requires explicit HDF5_DIR.") endif() - find_dependency(Conduit REQUIRED - PATHS "${CONDUIT_DIR}" - "${CONDUIT_DIR}/lib/cmake/conduit") - - smith_assert_find_succeeded(PROJECT_NAME Conduit - TARGET conduit::conduit - DIR_VARIABLE CONDUIT_DIR) - message(STATUS "Conduit support is ON") - set(CONDUIT_FOUND TRUE) - - # Manually set includes as system includes - get_target_property(_dirs conduit::conduit INTERFACE_INCLUDE_DIRECTORIES) - set_property(TARGET conduit::conduit - APPEND PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES - "${_dirs}") - #------------------------------------------------------------------------------ # Sundials #------------------------------------------------------------------------------ @@ -735,19 +719,17 @@ if (NOT SMITH_THIRD_PARTY_LIBRARIES_FOUND) endforeach() endif() - # On Apple, Spack-built cmake configs embed literal -Wl,-rpath,... entries in - # INTERFACE_LINK_LIBRARIES. These duplicate CMake's own rpath management - # (CMAKE_INSTALL_RPATH_USE_LINK_PATH) and cause ld "duplicate -rpath" warnings. + # Prevent unhelpful warnings by removing duplicate rpaths set in MFEM's config.mk MFEM_EXT_LIBS if(APPLE) foreach(_target ${_mfem_targets}) if(TARGET ${_target}) - get_target_property(_link_libs ${_target} INTERFACE_LINK_LIBRARIES) - if(_link_libs) - list(FILTER _link_libs EXCLUDE REGEX "^-Wl,-rpath,") - set_target_properties(${_target} PROPERTIES INTERFACE_LINK_LIBRARIES "${_link_libs}") - endif() + get_target_property(_link_str ${_target} INTERFACE_LINK_LIBRARIES) + separate_arguments(_link_list UNIX_COMMAND "${_link_str}") + list(REMOVE_DUPLICATES _link_list) + set_target_properties(${_target} PROPERTIES INTERFACE_LINK_LIBRARIES "${_link_list}") endif() endforeach() + unset(_link_str) unset(_link_libs) endif() unset(_mfem_targets) diff --git a/scripts/spack/configs/toss_4_x86_64_ib/spack.yaml b/scripts/spack/configs/toss_4_x86_64_ib/spack.yaml index d6956dee3d..415ded7360 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib/spack.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib/spack.yaml @@ -57,6 +57,8 @@ spack: c: /usr/tce/packages/clang/clang-19.1.3-magic/bin/clang cxx: /usr/tce/packages/clang/clang-19.1.3-magic/bin/clang++ flags: + cflags: -fPIC + cxxflags: -fPIC fflags: -fPIC openblas: diff --git a/scripts/spack/configs/versions.yaml b/scripts/spack/configs/versions.yaml index 5ae3def9f7..b1fa0ffba0 100644 --- a/scripts/spack/configs/versions.yaml +++ b/scripts/spack/configs/versions.yaml @@ -11,10 +11,10 @@ packages: - spec: "@2.12.1" camp: require: - - spec: "@2025.09.2" + - spec: "@2025.12.0" conduit: require: - - spec: "@0.9.5" + - spec: "@0.9.6" # Hypre v3 causes equationsolver to fail TOSS 4 hypre: require: @@ -27,13 +27,13 @@ packages: - spec: "@3.21.6" raja: require: - - spec: "@2025.09.0" + - spec: "@2025.12.2" sundials: require: - - spec: "@7.5.0" + - spec: "@7.7.0" tribol: require: - spec: "@0.1.0.26" umpire: require: - - spec: "@2025.09.0" + - spec: "@2025.12.0" diff --git a/scripts/spack/spack_repo/smith/packages/mfem/package.py b/scripts/spack/spack_repo/smith/packages/mfem/package.py index 97d488b9e1..9c8256cc97 100644 --- a/scripts/spack/spack_repo/smith/packages/mfem/package.py +++ b/scripts/spack/spack_repo/smith/packages/mfem/package.py @@ -15,8 +15,6 @@ class Mfem(BuiltinMfem): variant('asan', default=False, description='Add Address Sanitizer flags') - depends_on("fortran", type="build", when="+strumpack") - # AddressSanitizer (ASan) is only supported by GCC and (some) LLVM-derived # compilers. Denylist compilers not known to support ASan asan_compiler_denylist = { diff --git a/scripts/spack/spack_repo/smith/packages/smith/package.py b/scripts/spack/spack_repo/smith/packages/smith/package.py index 2367794479..d545feb1ec 100644 --- a/scripts/spack/spack_repo/smith/packages/smith/package.py +++ b/scripts/spack/spack_repo/smith/packages/smith/package.py @@ -6,6 +6,7 @@ from spack.package import * from spack.spec import UnsupportedCompilerError from spack.util.executable import which_string + from spack_repo.builtin.build_systems.cached_cmake import ( CachedCMakePackage, cmake_cache_option, @@ -15,10 +16,6 @@ from spack_repo.builtin.build_systems.cuda import CudaPackage from spack_repo.builtin.build_systems.rocm import ROCmPackage -from spack_repo.builtin.build_systems.cached_cmake import CachedCMakePackage -from spack_repo.builtin.build_systems.cuda import CudaPackage -from spack_repo.builtin.build_systems.rocm import ROCmPackage - import os import socket from os.path import join as pjoin @@ -50,10 +47,15 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): maintainers("chapman39", "white238") - homepage = "https://www.github.com/LLNL/smith" - git = "https://github.com/LLNL/smith.git" + homepage = "https://www.github.com/LLNL/smith" + git = "https://github.com/LLNL/smith.git" + submodules = True + + license("BSD-3-Clause") - version("develop", branch="develop", submodules=True, preferred=True) + version("main", branch="main") + version("develop", branch="develop") + version("0.1.0", tag="v0.1.0", commit="cbe2e173eb1cbc36525ba454a386e4fe0b7e6440") # ----------------------------------------------------------------------- # Variants @@ -112,8 +114,10 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("enzyme@0.0.180:", when="+enzyme") depends_on("cuda+allow-unsupported-compilers", when="+enzyme+cuda") depends_on("enzyme %libllvm=llvm-amdgpu", when="+enzyme+rocm") + requires("%cxx=llvm-amdgpu", when="+enzyme+rocm") + requires("%cxx=llvm", when="+enzyme~rocm") - # Devtool dependencies these need to match smith_devtools/package.py + # Devtool dependencies these need to match smithdevtools/package.py with when("+devtools"): depends_on("cppcheck") depends_on("doxygen") @@ -123,9 +127,6 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): with when("+sundials"): # MFEM is deprecating the monitoring support with sundials v6.0 and later - # NOTE: Sundials must be built static to prevent the following runtime error: - # "error while loading shared libraries: libsundials_nvecserial.so.6: - # cannot open shared object file: No such file or directory" depends_on("sundials+hypre~trilinos~monitoring~examples~examples-install+static~shared~petsc") depends_on("sundials+asan", when="+asan") @@ -164,11 +165,9 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("tribol+enzyme", when="+enzyme") depends_on("tribol~enzyme", when="~enzyme") - # Needs to be first due to a bug with the Spack concretizer - # Note: Certain combinations of CMake and Conduit do not like +mpi - # and cause FindHDF5.cmake to fail and only return mpi information - # (includes, libs, etc) instead of hdf5 info - depends_on("hdf5@1.8.21:+hl~mpi cflags=-Wno-int-conversion") + depends_on("conduit+hdf5+mpi~python~test~silo") + + depends_on("hdf5+hl") depends_on("camp@2024.02.0:") @@ -187,14 +186,12 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("axom~raja", when="~raja") depends_on("axom+umpire", when="+umpire") depends_on("axom~umpire", when="~umpire") - depends_on("axom~openmp", when="~openmp") depends_on("axom+openmp", when="+openmp") + depends_on("axom~openmp", when="~openmp") depends_on("metis@5.1.0") depends_on("parmetis@4.0.3") - depends_on("conduit~python~test~silo") - depends_on("adiak+mpi", when="+adiak") with when("+caliper"): @@ -210,69 +207,49 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("strumpack~openmp", when="~openmp") # - # Forward variants - # NOTE: propagating variants to dependencies should be removed when pushing this recipe up to Spack + # CUDA # + depends_on("amgx", when="+cuda") + + for val in CudaPackage.cuda_arch_values: + ext_cuda_dep = f"+cuda cuda_arch={val}" + + # required + depends_on(f"axom {ext_cuda_dep}", when=f"{ext_cuda_dep}") + depends_on(f"mfem {ext_cuda_dep}", when=f"{ext_cuda_dep}") + depends_on(f"hypre {ext_cuda_dep}", when=f"{ext_cuda_dep}") - # CMake packages "build_type=RelWithDebInfo|Debug|Release|MinSizeRel" - - # Optional (require our variant in "when") - for dep in ["raja", "strumpack"]: - depends_on("{0} build_type=Debug".format(dep), when="+{0} build_type=Debug".format(dep)) - depends_on("{0}+shared".format(dep), when="+{0}+shared".format(dep)) - depends_on("{0}~shared".format(dep), when="+{0}~shared".format(dep)) - - # Umpire needs it's own section due do +shared+cuda conflict - depends_on("umpire build_type=Debug".format(dep), when="+umpire build_type=Debug".format(dep)) - # Only propagate shared if not CUDA - depends_on("umpire+shared".format(dep), when="+umpire+shared~cuda".format(dep)) - depends_on("umpire~shared".format(dep), when="+umpire~shared".format(dep)) - - # Don't add propagate shared variant to sundials - depends_on("sundials build_type=Debug".format(dep), when="+sundials build_type=Debug".format(dep)) - - # Optional (require when="+profile") - depends_on("adiak build_type=Debug".format(dep), when="+adiak build_type=Debug") - depends_on("adiak+shared".format(dep), when="+adiak+shared") - depends_on("adiak~shared".format(dep), when="+adiak~shared") - - # Don't propagate ~shared to caliper in rocm builds - depends_on("caliper build_type=Debug".format(dep), when="+caliper build_type=Debug") - depends_on("caliper+shared".format(dep), when="+caliper+shared") - depends_on("caliper~shared".format(dep), when="+caliper~shared~rocm") - - # Required - for dep in ["axom", "hdf5", "metis", "parmetis", "superlu-dist"]: - depends_on("{0} build_type=Debug".format(dep), when="build_type=Debug") - depends_on("{0}+shared".format(dep), when="+shared") - depends_on("{0}~shared".format(dep), when="~shared") - - # Don't propagate +shared to conduit, since it doesn't concretize in rocm builds - depends_on("conduit build_type=Debug".format(dep), when="build_type=Debug") - - # Optional packages that are controlled by variants - for dep in ["petsc"]: - depends_on("{0}+debug".format(dep), when="+{0} build_type=Debug".format(dep)) - depends_on("{0}+shared".format(dep), when="+{0}+shared".format(dep)) - depends_on("{0}~shared".format(dep), when="+{0}~shared".format(dep)) - - # Package name doesnt match variant name - # netcdf-c does not have a debug variant - depends_on("netcdf-c+shared", when="+shared") - depends_on("netcdf-c~shared", when="~shared") - - # Tribol does not have shared variant - depends_on("tribol build_type=Debug", when="+tribol build_type=Debug") - - # Required but not CMake - for dep in ["hypre", "mfem"]: - depends_on("{0}+debug".format(dep), when="build_type=Debug") - depends_on("{0}+shared".format(dep), when="+shared") - depends_on("{0}~shared".format(dep), when="~shared") - - # MFEM has a static variant - depends_on("mfem+static", when="~shared") - depends_on("mfem~static", when="+shared") + # optional + depends_on(f"caliper {ext_cuda_dep}", when=f"^caliper {ext_cuda_dep}") + depends_on(f"petsc {ext_cuda_dep}", when=f"+petsc {ext_cuda_dep}") + depends_on(f"raja {ext_cuda_dep}", when=f"+raja {ext_cuda_dep}") + depends_on(f"slepc {ext_cuda_dep}", when=f"+slepc {ext_cuda_dep}") + depends_on(f"sundials {ext_cuda_dep}", when=f"+sundials {ext_cuda_dep}") + depends_on(f"tribol {ext_cuda_dep}", when=f"+tribol {ext_cuda_dep}") + depends_on(f"umpire {ext_cuda_dep}", when=f"+umpire {ext_cuda_dep}") + + # + # ROCm + # + for val in ROCmPackage.amdgpu_targets: + ext_rocm_dep = f"+rocm amdgpu_target={val}" + + # required + depends_on(f"axom {ext_rocm_dep}", when=f"{ext_rocm_dep}") + depends_on(f"mfem+raja+umpire {ext_rocm_dep}", when=f"{ext_rocm_dep}") + depends_on(f"hypre {ext_rocm_dep}", when=f"{ext_rocm_dep}") + + # optional + depends_on(f"caliper {ext_rocm_dep}", when=f"^caliper {ext_rocm_dep}") + depends_on(f"petsc {ext_rocm_dep}", when=f"+petsc {ext_rocm_dep}") + depends_on(f"raja {ext_rocm_dep}", when=f"+raja {ext_rocm_dep}") + depends_on(f"slepc {ext_rocm_dep}", when=f"+slepc {ext_rocm_dep}") + depends_on(f"sundials {ext_rocm_dep}", when=f"+sundials {ext_rocm_dep}") + depends_on(f"tribol {ext_rocm_dep}", when=f"+tribol {ext_rocm_dep}") + depends_on(f"umpire {ext_rocm_dep}", when=f"+umpire {ext_rocm_dep}") + + depends_on("rocprim", when="+rocm") + depends_on("hipblas", when="+rocm") # # Conflicts @@ -282,9 +259,6 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): for compiler_ in ["aocc", "cce", "gcc", "nag", "fj", "intel", "nvhpc", "xl"]: conflicts("+enzyme", when=f"%[virtuals=c,cxx] {compiler_}") - requires("%cxx=llvm-amdgpu", when="+enzyme+rocm") - requires("%cxx=llvm", when="+enzyme~rocm") - conflicts("+openmp", when="+rocm") conflicts("+cuda", when="+rocm") conflicts("~umpire", when="+raja", msg="Axom requires both raja and umpire in order to properly set CAMP_DIR.") @@ -312,55 +286,55 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): msg="{0} compilers do not support Address Sanitizer".format(compiler_) ) - # - # CUDA - # conflicts("cuda_arch=none", when="+cuda", msg="CUDA architecture is required") - depends_on("amgx", when="+cuda") - for val in CudaPackage.cuda_arch_values: - ext_cuda_dep = f"+cuda cuda_arch={val}" + conflicts("amdgpu_target=none", when="+rocm", + msg="AMD GPU target is required when building with ROCm") - # required - depends_on(f"axom {ext_cuda_dep}", when=f"{ext_cuda_dep}") - depends_on(f"mfem {ext_cuda_dep}", when=f"{ext_cuda_dep}") - depends_on(f"hypre {ext_cuda_dep}", when=f"{ext_cuda_dep}") - # optional - depends_on(f"caliper {ext_cuda_dep}", when=f"^caliper {ext_cuda_dep}") - depends_on(f"petsc {ext_cuda_dep}", when=f"+petsc {ext_cuda_dep}") - depends_on(f"raja {ext_cuda_dep}", when=f"+raja {ext_cuda_dep}") - depends_on(f"slepc {ext_cuda_dep}", when=f"+slepc {ext_cuda_dep}") - depends_on(f"sundials {ext_cuda_dep}", when=f"+sundials {ext_cuda_dep}") - depends_on(f"tribol {ext_cuda_dep}", when=f"+tribol {ext_cuda_dep}") - depends_on(f"umpire {ext_cuda_dep}", when=f"+umpire {ext_cuda_dep}") + # ----------------------------------------------------------------------- + # Conflicts + # ----------------------------------------------------------------------- - # - # ROCm - # - conflicts("amdgpu_target=none", when="+rocm", - msg="AMD GPU target is required when building with ROCm") + # Enzyme required an LLVM-based compiler + for compiler_ in ["aocc", "cce", "gcc", "nag", "fj", "intel", "nvhpc", "xl"]: + conflicts("+enzyme", when=f"%[virtuals=c,cxx] {compiler_}") - for val in ROCmPackage.amdgpu_targets: - ext_rocm_dep = f"+rocm amdgpu_target={val}" + requires("%cxx=llvm-amdgpu", when="+enzyme+rocm") + requires("%cxx=llvm", when="+enzyme~rocm") - # required - depends_on(f"axom {ext_rocm_dep}", when=f"{ext_rocm_dep}") - depends_on(f"mfem+raja+umpire {ext_rocm_dep}", when=f"{ext_rocm_dep}") - depends_on(f"hypre {ext_rocm_dep}", when=f"{ext_rocm_dep}") + conflicts("+openmp", when="+rocm") + conflicts("~umpire", when="+raja", msg="Axom requires both raja and umpire in order to properly set CAMP_DIR.") + conflicts("~petsc", when="+slepc", msg="PETSc must be built when building with SLEPc!") - # optional - depends_on(f"caliper {ext_rocm_dep}", when=f"^caliper {ext_rocm_dep}") - depends_on(f"petsc {ext_rocm_dep}", when=f"+petsc {ext_rocm_dep}") - depends_on(f"raja {ext_rocm_dep}", when=f"+raja {ext_rocm_dep}") - depends_on(f"slepc {ext_rocm_dep}", when=f"+slepc {ext_rocm_dep}") - depends_on(f"sundials {ext_rocm_dep}", when=f"+sundials {ext_rocm_dep}") - depends_on(f"tribol {ext_rocm_dep}", when=f"+tribol {ext_rocm_dep}") - depends_on(f"umpire {ext_rocm_dep}", when=f"+umpire {ext_rocm_dep}") + conflicts("+cuda", when="+rocm") + conflicts("cuda_arch=none", when="+cuda", msg="CUDA architecture is required") + conflicts("amdgpu_target=none", when="+rocm", msg="AMD GPU target is required when building with ROCm") - depends_on("rocprim", when="+rocm") - depends_on("hipblas", when="+rocm") + conflicts("%intel", msg="Intel has a bug with C++17 support as of May 2020") + + # NOTE: Sundials must be built static to prevent the following runtime error: + # "error while loading shared libraries: libsundials_nvecserial.so.6: + # cannot open shared object file: No such file or directory" + conflicts("sundials+shared", when="+sundials", + msg="Sundials causes runtime errors if shared!") + + # ASan is only supported by GCC and (some) LLVM-derived + # compilers. + asan_compiler_denylist = {"aocc", "arm", "cce", "fj", "intel", "nag", + "nvhpc", "oneapi", "pgi", "xl", "xl_r"} + asan_compiler_allowlist = {"gcc", "clang", "apple-clang"} + + # ASan compiler denylist and allowlist should be disjoint. + assert len(asan_compiler_denylist & asan_compiler_allowlist) == 0 + + for compiler_ in asan_compiler_denylist: + conflicts( + "%{0}".format(compiler_), + when="+asan", + msg="{0} compilers do not support Address Sanitizer".format(compiler_) + ) def _get_sys_type(self, spec): @@ -409,22 +383,14 @@ def initconfig_hardware_entries(self): entries.append(cmake_cache_option("ENABLE_CUDA", True)) entries.append(cmake_cache_option("CMAKE_CUDA_SEPARABLE_COMPILATION", True)) - if spec.satisfies("cuda_arch=none"): - msg = ("# No cuda_arch specified in Spack spec, " - "this is likely to fail\n\n") - entries.append(msg) - else: - # CXX flags will be propagated to the host compiler - cxxflags = " ".join(spec.compiler_flags["cxxflags"]) - cuda_flags = cxxflags - cuda_flags += " ${CMAKE_CUDA_FLAGS} --expt-extended-lambda --expt-relaxed-constexpr " - entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", - cuda_flags, force=True)) + # CXX flags will be propagated to the host compiler + cxxflags = " ".join(spec.compiler_flags["cxxflags"]) + cuda_flags = cxxflags + cuda_flags += " ${CMAKE_CUDA_FLAGS} --expt-extended-lambda --expt-relaxed-constexpr " + entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", cuda_flags, force=True)) - entries.append( - "# nvcc does not like gtest's 'pthreads' flag\n") - entries.append( - cmake_cache_option("gtest_disable_pthreads", True)) + entries.append("# nvcc does not like gtest's 'pthreads' flag\n") + entries.append(cmake_cache_option("gtest_disable_pthreads", True)) if spec.satisfies("+rocm"): entries.append(cmake_cache_option("ENABLE_HIP", True)) @@ -463,11 +429,9 @@ def initconfig_hardware_entries(self): ) # Additional libraries for TOSS4 - hip_link_flags += "-lamdhip64 -lhsakmt -lhsa-runtime64 -lamd_comgr " - hip_link_flags += "-lpgmath " + hip_link_flags += "-lamdhip64 -lhsakmt -lhsa-runtime64 -lamd_comgr -lpgmath " if spec.satisfies("+openmp"): hip_link_flags += "-lompstub " - if spec.satisfies("^hipblas"): hip_link_flags += "-lhipblas " @@ -504,16 +468,6 @@ def initconfig_mpi_entries(self): 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 once we move past https://github.com/spack/spack/pull/49033 - 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 len(mpi_exec_index) != 0: - 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):