kokkos: rename 'std' variant to 'cxxstd'. (#39319)
Co-authored-by: Cristian Di Pietrantonio <cdipietrantonio@pawsey.org.au>
This commit is contained in:
		 Cristian Di Pietrantonio
					Cristian Di Pietrantonio
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							ea082539e4
						
					
				
				
					commit
					09ca71dbe0
				
			| @@ -225,10 +225,10 @@ spack: | |||||||
|   # GPU |   # GPU | ||||||
|   - aml +ze |   - aml +ze | ||||||
|   - amrex +sycl dimensions=3 |   - amrex +sycl dimensions=3 | ||||||
|   - arborx +sycl ^kokkos +sycl +openmp std=17 +tests +examples |   - arborx +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples | ||||||
|   - cabana +sycl ^kokkos +sycl +openmp std=17 +tests +examples |   - cabana +sycl ^kokkos +sycl +openmp cxxstd=17 +tests +examples | ||||||
|   - kokkos +sycl +openmp std=17 +tests +examples |   - kokkos +sycl +openmp cxxstd=17 +tests +examples | ||||||
|   - kokkos-kernels build_type=Release %oneapi ^kokkos +sycl +openmp std=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. |   # - 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' |   # - hpctoolkit +level_zero            # intel-tbb: icpx: error: unknown argument: '-flifetime-dse=1' | ||||||
|   | |||||||
| @@ -187,7 +187,7 @@ class Ascent(CMakePackage, CudaPackage): | |||||||
|     depends_on("vtk-m+fpic", when="@0.8.0: +vtkh") |     depends_on("vtk-m+fpic", when="@0.8.0: +vtkh") | ||||||
|     depends_on("vtk-m~shared+fpic", when="@0.8.0: +vtkh~shared") |     depends_on("vtk-m~shared+fpic", when="@0.8.0: +vtkh~shared") | ||||||
|     # Ascent defaults to C++11 |     # 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 |     # VTK-h | ||||||
|   | |||||||
| @@ -42,7 +42,7 @@ class HpxKokkos(CMakePackage, CudaPackage, ROCmPackage): | |||||||
| 
 | 
 | ||||||
|     for cxxstd in cxxstds: |     for cxxstd in cxxstds: | ||||||
|         depends_on("hpx cxxstd={0}".format(cxxstd), when="cxxstd={0}".format(cxxstd)) |         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 |     # HPXKokkos explicitly supports CUDA and ROCm. Other GPU backends can be | ||||||
|     # used but without support in HPXKokkos. Other CPU backends, except Serial, |     # used but without support in HPXKokkos. Other CPU backends, except Serial, | ||||||
|   | |||||||
| @@ -200,29 +200,30 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): | |||||||
|     depends_on("kokkos-nvcc-wrapper@master", when="@master+wrapper") |     depends_on("kokkos-nvcc-wrapper@master", when="@master+wrapper") | ||||||
|     conflicts("+wrapper", when="~cuda") |     conflicts("+wrapper", when="~cuda") | ||||||
| 
 | 
 | ||||||
|     stds = ["11", "14", "17", "20"] |     cxxstds = ["11", "14", "17", "20"] | ||||||
|     # TODO: This should be named cxxstd for consistency with other packages |     variant("cxxstd", default="17", values=cxxstds, multi=False, description="C++ standard") | ||||||
|     variant("std", default="17", values=stds, multi=False, description="C++ standard") |  | ||||||
|     variant("pic", default=False, description="Build position independent code") |     variant("pic", default=False, description="Build position independent code") | ||||||
| 
 | 
 | ||||||
|     conflicts("std=11", when="@3.7:") |     conflicts("cxxstd=11", when="@3.7:") | ||||||
|     conflicts("std=14", when="@4.0:") |     conflicts("cxxstd=14", when="@4.0:") | ||||||
| 
 | 
 | ||||||
|     conflicts("+cuda", when="std=17 ^cuda@:10") |     conflicts("+cuda", when="cxxstd=17 ^cuda@:10") | ||||||
|     conflicts("+cuda", when="std=20 ^cuda@:11") |     conflicts("+cuda", when="cxxstd=20 ^cuda@:11") | ||||||
| 
 | 
 | ||||||
|     # SYCL and OpenMPTarget require C++17 or higher |     # SYCL and OpenMPTarget require C++17 or higher | ||||||
|     for stdver in stds[: stds.index("17")]: |     for cxxstdver in cxxstds[: cxxstds.index("17")]: | ||||||
|         conflicts("+sycl", when="std={0}".format(stdver), msg="SYCL requires C++17 or higher") |         conflicts( | ||||||
|  |             "+sycl", when="cxxstd={0}".format(cxxstdver), msg="SYCL requires C++17 or higher" | ||||||
|  |         ) | ||||||
|         conflicts( |         conflicts( | ||||||
|             "+openmptarget", |             "+openmptarget", | ||||||
|             when="std={0}".format(stdver), |             when="cxxstd={0}".format(cxxstdver), | ||||||
|             msg="OpenMPTarget requires C++17 or higher", |             msg="OpenMPTarget requires C++17 or higher", | ||||||
|         ) |         ) | ||||||
| 
 | 
 | ||||||
|     # HPX should use the same C++ standard |     # HPX should use the same C++ standard | ||||||
|     for std in stds: |     for cxxstd in cxxstds: | ||||||
|         depends_on("hpx cxxstd={0}".format(std), when="+hpx std={0}".format(std)) |         depends_on("hpx cxxstd={0}".format(cxxstd), when="+hpx cxxstd={0}".format(cxxstd)) | ||||||
| 
 | 
 | ||||||
|     # HPX version constraints |     # HPX version constraints | ||||||
|     depends_on("hpx@:1.6", when="@:3.5 +hpx") |     depends_on("hpx@:1.6", when="@:3.5 +hpx") | ||||||
| @@ -283,7 +284,7 @@ def cmake_args(self): | |||||||
| 
 | 
 | ||||||
|         options = [ |         options = [ | ||||||
|             from_variant("CMAKE_POSITION_INDEPENDENT_CODE", "pic"), |             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"), |             from_variant("BUILD_SHARED_LIBS", "shared"), | ||||||
|         ] |         ] | ||||||
| 
 | 
 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user