summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml2
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml2
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml2
-rw-r--r--var/spack/repos/builtin/packages/adios2/package.py60
-rw-r--r--var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py2
5 files changed, 59 insertions, 9 deletions
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml
index d170b0a272..605a69e4a5 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml
@@ -227,8 +227,8 @@ spack:
- cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples
- kokkos +sycl +openmp cxxstd=17 +tests +examples
- kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp cxxstd=17 +tests +examples
- - tau +mpi +opencl +level_zero ~pdt # tau: requires libdrm.so to be installed
- slate +sycl
+ - tau +mpi +opencl +level_zero ~pdt # tau: requires libdrm.so to be installed
# --
# - ginkgo +oneapi # InstallError: Ginkgo's oneAPI backend requires theDPC++ compiler as main CXX compiler.
# - hpctoolkit +level_zero # dyninst@12.3.0%gcc: /usr/bin/ld: libiberty/./d-demangle.c:142: undefined reference to `_intel_fast_memcpy'; can't mix intel-tbb@%oneapi with dyninst%gcc
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml
index 885dbb538b..b5ac172077 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-rocm-external/spack.yaml
@@ -258,6 +258,7 @@ spack:
- tau +mpi +rocm # tau: has issue with `spack env depfile` build
# ROCM 908
+ - adios2 +kokkos +rocm amdgpu_target=gfx908
- amrex +rocm amdgpu_target=gfx908
- arborx +rocm amdgpu_target=gfx908
- cabana +rocm amdgpu_target=gfx908
@@ -297,6 +298,7 @@ spack:
# - papi +rocm amdgpu_target=gfx908 # papi: https://github.com/spack/spack/issues/27898
# ROCM 90a
+ - adios2 +kokkos +rocm amdgpu_target=gfx90a
- amrex +rocm amdgpu_target=gfx90a
- arborx +rocm amdgpu_target=gfx90a
- cabana +rocm amdgpu_target=gfx90a
diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml
index 86eab1d407..710360172a 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml
@@ -306,6 +306,7 @@ spack:
- tau +mpi +rocm # tau: has issue with `spack env depfile` build
# ROCM 908
+ - adios2 +kokkos +rocm amdgpu_target=gfx908
- amrex +rocm amdgpu_target=gfx908
- arborx +rocm amdgpu_target=gfx908
- cabana +rocm amdgpu_target=gfx908
@@ -345,6 +346,7 @@ spack:
# - papi +rocm amdgpu_target=gfx908 # papi: https://github.com/spack/spack/issues/27898
# ROCM 90a
+ - adios2 +kokkos +rocm amdgpu_target=gfx90a
- amrex +rocm amdgpu_target=gfx90a
- arborx +rocm amdgpu_target=gfx90a
- cabana +rocm amdgpu_target=gfx90a
diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py
index bfb08227e6..218457f3e3 100644
--- a/var/spack/repos/builtin/packages/adios2/package.py
+++ b/var/spack/repos/builtin/packages/adios2/package.py
@@ -9,7 +9,7 @@ import tempfile
from spack.package import *
-class Adios2(CMakePackage, CudaPackage):
+class Adios2(CMakePackage, CudaPackage, ROCmPackage):
"""The Adaptable Input Output System version 2,
developed in the Exascale Computing Program"""
@@ -62,7 +62,8 @@ class Adios2(CMakePackage, CudaPackage):
variant(
"libpressio", default=False, when="@2.8:", description="Enable LibPressio for compression"
)
- variant("blosc", default=True, when="@2.4:", description="Enable Blosc compression")
+ variant("blosc", default=True, when="@2.4:2.8", description="Enable Blosc compression")
+ variant("blosc2", default=True, when="@2.9:", description="Enable Blosc2 compression")
variant("bzip2", default=True, when="@2.4:", description="Enable BZip2 compression")
variant("zfp", default=True, description="Enable ZFP compression")
variant("png", default=True, when="@2.4:", description="Enable PNG compression")
@@ -78,7 +79,7 @@ class Adios2(CMakePackage, CudaPackage):
description="Enable the DataMan engine for WAN transports",
)
variant("dataspaces", default=False, when="@2.5:", description="Enable support for DATASPACES")
- variant("ssc", default=True, description="Enable the SSC staging engine")
+ variant("ssc", default=True, when="@:2.7", description="Enable the SSC staging engine")
variant("hdf5", default=False, description="Enable the HDF5 engine")
variant(
"aws",
@@ -94,7 +95,8 @@ class Adios2(CMakePackage, CudaPackage):
)
# Optional language bindings, C++11 and C always provided
- variant("cuda", default=False, when="@2.8:", description="Enable CUDA support")
+ variant("kokkos", default=False, when="@2.9:", description="Enable Kokkos support")
+ variant("sycl", default=False, when="@2.10:", description="Enable SYCL support")
variant("python", default=False, description="Enable the Python bindings")
variant("fortran", default=True, description="Enable the Fortran bindings")
@@ -108,6 +110,37 @@ class Adios2(CMakePackage, CudaPackage):
depends_on("cmake@3.12.0:", type="build")
+ # Standalone CUDA support
+ depends_on("cuda", when="+cuda ~kokkos")
+
+ # Kokkos support
+ depends_on("kokkos@3.7: +cuda +wrapper", when="+kokkos +cuda")
+ depends_on("kokkos@3.7: +rocm", when="+kokkos +rocm")
+ depends_on("kokkos@3.7: +sycl", when="+kokkos +sycl")
+
+ # Propagate CUDA target to kokkos for +cuda
+ for cuda_arch in CudaPackage.cuda_arch_values:
+ depends_on(
+ "kokkos cuda_arch=%s" % cuda_arch, when="+kokkos +cuda cuda_arch=%s" % cuda_arch
+ )
+
+ # Propagate AMD GPU target to kokkos for +rocm
+ for amdgpu_value in ROCmPackage.amdgpu_targets:
+ depends_on(
+ "kokkos amdgpu_target=%s" % amdgpu_value,
+ when="+kokkos +rocm amdgpu_target=%s" % amdgpu_value,
+ )
+
+ conflicts("+cuda", when="@:2.7")
+ conflicts("+rocm", when="@:2.8")
+
+ conflicts("+cuda", when="+sycl")
+ conflicts("+rocm", when="+cuda")
+ conflicts("+rocm", when="+sycl")
+
+ conflicts("+rocm", when="~kokkos", msg="ADIOS2 does not support HIP without Kokkos")
+ conflicts("+sycl", when="~kokkos", msg="ADIOS2 does not support SYCL without Kokkos")
+
for _platform in ["linux", "darwin", "cray"]:
depends_on("pkgconfig", type="build", when=f"platform={_platform}")
variant(
@@ -135,8 +168,8 @@ class Adios2(CMakePackage, CudaPackage):
depends_on("hdf5+mpi", when="+hdf5+mpi")
depends_on("libpressio", when="+libpressio")
- depends_on("c-blosc", when="@:2.8 +blosc")
- depends_on("c-blosc2", when="@2.9: +blosc")
+ depends_on("c-blosc", when="+blosc")
+ depends_on("c-blosc2", when="+blosc2")
depends_on("bzip2", when="+bzip2")
depends_on("libpng@1.6:", when="+png")
depends_on("zfp@0.5.1:0.5", when="+zfp")
@@ -202,6 +235,7 @@ class Adios2(CMakePackage, CudaPackage):
from_variant("BUILD_SHARED_LIBS", "shared"),
from_variant("ADIOS2_USE_AWSSDK", "aws"),
from_variant("ADIOS2_USE_Blosc", "blosc"),
+ from_variant("ADIOS2_USE_Blosc2", "blosc2"),
from_variant("ADIOS2_USE_BZip2", "bzip2"),
from_variant("ADIOS2_USE_DataMan", "dataman"),
from_variant("ADIOS2_USE_DataSpaces", "dataspaces"),
@@ -214,9 +248,13 @@ class Adios2(CMakePackage, CudaPackage):
from_variant("ADIOS2_USE_SST", "sst"),
from_variant("ADIOS2_USE_SZ", "sz"),
from_variant("ADIOS2_USE_ZFP", "zfp"),
- from_variant("ADIOS2_USE_CUDA", "cuda"),
from_variant("ADIOS2_USE_Catalyst", "libcatalyst"),
from_variant("ADIOS2_USE_LIBPRESSIO", "libpressio"),
+ self.define("ADIOS2_USE_CUDA", self.spec.satisfies("+cuda ~kokkos")),
+ self.define("ADIOS2_USE_Kokkos", self.spec.satisfies("+kokkos")),
+ self.define("Kokkos_ENABLE_CUDA", self.spec.satisfies("+cuda +kokkos")),
+ self.define("Kokkos_ENABLE_HIP", self.spec.satisfies("+rocm")),
+ self.define("Kokkos_ENABLE_SYCL", self.spec.satisfies("+sycl")),
self.define("BUILD_TESTING", self.run_tests),
self.define("ADIOS2_BUILD_EXAMPLES", False),
self.define("ADIOS2_USE_Endian_Reverse", True),
@@ -244,6 +282,14 @@ class Adios2(CMakePackage, CudaPackage):
args.append(f"-DPYTHON_EXECUTABLE:FILEPATH={spec['python'].command.path}")
args.append(f"-DPython_EXECUTABLE:FILEPATH={spec['python'].command.path}")
+ # hip support
+ if "+cuda" in spec:
+ args.append(self.builder.define_cuda_architectures(self))
+
+ # hip support
+ if "+rocm" in spec:
+ args.append(self.builder.define_hip_architectures(self))
+
return args
@property
diff --git a/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py b/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py
index 189515b056..f23a736569 100644
--- a/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py
+++ b/var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py
@@ -102,7 +102,7 @@ class EcpDataVisSdk(BundlePackage, CudaPackage, ROCmPackage):
amdgpu_target_variants = ["amdgpu_target={0}".format(x) for x in ROCmPackage.amdgpu_targets]
dav_sdk_depends_on(
- "adios2+shared+mpi+python+blosc+sst+ssc+dataman",
+ "adios2+shared+mpi+python+sst+dataman",
when="+adios2",
propagate=["cuda", "hdf5", "sz", "zfp", "fortran"] + cuda_arch_variants,
)