diff --git a/CMakeLists.txt b/CMakeLists.txt index 17bd614f..48ced9fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,8 @@ cmake_minimum_required(VERSION 3.13) +# EKAT requires C++20 +set(CMAKE_CXX_STANDARD 20) + set (EKAT_CMAKE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake CACHE INTERNAL "") # Do not ignore env vars in find_package() calls @@ -86,6 +89,13 @@ if (EKAT_ENABLE_MPI) set(EKAT_MPI_THREAD_FLAG "" CACHE STRING "The mpirun flag for designating the number of threads") endif() +############################## +### KOKKOS CONFIG OPTIONS ### +############################## +# FIXME: View usage in Hommexx and EAMxx needs to allow for Kokkos' MDSpan view implementation as the legacy +# implementation will go away in the future, unnanounced (it's an "impl" option => no deprecation). +option (Kokkos_ENABLE_IMPL_VIEW_LEGACY "Currently, EKAT is only compatible with Kokkos' legacy view implementation." ON) + ############################################ ### COMPILER/OS-SPECIFIC CONFIG OPTIONS ### ############################################ diff --git a/cacts.yaml b/cacts.yaml index c676a4b6..99c5caed 100644 --- a/cacts.yaml +++ b/cacts.yaml @@ -92,7 +92,6 @@ configurations: uses_baselines: False on_by_default: True cmake_args: - CMAKE_CXX_STANDARD: 20 EKAT_ENABLE_ALL_PACKAGES: True EKAT_TEST_THREAD_INC: ${2 if machine.gpu_arch is None else 1} EKAT_TEST_MAX_THREADS: ${machine.num_run_res if machine.gpu_arch is None else 1} diff --git a/cmake/EkatSetCompilerFlags.cmake b/cmake/EkatSetCompilerFlags.cmake index 68b09f06..fe94fa7e 100644 --- a/cmake/EkatSetCompilerFlags.cmake +++ b/cmake/EkatSetCompilerFlags.cmake @@ -74,7 +74,7 @@ endmacro() ############################# macro (SetGeneralFlags) if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" OR CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM") - SetFlags (FFLAGS "-assume byterecl -ftz" CXXFLAGS -restrict) + SetFlags (FFLAGS "-assume byterecl -ftz") elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") SetFlags (FFLAGS -ffree-line-length-none) endif() diff --git a/extern/kokkos b/extern/kokkos index 6a19eb94..297e1825 160000 --- a/extern/kokkos +++ b/extern/kokkos @@ -1 +1 @@ -Subproject commit 6a19eb9454da490dbf785443d8f021028baeb161 +Subproject commit 297e182502896611ccc699b4935d1bcc703293c9 diff --git a/extern/spdlog b/extern/spdlog index bdd1dff3..472945ba 160000 --- a/extern/spdlog +++ b/extern/spdlog @@ -1 +1 @@ -Subproject commit bdd1dff3788ebfe520f48f9ad216c60da6dd8f00 +Subproject commit 472945ba489e3f5684761affc431ae532ab5ed8c diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 6e969021..edd83db3 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -59,9 +59,6 @@ add_library(ekat_core ekat_test_utils.cpp ) -# EKAT requires c++17 features -target_compile_features(ekat_core PUBLIC cxx_std_17) - # Add the correct ekat::Comm impl file, depending on whether MPI is ON/OFF. if (EKAT_ENABLE_MPI) target_sources(ekat_core PRIVATE ekat_comm.cpp) diff --git a/src/kokkos/ekat_kokkos_meta.hpp b/src/kokkos/ekat_kokkos_meta.hpp index b112743b..44cef0a8 100644 --- a/src/kokkos/ekat_kokkos_meta.hpp +++ b/src/kokkos/ekat_kokkos_meta.hpp @@ -24,7 +24,7 @@ struct MemoryTraitsMask { template using Unmanaged = // Provide a full View type specification, augmented with Unmanaged. - Kokkos::View