diff --git a/.uberenv_config.json b/.uberenv_config.json index 44424c4b3b..ab01c7b17a 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -6,7 +6,7 @@ "spack_url": "https://github.com/spack/spack.git", "spack_commit": "734c5db2121b01c373eed6538e452f18887e9e44", "spack_configs_path": "scripts/spack/configs", -"spack_packages_commit": "a75a7f75182ffc7a51c6ca7f0fec4bf9b2705be8", +"spack_packages_commit": "5af277dadb760efd2cc2be5bc5a8cadc44a9a4de", "spack_packages_path": ["scripts/spack/radiuss-spack-configs/spack_repo/llnl_radiuss/packages", "scripts/spack/packages"], "spack_concretizer": "clingo", "vcpkg_url": "https://github.com/microsoft/vcpkg", 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 56c90f7ebf..7791ceb572 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 @@ -23,6 +23,7 @@ spack: toolchains: rocm_6_4_2: + - spec: fflags=-Mfreeform - spec: '%c=llvm-amdgpu@6.4.2' when: '%c' - spec: '%cxx=llvm-amdgpu@6.4.2' @@ -32,6 +33,7 @@ spack: - spec: '%cray-mpich@8.1.29.rocm_6_4_2' when: '%mpi' rocm_6_3_1: + - spec: fflags=-Mfreeform - spec: '%c=llvm-amdgpu@6.3.1' when: '%c' - spec: '%cxx=llvm-amdgpu@6.3.1' @@ -41,6 +43,7 @@ spack: - spec: '%cray-mpich@8.1.29.rocm_6_3_1' when: '%mpi' cce_20: + - spec: fflags=-ef - spec: '%c=cce@20.0.0' when: '%c' - spec: '%cxx=cce@20.0.0' @@ -67,27 +70,23 @@ spack: llvm-amdgpu: externals: - spec: llvm-amdgpu@6.3.1 - prefix: /opt/rocm-6.3.1/llvm + prefix: /opt/rocm-6.3.1 extra_attributes: compilers: c: /opt/rocm-6.3.1/llvm/bin/amdclang cxx: /opt/rocm-6.3.1/llvm/bin/amdclang++ fortran: /opt/rocm-6.3.1/llvm/bin/amdflang - flags: - fflags: -Mfreeform environment: {} - extra_rpaths: [] + extra_rpaths: [/opt/rocmc-6.3.1/lib, /opt/rocm-6.3.1/lib/llvm/lib] - spec: llvm-amdgpu@6.4.2 - prefix: /opt/rocm-6.4.2/llvm + prefix: /opt/rocm-6.4.2 extra_attributes: compilers: c: /opt/rocm-6.4.2/llvm/bin/amdclang cxx: /opt/rocm-6.4.2/llvm/bin/amdclang++ fortran: /opt/rocm-6.4.2/llvm/bin/amdflang - flags: - fflags: -Mfreeform environment: {} - extra_rpaths: [] + extra_rpaths: [/opt/rocm-6.4.2/lib, /opt/rocm-6.4.2/lib/llvm/lib] cce: externals: @@ -98,12 +97,8 @@ spack: c: /usr/tce/packages/cce-tce/cce-20.0.0/bin/craycc cxx: /usr/tce/packages/cce-tce/cce-20.0.0/bin/crayCC fortran: /usr/tce/packages/cce-tce/cce-20.0.0/bin/crayftn - # Flag for lowercase Fortran module names - flags: - fflags: -ef environment: {} - extra_rpaths: [] - + extra_rpaths: [/opt/cray/pe/cce/20.0.0/cce/x86_64/lib] hip: # version: [6.3.1, 6.4.2] diff --git a/scripts/spack/packages/axom/package.py b/scripts/spack/packages/axom/package.py index 768458aaeb..87fb804b57 100644 --- a/scripts/spack/packages/axom/package.py +++ b/scripts/spack/packages/axom/package.py @@ -7,7 +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, @@ -38,6 +37,9 @@ ) +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. @@ -90,10 +92,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") @@ -162,13 +160,19 @@ 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") depends_on("blt", type="build") + depends_on("blt@0.7.1:", type="build", when="@0.12:") + depends_on("blt@0.7", type="build", when="@0.11:") + depends_on("blt@0.6.2", type="build", when="@0.9:0.10") 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") @@ -191,8 +195,10 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage): 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@2025.09:", when="@0.12:") + depends_on("umpire@2025.03", when="@0.11") + depends_on("umpire@2024.07", when="@0.10") + depends_on("umpire@2024.02", 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") @@ -201,8 +207,10 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage): 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@2025.09:", when="@0.12:") + depends_on("raja@2025.03", when="@0.11") + depends_on("raja@2024.07", when="@0.10") + depends_on("raja@2024.02", 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") @@ -383,15 +391,14 @@ def initconfig_compiler_entries(self): 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")) + entries.append( + cmake_cache_string("CMAKE_CXX_FLAGS_DEBUG", "-g -Rno-debug-disables-optimization") + ) return entries @@ -430,25 +437,17 @@ def initconfig_hardware_entries(self): 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 if spec.satisfies("+mpi"): 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 += "-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 " - 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 @@ -457,12 +456,6 @@ def initconfig_hardware_entries(self): hip_link_flags += "-Wl,--disable-new-dtags " hip_link_flags += "-lflang -lflangrti " - # 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( @@ -491,9 +484,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