Skip to content

Commit

Permalink
remove kokkos <4 initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpintarelli committed Jun 6, 2024
1 parent c74f83b commit 957951c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 4 additions & 2 deletions spack/packages/nlcglib/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ class Nlcglib(CMakePackage, CudaPackage, ROCmPackage):

depends_on("googletest", type="build", when="+tests")
depends_on("nlohmann-json")
depends_on("kokkos@4:", when="@1.1:")

# MKLConfig.cmake introduced in 2021.3
conflicts("intel-oneapi-mkl@:2021.2", when="^intel-oneapi-mkl")

with when("@:0.9"):
conflicts("+rocm")
Expand Down Expand Up @@ -114,8 +118,6 @@ def cmake_args(self):
else:
options += [self.define("CMAKE_CUDA_ARCHITECTURES", cuda_archs)]



if "^cuda+allow-unsupported-compilers" in self.spec:
options += [self.define("CMAKE_CUDA_FLAGS", "--allow-unsupported-compiler")]

Expand Down
8 changes: 0 additions & 8 deletions src/nlcglib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,8 @@ namespace nlcglib {
void
initialize()
{
#if KOKKOS_VERSION < 30700
Kokkos::InitArguments args;
args.disable_warnings = true;
#ifdef USE_OPENMP
args.num_threads = omp_get_max_threads();
#endif /* endif USE_OPENMP */
#else /* KOKKOS_VERSION >= 3.7.00 */
Kokkos::InitializationSettings args;
args.set_disable_warnings(true);
#endif /* endif KOKKOS VERSION */
#ifdef USE_OPENMP
args.num_threads = omp_get_max_threads();
#endif
Expand Down

0 comments on commit 957951c

Please sign in to comment.