diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/adios2/package.py | 60 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py | 2 |
2 files changed, 54 insertions, 8 deletions
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, ) |