diff --git a/.gitmodules b/.gitmodules index 3f82ac613..6d5f40a7d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,9 +13,6 @@ [submodule "tests"] path = tests url = https://github.com/LLNL/serac_tests.git -[submodule "scripts/spack/radiuss-spack-configs"] - path = scripts/spack/radiuss-spack-configs - url = https://github.com/LLNL/radiuss-spack-configs.git [submodule "tribol"] path = tribol url = https://github.com/LLNL/Tribol.git diff --git a/.uberenv_config.json b/.uberenv_config.json index a3b0a18bc..ea4b878c5 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": "734c5db2121b01c373eed6538e452f18887e9e44", +"spack_commit": "0154734bd44cb9230fcadecf2e6567c9d22ce5ab", "spack_packages_url": "https://github.com/spack/spack-packages.git", -"spack_packages_commit": "a75a7f75182ffc7a51c6ca7f0fec4bf9b2705be8", +"spack_packages_commit": "05639b4dac34682e5d8fada712f23cc174dd9bf4", "spack_configs_path": "scripts/spack/configs", -"spack_packages_path": ["scripts/spack/radiuss-spack-configs/spack_repo/llnl_radiuss/packages", "scripts/spack/spack_repo/smith/packages"] +"spack_packages_path": ["scripts/spack/spack_repo/smith/packages"] } diff --git a/axom b/axom index 4326f8964..52ef76c55 160000 --- a/axom +++ b/axom @@ -1 +1 @@ -Subproject commit 4326f89641223b2a220f008e8d6b8fe1aab24a5c +Subproject commit 52ef76c55c9f1651c71e795b0b27723033209fe5 diff --git a/mfem b/mfem index 563cd2597..5731d2f22 160000 --- a/mfem +++ b/mfem @@ -1 +1 @@ -Subproject commit 563cd25971f1f86e72168fdc022a2472d08b4661 +Subproject commit 5731d2f22bed549639a4d41895479ae698849afc diff --git a/scripts/docker/dockerfile_cuda-12 b/scripts/docker/dockerfile_cuda-12 index 0c9451217..19af64e80 100644 --- a/scripts/docker/dockerfile_cuda-12 +++ b/scripts/docker/dockerfile_cuda-12 @@ -5,7 +5,7 @@ ENV spec="~devtools~enzyme+cuda cuda_arch=70 %gcc_13" SHELL ["/bin/bash", "-c"] RUN sudo apt-get update -y -RUN sudo apt-get install gettext gfortran-$(gcc -dumpversion) libopenblas-dev \ +RUN sudo apt-get install gettext gfortran-13 libopenblas-dev \ lsb-release lua5.2 lua5.2-dev ssh -fy RUN sudo useradd -m -s /bin/bash -G sudo smith diff --git a/scripts/docker/dockerfile_gcc-14 b/scripts/docker/dockerfile_gcc-14 index 23c5714b1..13201f820 100644 --- a/scripts/docker/dockerfile_gcc-14 +++ b/scripts/docker/dockerfile_gcc-14 @@ -1,13 +1,21 @@ FROM ghcr.io/llnl/radiuss:gcc-14-ubuntu-24.04 LABEL maintainer="chapman39@llnl.gov" ARG branch=develop -ENV spec="~devtools~enzyme %gcc_14" +ENV llvm_version="19" +ENV spec="+devtools~enzyme %gcc_14" SHELL ["/bin/bash", "-c"] RUN sudo apt-get update -y RUN sudo apt-get install gettext gfortran-$(gcc -dumpversion) libopenblas-dev \ lsb-release lua5.2 lua5.2-dev ssh -fy +# Install devtool-related packages +# NOTE: Skipping this can significantly save disk space +RUN sudo apt-get install libclang-rt-${llvm_version}-dev clang-tidy-${llvm_version} cppcheck graphviz python3-sphinx texlive-full -fy; \ + sudo wget https://github.com/doxygen/doxygen/releases/download/Release_1_9_8/doxygen-1.9.8.linux.bin.tar.gz; \ + sudo tar -xf doxygen-1.9.8.linux.bin.tar.gz; \ + cd doxygen-1.9.8 && sudo make && sudo make install && doxygen --version; + RUN sudo useradd -m -s /bin/bash -G sudo smith WORKDIR "/home/smith" USER smith diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib_p9/spack.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib_p9/spack.yaml index 0cf00c958..ae977a1a0 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib_p9/spack.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib_p9/spack.yaml @@ -216,16 +216,10 @@ spack: externals: - spec: llvm@14.0.5+clang+python prefix: /usr/tce/packages/clang/clang-14.0.5 - py-ats: - version: [7.0.105] - externals: - - spec: py-ats@7.0.105 - prefix: /usr/workspace/smithdev/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.11.7 - buildable: false py-sphinx: version: [7.2.6] externals: - - spec: py-sphinx@7.2.6 + - spec: py-sphinx@7.2.6 ^python prefix: /usr/workspace/smithdev/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.11.7 buildable: false python: diff --git a/scripts/spack/configs/darwin/spack.yaml b/scripts/spack/configs/darwin/spack.yaml index e1847d10c..c58d29036 100644 --- a/scripts/spack/configs/darwin/spack.yaml +++ b/scripts/spack/configs/darwin/spack.yaml @@ -220,5 +220,5 @@ spack: py-sphinx: buildable: false externals: - - spec: py-sphinx@7.4.7 + - spec: py-sphinx@7.4.7 ^python prefix: /Users/chapman39/dev/smith/venv diff --git a/scripts/spack/configs/docker/ubuntu24/spack.yaml b/scripts/spack/configs/docker/ubuntu24/spack.yaml index 4fc3866c0..9cf10369e 100644 --- a/scripts/spack/configs/docker/ubuntu24/spack.yaml +++ b/scripts/spack/configs/docker/ubuntu24/spack.yaml @@ -68,6 +68,12 @@ spack: tbb: [intel-tbb] jpeg: [libjpeg-turbo, libjpeg] + # Prevent building other blas/ lapack providers + amdblis: + buildable: false + amdlibflame: + buildable: false + # Compiler packages gcc: externals: @@ -126,8 +132,8 @@ spack: cuda: buildable: false externals: - - spec: cuda@12.5.82 - prefix: /usr/local/cuda-12.5 + - spec: cuda@12.5.82 + prefix: /usr/local/cuda-12.5 curl: buildable: false externals: @@ -206,10 +212,10 @@ spack: # Globally lock in version of CMake cmake: - version: [3.23.1] + version: [3.24.2] buildable: false externals: - - spec: cmake@3.23.1 + - spec: cmake@3.24.2 prefix: /usr/local doxygen: version: [1.9.8] @@ -221,7 +227,7 @@ spack: version: [4.3.2] buildable: false externals: - - spec: py-sphinx@4.3.2 + - spec: py-sphinx@4.3.2 ^python prefix: /usr cppcheck: version: [2.13.0] 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 b87886244..15962a9da 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib/spack.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib/spack.yaml @@ -269,11 +269,11 @@ spack: # Lock in versions of Devtools cmake: - version: [3.23.1] buildable: false externals: - - spec: cmake@3.23.1 - prefix: /usr/tce + - spec: cmake@3.30.5 + modules: + - cmake/3.30.5 cppcheck: version: [2.9] buildable: false @@ -286,17 +286,11 @@ spack: externals: - spec: doxygen@1.9.8 prefix: /usr/workspace/smithdev/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.8 - py-ats: - version: [7.0.105] - buildable: false - externals: - - spec: py-ats@7.0.105 - prefix: /usr/workspace/smithdev/devtools/toss_4_x86_64_ib/latest/python-3.11.7 py-sphinx: version: [7.2.6] buildable: false externals: - - spec: py-sphinx@7.2.6 + - spec: py-sphinx@7.2.6 ^python prefix: /usr/workspace/smithdev/devtools/toss_4_x86_64_ib/latest/python-3.11.7 python: buildable: false diff --git a/scripts/spack/configs/toss_4_x86_64_ib_cray/spack.yaml b/scripts/spack/configs/toss_4_x86_64_ib_cray/spack.yaml index ef8eb19ec..05d3ecb67 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib_cray/spack.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib_cray/spack.yaml @@ -316,8 +316,9 @@ spack: cmake: buildable: false externals: - - spec: cmake@3.24.2 - prefix: /usr/tce + - spec: cmake@3.29.2 + modules: + - cmake/3.29.2 python: buildable: false externals: diff --git a/scripts/spack/configs/versions.yaml b/scripts/spack/configs/versions.yaml index d82034f47..8a425e262 100644 --- a/scripts/spack/configs/versions.yaml +++ b/scripts/spack/configs/versions.yaml @@ -2,7 +2,7 @@ packages: axom: require: - - spec: "@0.12.0.0" + - spec: "@0.12.0.1" adiak: require: - spec: "@0.4.1" @@ -17,7 +17,7 @@ packages: - spec: "@0.9.5" mfem: require: - - spec: "@4.9.0.2" + - spec: "@4.9.0.3" petsc: require: - spec: "@3.21.6" @@ -26,10 +26,10 @@ packages: - spec: "@2025.09.0" sundials: require: - - spec: "@6.7.0" + - spec: "@7.5.0" tribol: require: - - spec: "@0.1.0.23" + - spec: "@0.1.0.24" umpire: require: - spec: "@2025.09.0" diff --git a/scripts/spack/radiuss-spack-configs b/scripts/spack/radiuss-spack-configs deleted file mode 160000 index b39030f68..000000000 --- a/scripts/spack/radiuss-spack-configs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b39030f680263f6c15c7dfe510fa6ffdb9482136 diff --git a/scripts/spack/spack_repo/smith/packages/axom/package.py b/scripts/spack/spack_repo/smith/packages/axom/package.py index 143bba51b..360104322 100644 --- a/scripts/spack/spack_repo/smith/packages/axom/package.py +++ b/scripts/spack/spack_repo/smith/packages/axom/package.py @@ -3,713 +3,17 @@ # # SPDX-License-Identifier: (BSD-3-Clause) -# NOTE: Axom's Spack package in the Spack packages repo isn't as up to date as in Axom itself. Specifically, we needed this change: -# https://github.com/LLNL/axom/blob/515b9bdec47886d19505533ccbdb1c37177d05f2/scripts/spack/packages/axom/package.py#L368 -# TODO: revert to inherited package once this change is in the Spack package repo - -import os -import shutil -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, - cmake_cache_path, - cmake_cache_string, -) -from spack_repo.builtin.build_systems.cuda import CudaPackage -from spack_repo.builtin.build_systems.rocm import ROCmPackage - -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. - """ - - if not use_bin: - path = spec[package_name].prefix - else: - path = spec[package_name].prefix.bin - - path = os.path.realpath(path) +from spack_repo.builtin.packages.axom.package import Axom as BuiltinAxom - for key in path_replacements: - path = path.replace(key, path_replacements[key]) - - return path - - -class Axom(CachedCMakePackage, CudaPackage, ROCmPackage): +class Axom(BuiltinAxom): """Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.""" - maintainers("white238") - homepage = "https://github.com/LLNL/axom" git = "https://github.com/LLNL/axom.git" - tags = ["radiuss"] - test_requires_compiler = True - - license("BSD-3-Clause") - - # SMITH_EDIT_START # Note: Make sure this sha coincides with the git submodule # Note: We add a number to the end of the real version number to indicate that we have - # moved forward past the release. Increment the last number when updating the commit sha. - version("0.12.0.0", commit="297544010a3dfb98145a1a85f09f9c648c00a18c", submodules=False) - # SMITH_EDIT_END - - version("main", branch="main") - version("develop", branch="develop") - version("0.12.0", tag="v0.12.0", commit="297544010a3dfb98145a1a85f09f9c648c00a18c") - version("0.11.0", tag="v0.11.0", commit="685960486aa55d3a74a821ee02f6d9d9a3e67ab1") - version("0.10.1", tag="v0.10.1", commit="6626ee1c5668176fb64dd9a52dec3e8596b3ba6b") - version("0.10.0", tag="v0.10.0", commit="ea853a34a834415ea75f824160fc44cba9a0755d") - version("0.9.0", tag="v0.9.0", commit="5f531595d941d16fa3b8583bfc347a845d9feb6d") - version("0.8.1", tag="v0.8.1", commit="0da8a5b1be596887158ac2fcd321524ba5259e15") - version("0.8.0", tag="v0.8.0", commit="71fab3262eb7e1aa44a04c21d072b77f06362f7b") - version("0.7.0", tag="v0.7.0", commit="ea5158191181c137117ae37959879bdc8b107f35") - version("0.6.1", tag="v0.6.1", commit="ee240d3963d7879ae0e9c392902195bd7b04e37d") - version("0.6.0", tag="v0.6.0", commit="65287dc00bc7c271a08cb86c632f5909c30e3506") - version("0.5.0", tag="v0.5.0", commit="db137349b3e28617c3e0570dbd18e4a91654da98") - version("0.4.0", tag="v0.4.0", commit="38c0d7495ece35a30fca5f5b578b8f9d54346bd2") - version("0.3.3", tag="v0.3.3", commit="f0539ef0525469ffda054d86144f310c15b4f9e0") - version("0.3.2", tag="v0.3.2", commit="c446b496e20e6118b8cba7e80f1f84c76a49e463") - version("0.3.1", tag="v0.3.1", commit="cbefc0457a229d8acfb70622360d0667e90e50a2") - 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") - - # SMITH_EDIT_START - # https://github.com/spack/spack/issues/31829 - # patch("examples-oneapi.patch", when="@0.6.1 +examples %oneapi") - - # patch("scr_examples_gtest.patch", when="@0.6.0:0.6.1") - # patch("umpire_camp_blt_targets.patch", when="@=0.8.0 ^umpire@2023.06.0") - # SMITH_EDIT_END - - root_cmakelists_dir = "src" - - # ----------------------------------------------------------------------- - # Variants - # ----------------------------------------------------------------------- - variant("shared", default=True, description="Enable build of shared libraries") - - variant("examples", default=True, description="Build examples") - variant("tools", default=True, description="Build tools") - - # Hard requirement after Axom 0.6.1 - variant("cpp14", default=True, description="Build with C++14 support") - - variant("fortran", default=True, description="Build with Fortran support") - - variant("python", default=False, description="Build python support") - - variant("mpi", default=True, description="Build MPI support") - variant("openmp", default=True, description="Turn on OpenMP support.") - - variant( - "profiling", - default=False, - when="@develop", - description="Build with hooks for Adiak/Caliper performance analysis", - ) - - variant("c2c", default=False, description="Build with c2c") - variant("opencascade", default=False, description="Build with opencascade") - - variant("mfem", default=False, description="Build with mfem") - variant("hdf5", default=True, description="Build with hdf5") - variant("lua", default=True, description="Build with Lua") - variant("scr", default=False, description="Build with SCR") - variant("umpire", default=True, description="Build with umpire") - - variant("raja", default=True, description="Build with raja") - - varmsg = "Build development tools (such as Sphinx, Doxygen, etc...)" - variant("devtools", default=False, description=varmsg) - - # ----------------------------------------------------------------------- - # Dependencies - # ----------------------------------------------------------------------- - # Basics - 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") - - depends_on("blt", type="build") - depends_on("blt@0.5.1:0.5.3", type="build", when="@0.6.1:0.8") - depends_on("blt@0.6.2:", type="build", when="@0.9:") - - depends_on("mpi", when="+mpi") - - # Libraries - # Forward variants to Conduit - for _var in ["fortran", "hdf5", "mpi", "python"]: - depends_on("conduit+{0}".format(_var), when="+{0}".format(_var)) - depends_on("conduit~{0}".format(_var), when="~{0}".format(_var)) - - depends_on("conduit+python", when="+devtools") - depends_on("conduit~python", when="~devtools") - - depends_on("hdf5", when="+hdf5") - - depends_on("lua", when="+lua") - - depends_on("scr", when="+scr") - depends_on("scr~fortran", when="+scr~fortran") - - with when("+umpire"): - depends_on("umpire") - depends_on("umpire@2025.09.0:", when="@0.10:") - depends_on("umpire@2024.02.0:", when="@0.9:") - depends_on("umpire@2022.03.0:2023.06", when="@0.7.0:0.8") - depends_on("umpire@6.0.0", when="@0.6.0") - depends_on("umpire@5:5.0.1", when="@:0.5.0") - depends_on("umpire+openmp", when="+openmp") - depends_on("umpire+mpi3_shmem", when="+mpi") - - with when("+raja"): - depends_on("raja") - depends_on("raja@2025.09.0:", when="@0.10:") - depends_on("raja@2024.02.0:", when="@0.9:") - depends_on("raja@2022.03.0:2023.06", when="@0.7.0:0.8") - depends_on("raja@0.14.0", when="@0.6.0") - depends_on("raja@:0.13.0", when="@:0.5.0") - depends_on("raja~openmp", when="~openmp") - depends_on("raja+openmp", when="+openmp") - - with when("+profiling"): - depends_on("adiak") - depends_on("caliper+adiak~papi") - - depends_on("caliper+cuda", when="+cuda") - depends_on("caliper~cuda", when="~cuda") - - depends_on("caliper+rocm", when="+rocm") - depends_on("caliper~rocm", when="~rocm") - - for dep in ["adiak", "caliper"]: - depends_on(f"{dep}+mpi", when="+mpi") - depends_on(f"{dep}~mpi", when="~mpi") - depends_on(f"{dep}+shared", when="+shared") - depends_on(f"{dep}~shared", when="~shared") - - for val in CudaPackage.cuda_arch_values: - ext_cuda_dep = f"+cuda cuda_arch={val}" - depends_on(f"raja {ext_cuda_dep}", when=f"+raja {ext_cuda_dep}") - depends_on(f"umpire {ext_cuda_dep}", when=f"+umpire {ext_cuda_dep}") - depends_on(f"caliper {ext_cuda_dep}", when=f"+profiling {ext_cuda_dep}") - depends_on(f"mfem {ext_cuda_dep}", when=f"+mfem {ext_cuda_dep}") - - for val in ROCmPackage.amdgpu_targets: - ext_rocm_dep = f"+rocm amdgpu_target={val}" - depends_on(f"raja {ext_rocm_dep}", when=f"+raja {ext_rocm_dep}") - depends_on(f"umpire {ext_rocm_dep}", when=f"+umpire {ext_rocm_dep}") - depends_on(f"caliper {ext_rocm_dep}", when=f"+profiling {ext_rocm_dep}") - depends_on(f"mfem {ext_rocm_dep}", when=f"+mfem {ext_rocm_dep}") - - depends_on("rocprim", when="+rocm") - - depends_on("c2c", when="+c2c") - depends_on("opencascade", when="+opencascade") - - with when("+mfem"): - depends_on("mfem+mpi", when="+mpi") - depends_on("mfem~mpi", when="~mpi") - depends_on("mfem@4.5.0:", when="@0.7.0:") - - depends_on("python", when="+python") - - # Devtools - with when("+devtools"): - depends_on("cppcheck") - depends_on("doxygen") - depends_on("graphviz") - depends_on("python") - depends_on("py-sphinx") - depends_on("py-shroud") - depends_on("py-pytest") - depends_on("py-jsonschema") - - # Need clang@19 for clang-format - # (ENABLE_CLANGFORMAT will be OFF if not the exact version) - depends_on("llvm+clang@19", type="build") - - # ----------------------------------------------------------------------- - # Conflicts - # ----------------------------------------------------------------------- - # Hard requirement after Axom 0.6.1 - conflicts("~cpp14", when="@0.6.2:") - - # Conduit's cmake config files moved and < 0.4.0 can't find it - conflicts("^conduit@0.7.2:", when="@:0.4.0") - - # Sidre requires conduit_blueprint_mpi.hpp - conflicts("^conduit@:0.6.0", when="@0.5.0:") - - conflicts("+openmp", when="+rocm") - conflicts("+cuda", when="+rocm") - - conflicts("~raja", when="+cuda") - conflicts("~raja", when="+rocm") - conflicts("~umpire", when="+cuda") - conflicts("~umpire", when="+rocm") - - conflicts("^blt@:0.3.6", when="+rocm") - - def flag_handler(self, name, flags): - if self.spec.satisfies("%cce") and name == "fflags": - flags.append("-ef") - - if name in ("cflags", "cxxflags", "cppflags", "fflags"): - return (None, None, None) # handled in the cmake cache - return (flags, None, None) - - def _get_sys_type(self, spec): - sys_type = spec.architecture - # if on llnl systems, we can use the SYS_TYPE - if "SYS_TYPE" in env: - sys_type = env["SYS_TYPE"] - return sys_type - - def is_fortran_compiler(self, compiler): - if self.compiler.fc is not None and compiler in self.compiler.fc: - return True - return False - - @property - def cache_name(self): - hostname = socket.gethostname() - if "SYS_TYPE" in env: - # Are we on a LLNL system then strip node number - hostname = hostname.rstrip("1234567890") - special_case = "" - if self.spec.satisfies("+cuda"): - special_case += "_cuda" - if self.spec.satisfies("~fortran"): - special_case += "_nofortran" - if self.spec.satisfies("+rocm"): - special_case += "_hip" - return "{0}-{1}-{2}@{3}{4}.cmake".format( - hostname, - self._get_sys_type(self.spec), - self.spec.compiler.name, - self.spec.compiler.version, - special_case, - ) - - def initconfig_compiler_entries(self): - spec = self.spec - entries = super().initconfig_compiler_entries() - - if spec.satisfies("+fortran"): - entries.append(cmake_cache_option("ENABLE_FORTRAN", True)) - if self.is_fortran_compiler("gfortran") and "clang" in self.compiler.cxx: - libdir = pjoin(os.path.dirname(os.path.dirname(self.compiler.cxx)), "lib") - flags = "" - for _libpath in [libdir, libdir + "64"]: - if os.path.exists(_libpath): - if spec.satisfies("^cuda"): - flags += " -Xlinker -rpath -Xlinker {0}".format(_libpath) - else: - flags += " -Wl,-rpath,{0}".format(_libpath) - description = "Adds a missing libstdc++ rpath" - if flags: - entries.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS", flags, description)) - else: - entries.append(cmake_cache_option("ENABLE_FORTRAN", False)) - - if spec.satisfies("+cpp14") and spec.satisfies("@:0.6.1"): - entries.append(cmake_cache_string("BLT_CXX_STD", "c++14", "")) - - # Add optimization flag workaround for builds with cray compiler - if spec.satisfies("%cce"): - entries.append(cmake_cache_string("CMAKE_CXX_FLAGS_DEBUG", "-O1 -g")) - - # Remove unusable -Mfreeform flag injected by spack - entries = [entry.replace("-Mfreeform", "") for entry in entries] - - # Disable intrusive warning: - # icpx: remark: note that use of '-g' without any optimization-level - # option will turn off most compiler optimizations similar to use of - # '-O0'; use '-Rno-debug-disables-optimization' to disable this remark - if spec.satisfies("%oneapi"): - entries.append(cmake_cache_string("CMAKE_CXX_FLAGS_DEBUG", "-g -Rno-debug-disables-optimization")) - - return entries - - def initconfig_hardware_entries(self): - spec = self.spec - entries = super().initconfig_hardware_entries() - - if spec.satisfies("+cuda"): - entries.append(cmake_cache_option("ENABLE_CUDA", True)) - entries.append(cmake_cache_option("CMAKE_CUDA_SEPARABLE_COMPILATION", True)) - - # CUDA_FLAGS - cudaflags = "${CMAKE_CUDA_FLAGS} -restrict --expt-extended-lambda " - - # Pass through any cxxflags to the host compiler via nvcc's Xcompiler flag - host_cxx_flags = spec.compiler_flags["cxxflags"] - cudaflags += " ".join(["-Xcompiler=%s " % flag for flag in host_cxx_flags]) - - if spec.satisfies("^blt@:0.5.1"): - # This is handled internally by BLT now - if spec.satisfies("+cpp14"): - cudaflags += " -std=c++14" - else: - cudaflags += " -std=c++11" - entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", cudaflags, force=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("#------------------{0}\n".format("-" * 60)) - entries.append("# Axom ROCm specifics\n") - entries.append("#------------------{0}\n\n".format("-" * 60)) - - entries.append(cmake_cache_option("ENABLE_HIP", True)) - - hip_link_flags = "" - - rocm_root = os.path.dirname(spec["llvm-amdgpu"].prefix) - entries.append(cmake_cache_path("ROCM_ROOT_DIR", rocm_root)) - - # Recommended MPI flags - hip_link_flags += "-lxpmem " - hip_link_flags += "-L/opt/cray/pe/mpich/{0}/gtl/lib ".format(spec["mpi"].version.up_to(3)) - hip_link_flags += "-Wl,-rpath,/opt/cray/pe/mpich/{0}/gtl/lib ".format( - spec["mpi"].version.up_to(3) - ) - hip_link_flags += "-lmpi_gtl_hsa " - - # SMITH EDIT START - # We need these even if no fortran - if spec.satisfies("^hip@6.0.0:"): - hip_link_flags += "-L{0}/lib/llvm/lib -Wl,-rpath,{0}/lib/llvm/lib ".format(rocm_root) - else: - hip_link_flags += "-L{0}/llvm/lib -Wl,-rpath,{0}/llvm/lib ".format(rocm_root) - # Only amdclang requires this path; cray compiler fails if this is included - if spec.satisfies("%llvm-amdgpu"): - hip_link_flags += "-L{0}/lib -Wl,-rpath,{0}/lib ".format(rocm_root) - hip_link_flags += "-lpgmath -lompstub " - - # Fixes for mpi for rocm until wrapper paths are fixed - # These flags are already part of the wrapped compilers on TOSS4 systems - if spec.satisfies("+fortran") and self.is_fortran_compiler("amdflang"): - hip_link_flags += "-Wl,--disable-new-dtags " - hip_link_flags += "-lflang -lflangrti " - # SMITH EDIT END - - # Additional library path for cray compiler - if self.spec.satisfies("%cce"): - hip_link_flags += "-L/opt/cray/pe/cce/{0}/cce/x86_64/lib -Wl,-rpath,/opt/cray/pe/cce/{0}/cce/x86_64/lib ".format( - self.spec.compiler.version - ) - - # Remove extra link library for crayftn - if spec.satisfies("+fortran") and self.is_fortran_compiler("crayftn"): - entries.append( - cmake_cache_string("BLT_CMAKE_IMPLICIT_LINK_LIBRARIES_EXCLUDE", "unwind") - ) - - # Additional libraries for TOSS4 - hip_link_flags += "-lamdhip64 -lhsakmt -lhsa-runtime64 -lamd_comgr " - - entries.append(cmake_cache_string("CMAKE_EXE_LINKER_FLAGS", hip_link_flags)) - - entries.append("#------------------{0}".format("-" * 30)) - entries.append("# Hardware Specifics") - entries.append("#------------------{0}\n".format("-" * 30)) - - # OpenMP - entries.append(cmake_cache_option("ENABLE_OPENMP", spec.satisfies("+openmp"))) - - # Enable death tests - entries.append( - cmake_cache_option( - "ENABLE_GTEST_DEATH_TESTS", not spec.satisfies("+cuda target=ppc64le:") - ) - ) - - 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" - ) - - linker_flags = "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath," + libdir - - entries.append(cmake_cache_string("BLT_EXE_LINKER_FLAGS", linker_flags, description)) - - if spec.satisfies("+shared"): - linker_flags = "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath," + libdir - entries.append( - cmake_cache_string("CMAKE_SHARED_LINKER_FLAGS", linker_flags, description) - ) - - description = "Converts C-style comments to Fortran style in preprocessed files" - entries.append( - cmake_cache_string( - "BLT_FORTRAN_FLAGS", "-WF,-C! -qxlf2003=polymorphic", description - ) - ) - - if ( - spec.satisfies("+openmp") - and "clang" in self.compiler.cxx - and spec.satisfies("+fortran") - and self.is_fortran_compiler("xlf") - ): - openmp_gen_exp = ( - "$<$>:" - "-fopenmp=libomp>;$<$:-qsmp=omp>" - ) - - description = "Different OpenMP linker flag between CXX and Fortran" - entries.append( - cmake_cache_string("BLT_OPENMP_LINK_FLAGS", openmp_gen_exp, description) - ) - - if spec.satisfies("target=ppc64le:"): - # Fix for working around CMake adding implicit link directories - # returned by the BlueOS compilers to link executables with - # non-system default stdlib - _roots = ["/usr/tce/packages/gcc/gcc-4.9.3", "/usr/tce/packages/gcc/gcc-4.9.3/gnu"] - _subdirs = ["lib64", "lib64/gcc/powerpc64le-unknown-linux-gnu/4.9.3"] - _existing_paths = [] - for root in _roots: - for subdir in _subdirs: - _curr_path = pjoin(root, subdir) - if os.path.exists(_curr_path): - _existing_paths.append(_curr_path) - if _existing_paths: - entries.append( - cmake_cache_string( - "BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE", ";".join(_existing_paths) - ) - ) - - return entries - - def initconfig_mpi_entries(self): - spec = self.spec - entries = super().initconfig_mpi_entries() - - if spec.satisfies("+mpi"): - 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)) - - return entries - - def find_path_replacement(self, path1, path2, path_replacements, name, entries): - root = os.path.commonprefix([path1, path2]) - if root.endswith(os.path.sep): - root = root[: -len(os.path.sep)] - if root: - path_replacements[root] = "${" + name + "}" - entries.append(cmake_cache_path(name, root)) - - def initconfig_package_entries(self): - spec = self.spec - entries = [] - path_replacements = {} - - # TPL locations - entries.append("#------------------{0}".format("-" * 60)) - entries.append("# TPLs") - entries.append("#------------------{0}\n".format("-" * 60)) - - # Try to find the common prefix of the TPL directory. - # If found, we will use this in the TPL paths - path1 = os.path.realpath(spec["conduit"].prefix) - path2 = os.path.realpath(self.prefix) - self.find_path_replacement(path1, path2, path_replacements, "TPL_ROOT", entries) - - conduit_dir = get_spec_path(spec, "conduit", path_replacements) - entries.append(cmake_cache_path("CONDUIT_DIR", conduit_dir)) - - # optional tpls - for dep in ("c2c", "mfem", "hdf5", "lua", "raja", "umpire", "opencascade"): - if spec.satisfies("+%s" % dep): - dep_dir = get_spec_path(spec, dep, path_replacements) - entries.append(cmake_cache_path("%s_DIR" % dep.upper(), dep_dir)) - else: - entries.append("# %s not built\n" % dep.upper()) - - if spec.satisfies("+profiling"): - dep_dir = get_spec_path(spec, "adiak", path_replacements) - entries.append(cmake_cache_path("ADIAK_DIR", dep_dir)) - - dep_dir = get_spec_path(spec, "caliper", path_replacements) - entries.append(cmake_cache_path("CALIPER_DIR", dep_dir)) - - if spec.satisfies("+umpire") and spec.satisfies("^camp"): - dep_dir = get_spec_path(spec, "camp", path_replacements) - entries.append(cmake_cache_path("CAMP_DIR", dep_dir)) - - # SCR does not export it's targets so we need to pull in its dependencies - if spec.satisfies("+scr"): - dep_dir = get_spec_path(spec, "scr", path_replacements) - entries.append(cmake_cache_path("SCR_DIR", dep_dir)) - - # scr's dependencies - scr_deps = ( - "kvtree", - "dtcmp", - "spath", - "axl", - "lwgrp", - "er", - "rankstr", - "redset", - "shuffile", - "libyogrt", - ) - for dep in scr_deps: - if spec.satisfies("^{0}".format(dep)): - dep_dir = get_spec_path(spec, dep, path_replacements) - entries.append(cmake_cache_path("%s_DIR" % dep.upper(), dep_dir)) - else: - entries.append("# scr not built\n") - - ################################## - # Devtools - ################################## - - entries.append("#------------------{0}".format("-" * 60)) - entries.append("# Devtools") - entries.append("#------------------{0}\n".format("-" * 60)) - - # Add common prefix to path replacement list - if spec.satisfies("+devtools"): - # Grab common devtools root and strip the trailing slash - path1 = os.path.realpath(spec["cppcheck"].prefix) - path2 = os.path.realpath(spec["doxygen"].prefix) - self.find_path_replacement(path1, path2, path_replacements, "DEVTOOLS_ROOT", entries) - - if spec.satisfies("+devtools") and spec.satisfies("^llvm@19"): - clang_fmt_path = spec["llvm"].prefix.bin.join("clang-format") - entries.append(cmake_cache_path("CLANGFORMAT_EXECUTABLE", clang_fmt_path)) - else: - entries.append("# ClangFormat disabled since llvm@19 and devtools not in spec\n") - entries.append(cmake_cache_option("ENABLE_CLANGFORMAT", False)) - - if spec.satisfies("+python") or spec.satisfies("+devtools"): - python_bin_dir = get_spec_path(spec, "python", path_replacements, use_bin=True) - entries.append(cmake_cache_path("Python_EXECUTABLE", pjoin(python_bin_dir, "python3"))) - - if spec.satisfies("^py-jsonschema"): - jsonschema_dir = get_spec_path(spec, "py-jsonschema", path_replacements, use_bin=True) - jsonschema_path = os.path.join(jsonschema_dir, "jsonschema") - entries.append(cmake_cache_path("JSONSCHEMA_EXECUTABLE", jsonschema_path)) - - enable_docs = spec.satisfies("^doxygen") or spec.satisfies("^py-sphinx") - entries.append(cmake_cache_option("ENABLE_DOCS", enable_docs)) - - if spec.satisfies("^py-sphinx"): - sphinx_bin_dir = get_spec_path(spec, "py-sphinx", path_replacements, use_bin=True) - entries.append( - cmake_cache_path("SPHINX_EXECUTABLE", pjoin(sphinx_bin_dir, "sphinx-build")) - ) - - if spec.satisfies("^py-shroud"): - shroud_bin_dir = get_spec_path(spec, "py-shroud", path_replacements, use_bin=True) - entries.append(cmake_cache_path("SHROUD_EXECUTABLE", pjoin(shroud_bin_dir, "shroud"))) - - for dep in ("cppcheck", "doxygen"): - if spec.satisfies("^%s" % dep): - dep_bin_dir = get_spec_path(spec, dep, path_replacements, use_bin=True) - entries.append( - cmake_cache_path("%s_EXECUTABLE" % dep.upper(), pjoin(dep_bin_dir, dep)) - ) - - return entries - - def cmake_args(self): - options = [] - - options.append("-DBLT_SOURCE_DIR:PATH={0}".format(self.spec["blt"].prefix)) - - if self.run_tests is False: - options.append("-DENABLE_TESTS=OFF") - else: - options.append("-DENABLE_TESTS=ON") - - options.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared")) - options.append(self.define_from_variant("AXOM_ENABLE_EXAMPLES", "examples")) - options.append(self.define_from_variant("AXOM_ENABLE_TOOLS", "tools")) - if self.spec.satisfies("~raja") or self.spec.satisfies("+umpire"): - options.append("-DAXOM_ENABLE_MIR:BOOL=OFF") - - return options - - def patch(self): - if self.spec.satisfies("%cce"): - filter_file( - "PROPERTIES LINKER_LANGUAGE CXX", - 'PROPERTIES LINKER_LANGUAGE CXX \n LINK_FLAGS "-fopenmp"', - "src/axom/quest/examples/CMakeLists.txt", - ) - - @run_after("build") - @on_package_attributes(run_tests=True) - def build_test(self): - with working_dir(self.build_directory): - print("Running Axom Unit Tests...") - make("test") - - @run_after("install") - @on_package_attributes(run_tests=True) - def test_install_using_cmake(self): - """build example with cmake and run""" - example_src_dir = join_path(self.prefix.examples.axom, "using-with-cmake") - example_stage_dir = "./cmake" - shutil.copytree(example_src_dir, example_stage_dir) - with working_dir(join_path(example_stage_dir, "build"), create=True): - cmake_args = ["-C ../host-config.cmake", example_src_dir] - cmake = self.spec["cmake"].command - cmake(*cmake_args) - make() - example = Executable("./example") - example() - make("clean") - - @run_after("install") - @on_package_attributes(run_tests=True) - def test_install_using_make(self): - """build example with make and run""" - example_src_dir = join_path(self.prefix.examples.axom, "using-with-make") - example_stage_dir = "./make" - shutil.copytree(example_src_dir, example_stage_dir) - with working_dir(example_stage_dir, create=True): - make(f"AXOM_DIR={self.prefix}") - example = Executable("./example") - example() - make("clean") + # moved forward past the release. Increment the last number when updating the commit sha. + version("0.12.0.1", commit="52ef76c55c9f1651c71e795b0b27723033209fe5", submodules=True, preferred=True) diff --git a/scripts/spack/spack_repo/smith/packages/conduit/package.py b/scripts/spack/spack_repo/smith/packages/conduit/package.py deleted file mode 100644 index 4281f74d4..000000000 --- a/scripts/spack/spack_repo/smith/packages/conduit/package.py +++ /dev/null @@ -1,11 +0,0 @@ -import os - -from spack.package import * -from spack_repo.builtin.packages.conduit.package import Conduit as BuiltinConduit - -# TODO Remove this file and upgrade to new spack-packages repo - -class Conduit(BuiltinConduit): - version("0.9.5", sha256="d93294efbf0936da5a27941e13486aa1a04a74a59285786a2303eed19a24265a") - version("0.9.4", sha256="c9edfb2ff09890084313ad9c2d83bfb7c10e70b696980762d1ae1488f9f08e6c") - version("0.9.3", sha256="2968fa8df6e6c43800c019a008ef064ee9995dc2ff448b72dc5017c188a2e6d4") diff --git a/scripts/spack/spack_repo/smith/packages/enzyme/package.py b/scripts/spack/spack_repo/smith/packages/enzyme/package.py index 1329308d5..fd3afb96b 100644 --- a/scripts/spack/spack_repo/smith/packages/enzyme/package.py +++ b/scripts/spack/spack_repo/smith/packages/enzyme/package.py @@ -28,6 +28,7 @@ class Enzyme(CMakePackage): root_cmakelists_dir = "enzyme" version("main", branch="main") + version("0.0.206", sha256="600fd2db370fb40abb6411e0e80df524aea03f2c1ad50a2765ecaab9e1115c77") version("0.0.196", sha256="2b9cfcb7c34e56fc8191423042df06241cf32928eefbb113ac3c5199e3361cb2") version("0.0.186", sha256="125e612df0b6b82b07e1e13218c515bc54e04aa1407e57f4f31d3abe995f4714") version("0.0.180", sha256="d65a8e889413bb9518da00d65524c07352f1794b55c163f0db6828844c779ed4") diff --git a/scripts/spack/spack_repo/smith/packages/llvm-amdgpu/package.py b/scripts/spack/spack_repo/smith/packages/llvm_amdgpu/package.py similarity index 62% rename from scripts/spack/spack_repo/smith/packages/llvm-amdgpu/package.py rename to scripts/spack/spack_repo/smith/packages/llvm_amdgpu/package.py index 93dd170db..ce29615a0 100644 --- a/scripts/spack/spack_repo/smith/packages/llvm-amdgpu/package.py +++ b/scripts/spack/spack_repo/smith/packages/llvm_amdgpu/package.py @@ -7,15 +7,9 @@ from spack.package import * from spack_repo.builtin.packages.llvm_amdgpu.package import LlvmAmdgpu as BuiltinLlvmAmdgpu +# NOTE: We can remove this once/ if we switch to ROCm 7+ https://github.com/spack/spack-packages/pull/1655 + class LlvmAmdgpu(BuiltinLlvmAmdgpu): # PR that adds this change is pending: https://github.com/spack/spack-packages/pull/1557 provides("fortran") - - # Fix from slack: - # https://spackpm.slack.com/archives/C08Q62S7XEX/p1751072888930439?thread_ts=1750704656.170759&cid=C08Q62S7XEX - compiler_wrapper_link_paths = { - "c": "rocmcc/amdclang", - "cxx": "rocmcc/amdclang++", - "fortran": "rocmcc/amdflang" - } diff --git a/scripts/spack/spack_repo/smith/packages/mfem/package.py b/scripts/spack/spack_repo/smith/packages/mfem/package.py index 5290a2993..c2d349daf 100644 --- a/scripts/spack/spack_repo/smith/packages/mfem/package.py +++ b/scripts/spack/spack_repo/smith/packages/mfem/package.py @@ -11,8 +11,7 @@ class Mfem(BuiltinMfem): # Note: Make sure this sha coincides with the git submodule # Note: We add a number to the end of the real version number to indicate that we have # moved forward past the release. Increment the last number when updating the commit sha. - # Note: MFEM is not at 4.9, but 4.9 is required to enable enzyme in the spack package - version("4.9.0.2", commit="563cd25971f1f86e72168fdc022a2472d08b4661") + version("4.9.0.3", commit="5731d2f22bed549639a4d41895479ae698849afc") variant('asan', default=False, description='Add Address Sanitizer flags') @@ -49,40 +48,3 @@ def setup_build_environment(self, env): if '+debug' in self.spec: env.append_flags(flag, "-fno-optimize-sibling-calls") - - # Override hypre make options to include extra rocm libs... - # TODO remove once this PR merges into Spack https://github.com/spack/spack-packages/pull/2363 - def get_make_config_options(self, spec, prefix): - options = BuiltinMfem.get_make_config_options(self, spec, prefix) - - # Remove old options - options[:] = [opt for opt in options if "HYPRE_OPT" not in opt and "HYPRE_LIB" not in opt] - - # We need to add rpaths explicitly to allow proper export of link flags - # from within MFEM. We use the following two functions to do that. - ld_flags_from_library_list = self.ld_flags_from_library_list - - if "+mpi" in spec: - hypre = spec["hypre"] - all_hypre_libs = hypre.libs - - hypre_gpu_libs = "" - if "+rocm" in hypre: - hypre_rocm_libs = LibraryList([]) - if "^rocsparse" in hypre: - hypre_rocm_libs += hypre["rocsparse"].libs - if "^rocrand" in hypre: - hypre_rocm_libs += hypre["rocrand"].libs - # https://github.com/spack/spack-packages/pull/2363 - if hypre.version >= Version("2.29.0"): - if "^rocsolver" in hypre: - hypre_rocm_libs += hypre["rocsolver"].libs - if "^rocblas" in hypre: - hypre_rocm_libs += hypre["rocblas"].libs - hypre_gpu_libs = " " + ld_flags_from_library_list(hypre_rocm_libs) - options += [ - "HYPRE_OPT=-I%s" % hypre.prefix.include, - "HYPRE_LIB=%s%s" % (ld_flags_from_library_list(all_hypre_libs), hypre_gpu_libs), - ] - - return options diff --git a/scripts/spack/spack_repo/smith/packages/petsc/package.py b/scripts/spack/spack_repo/smith/packages/petsc/package.py index d8491ff94..ea6bbed93 100644 --- a/scripts/spack/spack_repo/smith/packages/petsc/package.py +++ b/scripts/spack/spack_repo/smith/packages/petsc/package.py @@ -6,9 +6,11 @@ from spack.package import * from spack_repo.builtin.packages.petsc.package import Petsc as BuiltinPetsc +# TODO remove this file once this PR merges https://github.com/spack/spack-packages/pull/2779 + class Petsc(BuiltinPetsc): """Petsc""" - # Fixes the following: # segmentedmempool.hpp(178): error: expression must be a modifiable lvalue - patch("petsc_modifiable_lvalue.patch", when="@3.21.6") + # https://gitlab.com/petsc/petsc/-/merge_requests/8152 + patch("petsc_modifiable_lvalue.patch", when="@3.21.6:3.22.4+cuda") diff --git a/scripts/spack/spack_repo/smith/packages/smith/package.py b/scripts/spack/spack_repo/smith/packages/smith/package.py index 8a92dde53..f2e665935 100644 --- a/scripts/spack/spack_repo/smith/packages/smith/package.py +++ b/scripts/spack/spack_repo/smith/packages/smith/package.py @@ -58,7 +58,8 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): # ----------------------------------------------------------------------- # Variants # ----------------------------------------------------------------------- - variant("shared", default=False, + # variants for build settings + variant("shared", default=False, description="Enable build of shared libraries") variant("asan", default=False, description="Enable Address Sanitizer flags") @@ -68,25 +69,27 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): varmsg = "Build development tools (such as Sphinx, CppCheck, ClangFormat, etc...)" variant("devtools", default=False, description=varmsg) - variant("profiling", default=False, - description="Build with hooks for Adiak/Caliper performance analysis") - - variant("enzyme", default=True, sticky=True, + # variants for package dependencies + variant("adiak", default=False, sticky=True, + description="Build with adiak") + variant("caliper", default=False, sticky=True, + description="Build with caliper") + variant("enzyme", default=False, sticky=True, description="Enable Enzyme Automatic Differentiation Framework") variant("petsc", default=True, sticky=True, description="Enable PETSc support") - variant("slepc", default=True, sticky=True, + variant("raja", default=True, sticky=True, + description="Build with portable kernel execution support") + variant("slepc", default=True, sticky=True, description="Enable SLEPc integration") + variant("strumpack", default=True, sticky=True, + description="Build MFEM TPL with Strumpack, a direct linear solver library") variant("sundials", default=True, sticky=True, description="Build MFEM TPL with SUNDIALS nonlinear/ODE solver support") - variant("umpire", default=True, sticky=True, - description="Build with portable memory access support") - variant("raja", default=True, sticky=True, - description="Build with portable kernel execution support") variant("tribol", default=True, sticky=True, description="Build Tribol, an interface physics library") - variant("strumpack", default=True, sticky=True, - description="Build MFEM TPL with Strumpack, a direct linear solver library") + variant("umpire", default=True, sticky=True, + description="Build with portable memory access support") # ----------------------------------------------------------------------- # Dependencies @@ -117,8 +120,7 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("py-sphinx") with when("+sundials"): - # Going to sundials@7: causes 80%+ test failures - depends_on("sundials@:6.999") + depends_on("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: @@ -144,7 +146,7 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("hypre@2.26.0:~superlu-dist+mpi") with when("+petsc"): - depends_on("petsc~mmg") + depends_on("petsc~mmg+metis") depends_on("petsc+strumpack", when="+strumpack") depends_on("petsc~strumpack", when="~strumpack") depends_on("petsc+openmp", when="+openmp") @@ -191,9 +193,9 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("conduit~python~test~silo") - with when("+profiling"): - depends_on("adiak+mpi") - depends_on("caliper+mpi+adiak~papi") + depends_on("adiak+mpi", when="+adiak") + depends_on("caliper+mpi~papi", when="+caliper") + depends_on("caliper+adiak", when="+caliper+adiak") depends_on("superlu-dist@8.1.2") @@ -226,14 +228,14 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): 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="+profiling build_type=Debug") - depends_on("adiak+shared".format(dep), when="+profiling+shared") - depends_on("adiak~shared".format(dep), when="+profiling~shared") + 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="+profiling build_type=Debug") - depends_on("caliper+shared".format(dep), when="+profiling+shared") - depends_on("caliper~shared".format(dep), when="+profiling~shared~rocm") + 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"]: @@ -322,7 +324,7 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on(f"hypre {ext_cuda_dep}", when=f"{ext_cuda_dep}") # optional - depends_on(f"caliper {ext_cuda_dep}", when=f"+profiling {ext_cuda_dep}") + 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}") @@ -336,10 +338,6 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): conflicts("amdgpu_target=none", when="+rocm", msg="AMD GPU target is required when building with ROCm") - with when("+profiling"): - depends_on("caliper+rocm", when="+rocm") - depends_on("caliper~rocm", when="~rocm") - for val in ROCmPackage.amdgpu_targets: ext_rocm_dep = f"+rocm amdgpu_target={val}" @@ -349,7 +347,7 @@ class Smith(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on(f"hypre+umpire {ext_rocm_dep}", when=f"{ext_rocm_dep}") # optional - depends_on(f"caliper {ext_rocm_dep}", when=f"+profiling {ext_rocm_dep}") + 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}") diff --git a/scripts/spack/spack_repo/smith/packages/tribol/package.py b/scripts/spack/spack_repo/smith/packages/tribol/package.py index 2ba436612..45d50b33a 100644 --- a/scripts/spack/spack_repo/smith/packages/tribol/package.py +++ b/scripts/spack/spack_repo/smith/packages/tribol/package.py @@ -52,7 +52,7 @@ class Tribol(CachedCMakePackage, CudaPackage, ROCmPackage): # SMITH EDIT START # Note: We add a number to the end of the real version number to indicate that we have # moved forward past the release. Increment the last number when updating the commit sha. - version("0.1.0.23", commit="04ab0220f54e074ecaf785ad2a607433993edb96", submodules=True, preferred=True) + version("0.1.0.24", commit="9f9d4d6fc8735106e9118992ed11a9188249962a", submodules=True, preferred=True) depends_on("c", type="build") depends_on("cxx", type="build") diff --git a/scripts/spack/specs.json b/scripts/spack/specs.json index 20ec605bf..79a8d18f1 100644 --- a/scripts/spack/specs.json +++ b/scripts/spack/specs.json @@ -14,15 +14,15 @@ "__comment__":"##############################################################################", "toss_4_x86_64_ib": - [ "+devtools+profiling+enzyme %clang_19", - "+devtools+profiling~enzyme %gcc_13" ], + [ "+devtools+adiak+caliper+enzyme %clang_19", + "+devtools+adiak+caliper~enzyme %gcc_13" ], "toss_4_x86_64_ib_cray": - [ "~devtools+profiling~openmp+rocm~petsc~slepc~enzyme~sundials amdgpu_target=gfx942,gfx90a %rocm_6_4_2"], + [ "~devtools+adiak+caliper~openmp+rocm~petsc~slepc~enzyme~sundials amdgpu_target=gfx942,gfx90a %rocm_6_4_2"], "blueos_3_ppc64le_ib_p9": - [ "+devtools+cuda+profiling~strumpack %clang_gfortran cuda_arch=70" ], + [ "+devtools+cuda+adiak+caliper~strumpack %clang_gfortran cuda_arch=70" ], "macos_sonoma_aarch64": - [ "+devtools+profiling+enzyme~openmp %clang_19" ] + [ "+devtools+adiak+caliper+enzyme~openmp %clang_19" ] } diff --git a/scripts/uberenv b/scripts/uberenv index bec05e20b..bf2f438fc 160000 --- a/scripts/uberenv +++ b/scripts/uberenv @@ -1 +1 @@ -Subproject commit bec05e20bf2a1634d97ead358a9072c36f1fdcac +Subproject commit bf2f438fc1fe97bb8290a11e5d4f2d56085b4ee3 diff --git a/src/smith/infrastructure/application_manager.cpp b/src/smith/infrastructure/application_manager.cpp index 1240d9c61..f10f1c1ed 100644 --- a/src/smith/infrastructure/application_manager.cpp +++ b/src/smith/infrastructure/application_manager.cpp @@ -65,6 +65,10 @@ void finalizer() #endif #endif +#ifdef SMITH_USE_SUNDIALS + mfem::Sundials::Finalize(); +#endif + profiling::finalize(); int mpi_initialized = 0; diff --git a/src/smith/numerics/functional/tests/dg_restriction_operators.cpp b/src/smith/numerics/functional/tests/dg_restriction_operators.cpp index 034addf13..45a66727e 100644 --- a/src/smith/numerics/functional/tests/dg_restriction_operators.cpp +++ b/src/smith/numerics/functional/tests/dg_restriction_operators.cpp @@ -349,7 +349,7 @@ void parametrized_test(int permutation) auto L2_dofs = GetFaceDofs(L2_fes.get(), face_geom, face_ids); // verify that the dofs for the L2 faces are aligned properly - int dofs_per_side = L2_dofs.shape()[1] / 2; + auto dofs_per_side = L2_dofs.shape()[1] / 2; for (int i = 0; i < dofs_per_side; i++) { int id1 = int(L2_dofs(0, i).index()); int id2 = int(L2_dofs(0, i + dofs_per_side).index()); diff --git a/src/smith/physics/state/state_manager.hpp b/src/smith/physics/state/state_manager.hpp index 0f4e79911..c451c0323 100644 --- a/src/smith/physics/state/state_manager.hpp +++ b/src/smith/physics/state/state_manager.hpp @@ -161,7 +161,7 @@ class StateManager { axom::sidre::Group* geom_group = qdatas_group->getGroup(std::string(geom_name)); // Verify size correctness - auto verify_size = [](axom::sidre::Group* group, int value, const std::string& view_name, + auto verify_size = [](axom::sidre::Group* group, axom::IndexType value, const std::string& view_name, const std::string& err_msg) { SLIC_ERROR_IF( !group->hasView(view_name), diff --git a/tribol b/tribol index 325b9d722..9f9d4d6fc 160000 --- a/tribol +++ b/tribol @@ -1 +1 @@ -Subproject commit 325b9d7223fe430c9a940fc3ed12a6fe1a26a1e6 +Subproject commit 9f9d4d6fc8735106e9118992ed11a9188249962a