From d2841fdf548bca87e567bd455ef0f3f334804365 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 13 May 2024 20:02:38 -0600 Subject: [PATCH] Use Kokkos::abort() where necessary. --- source/base/exceptions.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/base/exceptions.cc b/source/base/exceptions.cc index 391dc385f2..951c0d3844 100644 --- a/source/base/exceptions.cc +++ b/source/base/exceptions.cc @@ -516,7 +516,21 @@ 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 + Kokkos::abort( + "Abort() was called during dealing with an assertion or exception."); +# endif +#endif } -- 2.39.5