From: Wolfgang Bangerth Date: Tue, 14 May 2024 02:02:38 +0000 (-0600) Subject: Use Kokkos::abort() where necessary. X-Git-Tag: v9.6.0-rc1~266^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2841fdf548bca87e567bd455ef0f3f334804365;p=dealii.git Use Kokkos::abort() where necessary. --- 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 }