Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions scripts/spack/configs/toss_4_x86_64_ib_cray/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spack:
cxx: /opt/rocm-6.3.1/llvm/bin/amdclang++
fortran: /opt/rocm-6.3.1/llvm/bin/amdflang
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
extra_attributes:
Expand All @@ -88,7 +88,7 @@ spack:
cxx: /opt/rocm-6.4.2/llvm/bin/amdclang++
fortran: /opt/rocm-6.4.2/llvm/bin/amdflang
environment: {}
extra_rpaths: []
extra_rpaths: [/opt/rocm-6.4.2/lib, /opt/rocm-6.4.2/lib/llvm/lib]
cce:
externals:
- spec: cce@20.0.0
Expand All @@ -99,8 +99,7 @@ spack:
cxx: /usr/tce/packages/cce-tce/cce-20.0.0/bin/crayCC
fortran: /usr/tce/packages/cce-tce/cce-20.0.0/bin/crayftn
environment: {}
extra_rpaths: []

extra_rpaths: [/opt/cray/pe/cce/20.0.0/cce/x86_64/lib]

hip:
# version: [6.3.1, 6.4.2]
Expand Down
40 changes: 17 additions & 23 deletions scripts/spack/packages/axom/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
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")

Expand All @@ -192,8 +194,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")
Expand All @@ -202,8 +206,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")
Expand Down Expand Up @@ -393,7 +399,9 @@ def initconfig_compiler_entries(self):
# 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

Expand Down Expand Up @@ -432,25 +440,17 @@ def initconfig_hardware_entries(self):

hip_link_flags = ""

rocm_root = 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
Expand All @@ -459,12 +459,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(
Expand Down