-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spack: remove openmp and cuda variants
Inherits however kokkos was configured.
- Loading branch information
Showing
1 changed file
with
8 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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("[email protected]: cuda_arch=" + _flag, when="+cuda+kokkos cuda_arch=" + _flag) | ||
for _flag in ("~cuda", "+cuda", "~openmp", "+openmp"): | ||
depends_on("[email protected]: " + _flag, when="+kokkos" + _flag) | ||
depends_on( | ||
"[email protected]: ~shared+wrapper+cuda_lambda+cuda_constexpr", | ||
when="+cuda+kokkos", | ||
"[email protected]: ~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 |