summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristian Di Pietrantonio <cristiandipietrantonio@gmail.com>2023-08-11 15:18:02 +0800
committerGitHub <noreply@github.com>2023-08-11 07:18:02 +0000
commit09ca71dbe0e30ddc35f8ace58026e0fc648bae98 (patch)
tree4dda842ca0e1846608febfb334fdee11e248d03e
parentea082539e43eaaa489b4bc68f1c823bd6fa278c8 (diff)
downloadspack-09ca71dbe0e30ddc35f8ace58026e0fc648bae98.tar.gz
spack-09ca71dbe0e30ddc35f8ace58026e0fc648bae98.tar.bz2
spack-09ca71dbe0e30ddc35f8ace58026e0fc648bae98.tar.xz
spack-09ca71dbe0e30ddc35f8ace58026e0fc648bae98.zip
kokkos: rename 'std' variant to 'cxxstd'. (#39319)
Co-authored-by: Cristian Di Pietrantonio <cdipietrantonio@pawsey.org.au>
-rw-r--r--share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml8
-rw-r--r--var/spack/repos/builtin/packages/ascent/package.py2
-rw-r--r--var/spack/repos/builtin/packages/hpx-kokkos/package.py2
-rw-r--r--var/spack/repos/builtin/packages/kokkos/package.py27
4 files changed, 20 insertions, 19 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 07291c2ca1..cd94ce6856 100644
--- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml
+++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-oneapi/spack.yaml
@@ -225,10 +225,10 @@ spack:
# GPU
- aml +ze
- amrex +sycl dimensions=3
- - arborx +sycl ^kokkos +sycl +openmp std=17 +tests +examples
- - cabana +sycl ^kokkos +sycl +openmp std=17 +tests +examples
- - kokkos +sycl +openmp std=17 +tests +examples
- - kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp std=17 +tests +examples
+ - arborx +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples
+ - 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
# --
# - ginkgo +oneapi # InstallError: Ginkgo's oneAPI backend requires theDPC++ compiler as main CXX compiler.
# - hpctoolkit +level_zero # intel-tbb: icpx: error: unknown argument: '-flifetime-dse=1'
diff --git a/var/spack/repos/builtin/packages/ascent/package.py b/var/spack/repos/builtin/packages/ascent/package.py
index 394014b52f..d6bbd418f4 100644
--- a/var/spack/repos/builtin/packages/ascent/package.py
+++ b/var/spack/repos/builtin/packages/ascent/package.py
@@ -187,7 +187,7 @@ class Ascent(CMakePackage, CudaPackage):
depends_on("vtk-m+fpic", when="@0.8.0: +vtkh")
depends_on("vtk-m~shared+fpic", when="@0.8.0: +vtkh~shared")
# Ascent defaults to C++11
- depends_on("kokkos std=11", when="+vtkh ^vtk-m +kokkos")
+ depends_on("kokkos cxxstd=11", when="+vtkh ^vtk-m +kokkos")
#######################
# VTK-h
diff --git a/var/spack/repos/builtin/packages/hpx-kokkos/package.py b/var/spack/repos/builtin/packages/hpx-kokkos/package.py
index 24b01f9da8..f0029bcbd4 100644
--- a/var/spack/repos/builtin/packages/hpx-kokkos/package.py
+++ b/var/spack/repos/builtin/packages/hpx-kokkos/package.py
@@ -42,7 +42,7 @@ class HpxKokkos(CMakePackage, CudaPackage, ROCmPackage):
for cxxstd in cxxstds:
depends_on("hpx cxxstd={0}".format(cxxstd), when="cxxstd={0}".format(cxxstd))
- depends_on("kokkos std={0}".format(cxxstd), when="cxxstd={0}".format(cxxstd))
+ depends_on("kokkos cxxstd={0}".format(cxxstd), when="cxxstd={0}".format(cxxstd))
# HPXKokkos explicitly supports CUDA and ROCm. Other GPU backends can be
# used but without support in HPXKokkos. Other CPU backends, except Serial,
diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py
index 5124e236b4..99f45c3fd4 100644
--- a/var/spack/repos/builtin/packages/kokkos/package.py
+++ b/var/spack/repos/builtin/packages/kokkos/package.py
@@ -200,29 +200,30 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
depends_on("kokkos-nvcc-wrapper@master", when="@master+wrapper")
conflicts("+wrapper", when="~cuda")
- stds = ["11", "14", "17", "20"]
- # TODO: This should be named cxxstd for consistency with other packages
- variant("std", default="17", values=stds, multi=False, description="C++ standard")
+ cxxstds = ["11", "14", "17", "20"]
+ variant("cxxstd", default="17", values=cxxstds, multi=False, description="C++ standard")
variant("pic", default=False, description="Build position independent code")
- conflicts("std=11", when="@3.7:")
- conflicts("std=14", when="@4.0:")
+ conflicts("cxxstd=11", when="@3.7:")
+ conflicts("cxxstd=14", when="@4.0:")
- conflicts("+cuda", when="std=17 ^cuda@:10")
- conflicts("+cuda", when="std=20 ^cuda@:11")
+ conflicts("+cuda", when="cxxstd=17 ^cuda@:10")
+ conflicts("+cuda", when="cxxstd=20 ^cuda@:11")
# SYCL and OpenMPTarget require C++17 or higher
- for stdver in stds[: stds.index("17")]:
- conflicts("+sycl", when="std={0}".format(stdver), msg="SYCL requires C++17 or higher")
+ for cxxstdver in cxxstds[: cxxstds.index("17")]:
+ conflicts(
+ "+sycl", when="cxxstd={0}".format(cxxstdver), msg="SYCL requires C++17 or higher"
+ )
conflicts(
"+openmptarget",
- when="std={0}".format(stdver),
+ when="cxxstd={0}".format(cxxstdver),
msg="OpenMPTarget requires C++17 or higher",
)
# HPX should use the same C++ standard
- for std in stds:
- depends_on("hpx cxxstd={0}".format(std), when="+hpx std={0}".format(std))
+ for cxxstd in cxxstds:
+ depends_on("hpx cxxstd={0}".format(cxxstd), when="+hpx cxxstd={0}".format(cxxstd))
# HPX version constraints
depends_on("hpx@:1.6", when="@:3.5 +hpx")
@@ -283,7 +284,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
options = [
from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"),
- from_variant("CMAKE_CXX_STANDARD", "std"),
+ from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
from_variant("BUILD_SHARED_LIBS", "shared"),
]