From bcae301af616e3f04e80b2080b0bd8680e3a0472 Mon Sep 17 00:00:00 2001 From: Maciej Waruszewski Date: Fri, 24 Apr 2026 09:37:08 -0600 Subject: [PATCH 1/3] Switch to C++20 --- components/omega/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/omega/CMakeLists.txt b/components/omega/CMakeLists.txt index 1f4e1d666d99..3d0c487d4992 100644 --- a/components/omega/CMakeLists.txt +++ b/components/omega/CMakeLists.txt @@ -38,7 +38,7 @@ if (NOT DEFINED PROJECT_NAME) # Collect machine and compiler info from CIME init_standalone_build() - set(CMAKE_CXX_STANDARD 17) # used in E3SM + set(CMAKE_CXX_STANDARD 20) # used in E3SM set(CMAKE_CXX_STANDARD_REQUIRED ON) project(${OMEGA_PROJECT_NAME} From 02f3a91922a21428f78cf1e7a5e9d78ddf429dac Mon Sep 17 00:00:00 2001 From: Maciej Waruszewski Date: Mon, 11 May 2026 16:54:30 -0600 Subject: [PATCH 2/3] Disable C++20 modules in cpptrace --- components/omega/external/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/components/omega/external/CMakeLists.txt b/components/omega/external/CMakeLists.txt index 0e565a5763ba..76f4f0178b59 100644 --- a/components/omega/external/CMakeLists.txt +++ b/components/omega/external/CMakeLists.txt @@ -144,6 +144,7 @@ if (NOT TARGET cpptrace::cpptrace) # PACKAGE_VERSION (e.g. 2.10.2) from leaking into libdwarf's configure_file unset(PACKAGE_VERSION) option(CPPTRACE_INHERIT_HOST_STANDARD "" ON) + option(CPPTRACE_DISABLE_CXX_20_MODULES "" ON) add_subdirectory( ${OMEGA_SOURCE_DIR}/external/cpptrace ${CMAKE_CURRENT_BINARY_DIR}/external/cpptrace From 379589d8b4a1bb405200bdb70ba4e008dedeede3 Mon Sep 17 00:00:00 2001 From: Maciej Waruszewski Date: Fri, 24 Apr 2026 11:16:05 -0600 Subject: [PATCH 3/3] Don't use deprecated is_hostspace --- components/omega/src/infra/OmegaKokkos.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/omega/src/infra/OmegaKokkos.h b/components/omega/src/infra/OmegaKokkos.h index e31896dbbe0a..4fb467df0f3b 100644 --- a/components/omega/src/infra/OmegaKokkos.h +++ b/components/omega/src/infra/OmegaKokkos.h @@ -57,9 +57,10 @@ template constexpr ArrayDataType checkArrayType() { // determine ArrayMemLoc from Kokkos array type template constexpr ArrayMemLoc findArrayMemLoc() { - if (std::is_same_v) { + if constexpr (std::is_same_v) { return ArrayMemLoc::Both; - } else if (T::is_hostspace) { + } else if constexpr (std::is_same_v) { return ArrayMemLoc::Host; } else { return ArrayMemLoc::Device;