From 27c027799de3b61040c7feaea101957cb9940e53 Mon Sep 17 00:00:00 2001 From: Nathan Ellingwood Date: Thu, 29 Aug 2024 09:40:57 -0600 Subject: [PATCH] sacado: workaround icpc ice with is_same_v For intel icpc compilers use inline constexpr rather than static constexpr for is_same_v specialization introduced in #13392 This is to workaround intel ICE issues that should not be related to the change but occur when building Trilinos with or without Kokkos' develop branch Error output sample: ``` /home/ndellin/trilinos/Trilinos/packages/sacado/test/UnitTests/ConditionalReturnTypeTest.cpp(48): internal error: assertion failed at: "il.c", line 10434 in trans_unit_for_source_corresp ``` --- packages/sacado/src/Kokkos_LayoutContiguous.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/sacado/src/Kokkos_LayoutContiguous.hpp b/packages/sacado/src/Kokkos_LayoutContiguous.hpp index ed24481eaf29..acb722d2fe99 100644 --- a/packages/sacado/src/Kokkos_LayoutContiguous.hpp +++ b/packages/sacado/src/Kokkos_LayoutContiguous.hpp @@ -83,7 +83,11 @@ namespace std { }; template +#if defined(KOKKOS_COMPILER_INTEL) + inline constexpr bool is_same_v< Kokkos::LayoutContiguous, Layout> = is_same, Layout>::value; +#else static constexpr bool is_same_v< Kokkos::LayoutContiguous, Layout> = is_same, Layout>::value; +#endif template struct is_same< Layout, Kokkos::LayoutContiguous > { @@ -91,7 +95,11 @@ namespace std { }; template +#if defined(KOKKOS_COMPILER_INTEL) + inline constexpr bool is_same_v< Layout, Kokkos::LayoutContiguous> = is_same, Layout>::value; +#else static constexpr bool is_same_v< Layout, Kokkos::LayoutContiguous> = is_same, Layout>::value; +#endif } #if KOKKOS_VERSION >= 40499