Skip to content

Commit

Permalink
Remove SPINER_TEST_USE_CUDA in Spack, since it only applies to submod…
Browse files Browse the repository at this point in the history
…ule-builds
  • Loading branch information
rbberger committed Feb 23, 2024
1 parent d25d5de commit 746b7bd
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ before_script:
-DCMAKE_INSTALL_PREFIX=${CI_PROJECT_DIR}/install \
-DSPINER_USE_HDF=ON \
-DSPINER_TEST_USE_KOKKOS=$([[ ${CI_JOB_NAME} =~ "a100" ]] && echo ON || echo OFF) \
-DSPINER_TEST_USE_KOKKOS_CUDA=$([[ ${CI_JOB_NAME} =~ "a100" ]] && echo ON || echo OFF) \
-DCMAKE_CXX_COMPILER=$([[ ${CI_JOB_NAME} =~ "a100" ]] && echo nvcc_wrapper || g++) \
..
- make -j $(nproc)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ option(SPINER_BUILD_TESTS "Compile Tests" OFF)
cmake_dependent_option(SPINER_TEST_USE_KOKKOS "Use kokkos offloading for tests"
ON "SPINER_BUILD_TESTS" OFF)
cmake_dependent_option(
SPINER_TEST_USE_KOKKOS_CUDA "Use kokkos cuda offloading for tests" ON
SPINER_TEST_USE_KOKKOS_CUDA "Use kokkos cuda offloading for tests (affects submodule-build only)" ON
"SPINER_TEST_USE_KOKKOS" ON)

# CTest
Expand Down
7 changes: 1 addition & 6 deletions spack-repo/packages/spiner/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,15 @@ class Spiner(CMakePackage):
def cmake_args(self):
if self.spec.satisfies("@1.6.0:"):
use_kokkos_option = "SPINER_TEST_USE_KOKKOS"
use_cuda_option = "SPINER_TEST_USE_CUDA"
else:
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(use_cuda_option, use_cuda),
self.define_from_variant("SPINER_USE_HDF", "hdf5"),
]
if use_cuda:
if self.spec.satisfies("^kokkos+cuda"):
args.append(
self.define("CMAKE_CUDA_ARCHITECTURES", self.spec["kokkos"].variants["cuda_arch"].value)
)
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if (SPINER_TEST_USE_KOKKOS)
list(APPEND _spiner_content_opts "Kokkos_ENABLE_CUDA_LAMBDA")
list(APPEND _spiner_content_opts "Kokkos_ENABLE_CUDA_CONSTEXPR")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND _spiner_content_opts "Kokkos_ENABLE_DEBUG")
list(APPEND _spiner_content_opts "Kokkos_ENABLE_DEBUG_BOUNDS_CHECK")
list(APPEND _spiner_content_opts "Kokkos_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK")
Expand Down

0 comments on commit 746b7bd

Please sign in to comment.