From dc29eb1aedff3157bc1d35a521c344160c0febbc Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 14 May 2024 18:23:33 -0600 Subject: [PATCH] Simplify code. Co-authored-by: Daniel Arndt --- source/base/exceptions.cc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/source/base/exceptions.cc b/source/base/exceptions.cc index 951c0d3844..50cd791f1d 100644 --- a/source/base/exceptions.cc +++ b/source/base/exceptions.cc @@ -517,20 +517,11 @@ namespace deal_II_exceptions } #endif -#if KOKKOS_VERSION >= 30600 - KOKKOS_IF_ON_HOST(({ std::abort(); })) - KOKKOS_IF_ON_DEVICE(({ - Kokkos::abort( - "Abort() was called during dealing with an assertion or exception."); - })) -#else /*if KOKKOS_VERSION >= 30600*/ -# ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST - std::abort(); -# else + // Let's abort the program here. On the host, we need to call std::abort, + // on devices we need to do something different. Kokkos::abort() does + // the right thing in all circumstances. Kokkos::abort( "Abort() was called during dealing with an assertion or exception."); -# endif -#endif } -- 2.39.5