summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Arndt <arndtd@ornl.gov>2022-05-24 17:23:47 -0400
committerGitHub <noreply@github.com>2022-05-24 14:23:47 -0700
commit54ea1f4bf66437fc9534b8beaf439feefa3c50b5 (patch)
tree835948a9729fb899800baca44eeb80ebdb7c83ca
parent067800bc315125caa86037bbb82e45bab71a9896 (diff)
downloadspack-54ea1f4bf66437fc9534b8beaf439feefa3c50b5.tar.gz
spack-54ea1f4bf66437fc9534b8beaf439feefa3c50b5.tar.bz2
spack-54ea1f4bf66437fc9534b8beaf439feefa3c50b5.tar.xz
spack-54ea1f4bf66437fc9534b8beaf439feefa3c50b5.zip
Allow Kokkos with OpenMPTarget backend (#30724)
* Allow Kokkos with OpenMPTarget backend * Restrict SYCL and OpenMPTarget to C++17 or higher * Improve C++ standard check for SYCL and OpenMPTarget * Fix indentation
-rw-r--r--var/spack/repos/builtin/packages/kokkos/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py
index b8e5083425..9c624aa76a 100644
--- a/var/spack/repos/builtin/packages/kokkos/package.py
+++ b/var/spack/repos/builtin/packages/kokkos/package.py
@@ -46,9 +46,11 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
'serial': [True, 'Whether to build serial backend'],
'rocm': [False, 'Whether to build HIP backend'],
'sycl': [False, 'Whether to build the SYCL backend'],
+ 'openmptarget': [False, 'Whether to build the OpenMPTarget backend']
}
conflicts("+rocm", when="@:3.0")
conflicts("+sycl", when="@:3.3")
+ conflicts("+openmptarget", when="@:3.5")
# https://github.com/spack/spack/issues/29052
conflicts("@:3.5.00 +sycl", when="%dpcpp@2022.0.0")
@@ -194,6 +196,13 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
conflicts("+cuda", when="std=17 ^cuda@:10")
conflicts("+cuda", when="std=20")
+ # 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')
+ conflicts("+openmptarget", when='std={0}'.format(stdver),
+ 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))