Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./xmlchange --append SCREAM_CMAKE_OPTIONS='HOMMEXX_ENABLE_CAAR_OPT ON'
1 change: 1 addition & 0 deletions components/homme/cmake/machineFiles/pm-cpu-bfb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ SET(Kokkos_ENABLE_CUDA_LAMBDA OFF CACHE BOOL "")
SET(Kokkos_ARCH_AMPERE80 OFF CACHE BOOL "")
SET(Kokkos_ENABLE_EXPLICIT_INSTANTIATION OFF CACHE BOOL "")
#SET(Kokkos_ENABLE_CUDA_ARCH_LINKING OFF CACHE BOOL "")
SET(HOMMEXX_ENABLE_CAAR_OPT OFF CACHE BOOL "")

SET(CXXLIB_SUPPORTED_CACHE FALSE CACHE BOOL "")

Expand Down
1 change: 1 addition & 0 deletions components/homme/cmake/machineFiles/pm-cpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ SET(Kokkos_ENABLE_CUDA_LAMBDA OFF CACHE BOOL "")
SET(Kokkos_ARCH_AMPERE80 OFF CACHE BOOL "")
SET(Kokkos_ENABLE_EXPLICIT_INSTANTIATION OFF CACHE BOOL "")
#SET(Kokkos_ENABLE_CUDA_ARCH_LINKING OFF CACHE BOOL "")
SET(HOMMEXX_ENABLE_CAAR_OPT OFF CACHE BOOL "")

SET(CXXLIB_SUPPORTED_CACHE FALSE CACHE BOOL "")

Expand Down
3 changes: 2 additions & 1 deletion components/homme/cmake/machineFiles/pm-gpu-bfb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ SET(Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC OFF CACHE BOOL "")
#SET(Kokkos_ENABLE_CUDA_UVM ON CACHE BOOL "")
SET(Kokkos_ENABLE_EXPLICIT_INSTANTIATION OFF CACHE BOOL "")
#SET(Kokkos_ENABLE_CUDA_ARCH_LINKING OFF CACHE BOOL "")
SET(HOMMEXX_ENABLE_CAAR_OPT OFF CACHE BOOL "")

SET(CXXLIB_SUPPORTED_CACHE FALSE CACHE BOOL "")

Expand All @@ -139,5 +140,5 @@ SET(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "")
SET(USE_NUM_PROCS 4 CACHE STRING "") # only default

SET(USE_MPIEXEC "srun" CACHE STRING "")
SET(USE_MPI_OPTIONS "-K --cpu-bind=cores" CACHE STRING "")
SET(USE_MPI_OPTIONS "-C gpu -K --cpu-bind=cores" CACHE STRING "")
SET(HOMME_TESTING_TIMELIMIT 1800 CACHE STRING "")
3 changes: 2 additions & 1 deletion components/homme/cmake/machineFiles/pm-gpu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ SET(Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC OFF CACHE BOOL "")
#SET(Kokkos_ENABLE_CUDA_UVM ON CACHE BOOL "")
SET(Kokkos_ENABLE_EXPLICIT_INSTANTIATION OFF CACHE BOOL "")
#SET(Kokkos_ENABLE_CUDA_ARCH_LINKING OFF CACHE BOOL "")
SET(HOMMEXX_ENABLE_CAAR_OPT OFF CACHE BOOL "")

SET(CXXLIB_SUPPORTED_CACHE FALSE CACHE BOOL "")

Expand All @@ -88,5 +89,5 @@ SET(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "")
SET(USE_NUM_PROCS 4 CACHE STRING "") # only default

SET(USE_MPIEXEC "srun" CACHE STRING "")
SET(USE_MPI_OPTIONS "-K --cpu-bind=cores" CACHE STRING "")
SET(USE_MPI_OPTIONS "-C gpu -K --cpu-bind=cores" CACHE STRING "")
SET(HOMME_TESTING_TIMELIMIT 1800 CACHE STRING "")
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// For preqx_kokkos, the caar-opt path is not implemented.
// Fall back to the standard CaarFunctorImpl.
#include "CaarFunctorImpl.hpp"
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ class HyperviscosityFunctorImpl
SphereOperators m_sphere_ops;

// Policies
#ifndef NDEBUG
#if defined(KOKKOS_ENABLE_CUDA) && !defined(NDEBUG)
template<typename Tag>
using TeamPolicyType = Kokkos::TeamPolicy<ExecSpace,Kokkos::LaunchBounds<512,1>,Tag>;
#else
Expand Down
5 changes: 5 additions & 0 deletions components/homme/src/share/cxx/CaarFunctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
*******************************************************************************/

#include "CaarFunctor.hpp"
#include "Hommexx_config.h"
#ifdef HOMMEXX_ENABLE_CAAR_OPT
#include "CaarFunctorImpl-caar-opt.hpp"
#else
#include "CaarFunctorImpl.hpp"
#endif
#include "Context.hpp"
#include "Elements.hpp"
#include "ErrorDefs.hpp"
Expand Down
3 changes: 3 additions & 0 deletions components/homme/src/share/cxx/Hommexx_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
// Whether the debug parts of cxx code should be compiled or not
#cmakedefine HOMMEXX_DEBUG

// Enable CAAR Optimization
#cmakedefine HOMMEXX_ENABLE_CAAR_OPT

// Whether the MPI operations have to be performed directly on the device
#cmakedefine01 HOMMEXX_MPI_ON_DEVICE

Expand Down
Loading
Loading