From dc7181a7234b6dced17dee581de2cae247c5e01e Mon Sep 17 00:00:00 2001 From: Sam Reeve <6740307+streeve@users.noreply.github.com> Date: Thu, 25 May 2023 10:44:03 -0400 Subject: [PATCH] Require Kokkos 3.7 for the math namespace update --- .github/workflows/CI.yml | 2 +- CMakeLists.txt | 5 ++++- src/ParticleActions.cxx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1a85973..19d048f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v2.2.0 with: repository: kokkos/kokkos - ref: 3.6.01 + ref: 3.7.01 path: kokkos - name: Build kokkos working-directory: kokkos diff --git a/CMakeLists.txt b/CMakeLists.txt index cc9a873..7240e4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,9 @@ project(HACCabana LANGUAGES CXX C) include(GNUInstallDirs) -find_package(Cabana) +find_package(Cabana REQUIRED) +if(Kokkos_VERSION_MAJOR LESS 4 AND Kokkos_VERSION_MINOR LESS 7) + message( FATAL_ERROR "HACCabana requires Kokkos >= 3.7" ) +endif() add_subdirectory(src) diff --git a/src/ParticleActions.cxx b/src/ParticleActions.cxx index 83cf8b6..ab17bb3 100644 --- a/src/ParticleActions.cxx +++ b/src/ParticleActions.cxx @@ -115,7 +115,7 @@ void ParticleActions::updateVel(\ if (dist2 < rmax2) { const float dist2Err = dist2 + rsm2; - const float tmp = 1.0f/Kokkos::Experimental::sqrt(dist2Err*dist2Err*dist2Err) - FGridEvalPoly(dist2); + const float tmp = 1.0f/Kokkos::sqrt(dist2Err*dist2Err*dist2Err) - FGridEvalPoly(dist2); force[0] += dx * tmp; force[1] += dy * tmp; force[2] += dz * tmp;