diff --git a/spack-repo/packages/spiner/package.py b/spack-repo/packages/spiner/package.py index b6f730fb5..807b15c6a 100644 --- a/spack-repo/packages/spiner/package.py +++ b/spack-repo/packages/spiner/package.py @@ -6,7 +6,7 @@ from spack.package import * -class Spiner(CMakePackage, CudaPackage): +class Spiner(CMakePackage): """Spiner: Performance portable routines for generic, tabulated, multi-dimensional data""" @@ -44,7 +44,6 @@ class Spiner(CMakePackage, CudaPackage): default=False, description="Enable kokkos", ) - variant("openmp", default=False, description="Enable openmp kokkos backend") variant("hdf5", default=False, description="Enable hdf5") variant("mpi", default=False, description="Support parallel hdf5") @@ -64,13 +63,9 @@ class Spiner(CMakePackage, CudaPackage): # Currently the raw cuda backend of ports-of-call is not supported. depends_on("ports-of-call portability_strategy=Kokkos", when="@:1.5.1 +kokkos") depends_on("ports-of-call portability_strategy=None", when="@:1.5.1 ~kokkos") - for _flag in list(CudaPackage.cuda_arch_values): - depends_on("kokkos@3.3.00: cuda_arch=" + _flag, when="+cuda+kokkos cuda_arch=" + _flag) - for _flag in ("~cuda", "+cuda", "~openmp", "+openmp"): - depends_on("kokkos@3.3.00: " + _flag, when="+kokkos" + _flag) depends_on( - "kokkos@3.3.00: ~shared+wrapper+cuda_lambda+cuda_constexpr", - when="+cuda+kokkos", + "kokkos@3.3.00: ~shared+cuda_lambda+cuda_constexpr", + when="+kokkos ^kokkos+cuda", ) depends_on("hdf5+hl~mpi", when="+hdf5~mpi") @@ -81,9 +76,6 @@ class Spiner(CMakePackage, CudaPackage): depends_on("py-matplotlib", when="+python") conflicts("+mpi", when="~hdf5") - conflicts("+cuda", when="~kokkos") - conflicts("+openmp", when="~kokkos") - conflicts("cuda_arch=none", when="+cuda", msg="CUDA architecture is required") def cmake_args(self): if self.spec.satisfies("@1.6.0:"): @@ -93,14 +85,16 @@ def cmake_args(self): use_kokkos_option = "SPINER_USE_KOKKOS" use_cuda_option = "SPINER_USE_CUDA" + use_cuda = self.spec.satisfies("^kokkos+cuda") + args = [ self.define("BUILD_TESTING", self.run_tests), self.define_from_variant(use_kokkos_option, "kokkos"), - self.define_from_variant(use_cuda_option, "cuda"), + self.define(use_cuda_option, use_cuda), self.define_from_variant("SPINER_USE_HDF", "hdf5"), ] - if "+cuda" in self.spec: + if use_cuda: args.append( - self.define("CMAKE_CUDA_ARCHITECTURES", self.spec.variants["cuda_arch"].value) + self.define("CMAKE_CUDA_ARCHITECTURES", self.spec["kokkos"].variants["cuda_arch"].value) ) return args