Skip to content

Commit

Permalink
RADIUSS packages update (Starting over spack#39613) (spack#41375)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbernede authored Apr 2, 2024
1 parent 2b29ecd commit 92b1c8f
Show file tree
Hide file tree
Showing 27 changed files with 837 additions and 220 deletions.
42 changes: 27 additions & 15 deletions lib/spack/spack/build_systems/cached_cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections.abc
import os
import re
from typing import Tuple

import llnl.util.filesystem as fs
Expand All @@ -15,6 +16,12 @@
from .cmake import CMakeBuilder, CMakePackage


def spec_uses_toolchain(spec):
gcc_toolchain_regex = re.compile(".*gcc-toolchain.*")
using_toolchain = list(filter(gcc_toolchain_regex.match, spec.compiler_flags["cxxflags"]))
return using_toolchain


def cmake_cache_path(name, value, comment="", force=False):
"""Generate a string for a cmake cache variable"""
force_str = " FORCE" if force else ""
Expand Down Expand Up @@ -132,6 +139,11 @@ def initconfig_compiler_entries(self):
"endif()\n",
]

# We defined hipcc as top-level compiler for packages when +rocm.
# This avoid problems coming from rocm flags being applied to another compiler.
if "+rocm" in spec:
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc))

flags = spec.compiler_flags

# use global spack compiler flags
Expand Down Expand Up @@ -213,7 +225,7 @@ def initconfig_mpi_entries(self):
else:
# starting with cmake 3.10, FindMPI expects MPIEXEC_EXECUTABLE
# vs the older versions which expect MPIEXEC
if self.pkg.spec["cmake"].satisfies("@3.10:"):
if spec["cmake"].satisfies("@3.10:"):
entries.append(cmake_cache_path("MPIEXEC_EXECUTABLE", mpiexec))
else:
entries.append(cmake_cache_path("MPIEXEC", mpiexec))
Expand Down Expand Up @@ -248,12 +260,17 @@ def initconfig_hardware_entries(self):
# Include the deprecated CUDA_TOOLKIT_ROOT_DIR for supporting BLT packages
entries.append(cmake_cache_path("CUDA_TOOLKIT_ROOT_DIR", cudatoolkitdir))

archs = spec.variants["cuda_arch"].value
if archs[0] != "none":
arch_str = ";".join(archs)
entries.append(
cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", "{0}".format(arch_str))
)
# CUDA_FLAGS
cuda_flags = []

if not spec.satisfies("cuda_arch=none"):
cuda_archs = ";".join(spec.variants["cuda_arch"].value)
entries.append(cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", cuda_archs))

if spec_uses_toolchain(spec):
cuda_flags.append("-Xcompiler {}".format(spec_uses_toolchain(spec)[0]))

entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", " ".join(cuda_flags)))

if "+rocm" in spec:
entries.append("#------------------{0}".format("-" * 30))
Expand All @@ -262,9 +279,6 @@ def initconfig_hardware_entries(self):

# Explicitly setting HIP_ROOT_DIR may be a patch that is no longer necessary
entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
entries.append(
cmake_cache_path("HIP_CXX_COMPILER", "{0}".format(self.spec["hip"].hipcc))
)
llvm_bin = spec["llvm-amdgpu"].prefix.bin
llvm_prefix = spec["llvm-amdgpu"].prefix
# Some ROCm systems seem to point to /<path>/rocm-<ver>/ and
Expand All @@ -277,11 +291,9 @@ def initconfig_hardware_entries(self):
archs = self.spec.variants["amdgpu_target"].value
if archs[0] != "none":
arch_str = ";".join(archs)
entries.append(
cmake_cache_string("CMAKE_HIP_ARCHITECTURES", "{0}".format(arch_str))
)
entries.append(cmake_cache_string("AMDGPU_TARGETS", "{0}".format(arch_str)))
entries.append(cmake_cache_string("GPU_TARGETS", "{0}".format(arch_str)))
entries.append(cmake_cache_string("CMAKE_HIP_ARCHITECTURES", arch_str))
entries.append(cmake_cache_string("AMDGPU_TARGETS", arch_str))
entries.append(cmake_cache_string("GPU_TARGETS", arch_str))

return entries

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
spack:
view: false
packages:
all:
require: target=x86_64_v3
cmake:
variants: ~ownlibs
ecp-data-vis-sdk:
Expand All @@ -20,8 +22,6 @@ spack:
require: '@14:'
# Minimize LLVM
variants: ~lldb~lld~libomptarget~polly~gold libunwind=none compiler-rt=none
all:
require: target=x86_64_v3

definitions:
- paraview_specs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spack:
- boost +python +filesystem +iostreams +system
- cabana
- caliper
- chai ~benchmarks ~tests
- chai
- charliecloud
- conduit
# - cp2k +mpi # libxsmm: ftn-78 ftn: ERROR in command linel; The -f option has an invalid argument, "tree-vectorize".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ spack:
- butterflypack
- boost +python +filesystem +iostreams +system
- cabana
- chai ~benchmarks ~tests
- chai
- conduit
# - cp2k +mpi # cp2k: Error: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/COMPLEX(4)).
- datatransferkit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spack:
- butterflypack
- cabana
- caliper
- chai ~benchmarks ~tests
- chai
- charliecloud
- conduit
- cp2k +mpi
Expand Down Expand Up @@ -214,7 +214,7 @@ spack:
- arborx +cuda cuda_arch=75 ^kokkos +wrapper
- cabana +cuda cuda_arch=75 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=75
- caliper +cuda cuda_arch=75
- chai ~benchmarks ~tests +cuda cuda_arch=75 ^umpire ~shared
- chai +cuda cuda_arch=75 ^umpire ~shared
# - cp2k +mpi +cuda cuda_arch=75 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80')
- flecsi +cuda cuda_arch=75
- ginkgo +cuda cuda_arch=75
Expand Down Expand Up @@ -261,7 +261,7 @@ spack:
- arborx +cuda cuda_arch=80 ^kokkos +wrapper
- cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80
- caliper +cuda cuda_arch=80
- chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared
- chai +cuda cuda_arch=80 ^umpire ~shared
# - cp2k +mpi +cuda cuda_arch=80 # cp2k: Error: KeyError: 'Point environment variable LIBSMM_PATH to the absolute path of the libsmm.a file'
- flecsi +cuda cuda_arch=80
- ginkgo +cuda cuda_arch=80
Expand Down Expand Up @@ -308,7 +308,7 @@ spack:
- arborx +cuda cuda_arch=90 ^kokkos +wrapper
- cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90
- caliper +cuda cuda_arch=90
- chai ~benchmarks ~tests +cuda cuda_arch=90 ^umpire ~shared
- chai +cuda cuda_arch=90 ^umpire ~shared
# - cp2k +mpi +cuda cuda_arch=90 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80')
- flecsi +cuda cuda_arch=90
- ginkgo +cuda cuda_arch=90
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ spack:
- butterflypack
- cabana
- caliper
- chai ~benchmarks ~tests
- chai
- charliecloud
- conduit
- cp2k +mpi
- datatransferkit
- dyninst
- ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: ?
- ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp # +visit: ?
- exaworks
- flecsi
- flit
Expand Down Expand Up @@ -214,7 +214,7 @@ spack:
- arborx +cuda cuda_arch=75 ^kokkos +wrapper
- cabana +cuda cuda_arch=75 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=75
- caliper +cuda cuda_arch=75
- chai ~benchmarks ~tests +cuda cuda_arch=75 ^umpire ~shared
- chai +cuda cuda_arch=75 ^umpire ~shared
# - cp2k +mpi +cuda cuda_arch=75 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80')
- flecsi +cuda cuda_arch=75
- ginkgo +cuda cuda_arch=75
Expand Down Expand Up @@ -261,7 +261,7 @@ spack:
- arborx +cuda cuda_arch=80 ^kokkos +wrapper
- cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80
- caliper +cuda cuda_arch=80
- chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared
- chai +cuda cuda_arch=80 ^umpire ~shared
# - cp2k +mpi +cuda cuda_arch=80 # cp2k: Error: KeyError: 'Point environment variable LIBSMM_PATH to the absolute path of the libsmm.a file'
- flecsi +cuda cuda_arch=80
- ginkgo +cuda cuda_arch=80
Expand Down Expand Up @@ -308,7 +308,7 @@ spack:
- arborx +cuda cuda_arch=90 ^kokkos +wrapper
- cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90
- caliper +cuda cuda_arch=90
- chai ~benchmarks ~tests +cuda cuda_arch=90 ^umpire ~shared
- chai +cuda cuda_arch=90 ^umpire ~shared
# - cp2k +mpi +cuda cuda_arch=90 # cp2k: cp2k only supports cuda_arch ('35', '37', '60', '70', '80')
- flecsi +cuda cuda_arch=90
- ginkgo +cuda cuda_arch=90
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spack:
- butterflypack
- cabana
- caliper
- chai ~benchmarks ~tests
- chai
- charliecloud
- conduit
# - cp2k +mpi # dbcsr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spack:
- butterflypack
- cabana
- caliper
- chai ~benchmarks ~tests
- chai
- charliecloud
- conduit
- cp2k +mpi
Expand Down Expand Up @@ -218,7 +218,7 @@ spack:
- amrex +cuda cuda_arch=70
- arborx +cuda cuda_arch=70 ^kokkos +wrapper
- caliper +cuda cuda_arch=70
- chai ~benchmarks ~tests +cuda cuda_arch=70 ^umpire ~shared
- chai +cuda cuda_arch=70 ^umpire ~shared
# - cp2k +mpi +cuda cuda_arch=70 # dbcsr
- ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 +vtkm +zfp ~paraview +cuda cuda_arch=70
- exago +mpi +python +raja +hiop ~rocm +cuda cuda_arch=70 ~ipopt ^[email protected] ~sparse +mpi +raja ~rocm +cuda cuda_arch=70 #^[email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ spack:
- arborx +rocm amdgpu_target=gfx908
- cabana +rocm amdgpu_target=gfx908
- caliper +rocm amdgpu_target=gfx908
- chai ~benchmarks +rocm amdgpu_target=gfx908
- chai +rocm amdgpu_target=gfx908
# - cp2k +mpi +rocm amdgpu_target=gfx908 # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]),
- ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx908
- exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx908 ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^[email protected] ~sparse +mpi +raja +rocm amdgpu_target=gfx908
Expand Down Expand Up @@ -256,7 +256,7 @@ spack:
- arborx +rocm amdgpu_target=gfx90a
- cabana +rocm amdgpu_target=gfx90a
- caliper +rocm amdgpu_target=gfx90a
- chai ~benchmarks +rocm amdgpu_target=gfx90a
- chai +rocm amdgpu_target=gfx90a
# - cp2k +mpi +rocm amdgpu_target=gfx90a # cp2k: Error: KeyError: 'No spec with name rocm in... "-L{}".format(spec["rocm"].libs.directories[0]),
- ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx90a
- exago +mpi +python +raja +hiop +rocm amdgpu_target=gfx90a ~ipopt cxxflags="-Wno-error=non-pod-varargs" ^[email protected] ~sparse +mpi +raja +rocm amdgpu_target=gfx90a
Expand Down
12 changes: 6 additions & 6 deletions share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ spack:
- butterflypack
- cabana
- caliper
- chai ~benchmarks ~tests
- chai
- charliecloud
- conduit
- cp2k +mpi
Expand All @@ -78,7 +78,7 @@ spack:
- drishti
- dxt-explorer
- dyninst
- ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # adios2~cuda, ascent~cuda, darshan-runtime, darshan-util, faodel, hdf5, libcatalyst, parallel-netcdf, paraview~cuda, py-cinemasci, sz, unifyfs, veloc, visit, vtk-m, zfp
- ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # adios2~cuda, ascent~cuda, darshan-runtime, darshan-util, faodel, hdf5, libcatalyst, parallel-netcdf, paraview~cuda, py-cinemasci, sz, unifyfs, veloc, visit, vtk-m, zfp
- exaworks
- flecsi
- flit
Expand Down Expand Up @@ -222,7 +222,7 @@ spack:
# - arborx +cuda cuda_arch=80 ^kokkos +wrapper
# - cabana +cuda cuda_arch=80 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80
# - caliper +cuda cuda_arch=80
# - chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared
# - chai +cuda cuda_arch=80 ^umpire ~shared
# - cusz +cuda cuda_arch=80
# - dealii +cuda cuda_arch=80
# - ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=80 # +ascent fails because fides fetch error
Expand Down Expand Up @@ -269,7 +269,7 @@ spack:
# - arborx +cuda cuda_arch=90 ^kokkos +wrapper
# - cabana +cuda cuda_arch=90 ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=90
# - caliper +cuda cuda_arch=90
# - chai ~benchmarks ~tests +cuda cuda_arch=90 ^umpire ~shared
# - chai +cuda cuda_arch=90 ^umpire ~shared
# - cusz +cuda cuda_arch=90
# - flecsi +cuda cuda_arch=90
# - ginkgo +cuda cuda_arch=90
Expand Down Expand Up @@ -320,7 +320,7 @@ spack:
# - arborx +rocm amdgpu_target=gfx908
# - cabana +rocm amdgpu_target=gfx908
# - caliper +rocm amdgpu_target=gfx908
# - chai ~benchmarks +rocm amdgpu_target=gfx908
# - chai +rocm amdgpu_target=gfx908
# - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx908
# - gasnet +rocm amdgpu_target=gfx908
# - ginkgo +rocm amdgpu_target=gfx908
Expand Down Expand Up @@ -361,7 +361,7 @@ spack:
# - arborx +rocm amdgpu_target=gfx90a
# - cabana +rocm amdgpu_target=gfx90a
# - caliper +rocm amdgpu_target=gfx90a
# - chai ~benchmarks +rocm amdgpu_target=gfx90a
# - chai +rocm amdgpu_target=gfx90a
# - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx90a
# - gasnet +rocm amdgpu_target=gfx90a
# - ginkgo +rocm amdgpu_target=gfx90a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spack:
- blt
- caliper
#- care ## ~benchmarks ~examples ~tests
#- chai ## ~benchmarks ~examples ~tests
#- chai ## ~examples
- conduit # ^hdf5+shared
- flux-core
#- flux-sched
Expand Down
3 changes: 3 additions & 0 deletions var/spack/repos/builtin/packages/ascent/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ class Ascent(CMakePackage, CudaPackage):
# RAJA and Umpire
#######################
depends_on("raja", when="+raja")
depends_on("raja+openmp", when="+raja +openmp")
depends_on("raja~openmp", when="+raja ~openmp")
depends_on("umpire", when="+umpire")
depends_on("umpire@:2023.06.0", when="@:0.9.2 +umpire")

#######################
# BabelFlow
Expand Down
6 changes: 3 additions & 3 deletions var/spack/repos/builtin/packages/axom/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on("[email protected]:", type="build", when="+rocm")

depends_on("blt", type="build")
depends_on("[email protected]:", type="build", when="@0.6.1:")
depends_on("[email protected]:0.5.3", type="build", when="@0.6.1:")

depends_on("mpi", when="+mpi")

Expand All @@ -122,13 +122,13 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage):
depends_on("scr~fortran", when="+scr~fortran")

with when("+umpire"):
depends_on("[email protected]:", when="@0.7.0:")
depends_on("[email protected]:2023.06", when="@0.7.0:")
depends_on("[email protected]", when="@0.6.0")
depends_on("umpire@5:5.0.1", when="@:0.5.0")
depends_on("umpire +openmp", when="+openmp")

with when("+raja"):
depends_on("[email protected]:", when="@0.7.0:")
depends_on("[email protected]:2023.06", when="@0.7.0:")
depends_on("[email protected]", when="@0.6.0")
depends_on("raja@:0.13.0", when="@:0.5.0")
depends_on("raja~openmp", when="~openmp")
Expand Down
Loading

0 comments on commit 92b1c8f

Please sign in to comment.