From: Daniel Arndt Date: Fri, 16 Aug 2024 16:58:02 +0000 (-0600) Subject: Always use Kokkos::abort when it's noreturn X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17552%2Fhead;p=dealii.git Always use Kokkos::abort when it's noreturn --- diff --git a/source/base/exceptions.cc b/source/base/exceptions.cc index f20d577be1..794fb72cd9 100644 --- a/source/base/exceptions.cc +++ b/source/base/exceptions.cc @@ -517,9 +517,11 @@ namespace deal_II_exceptions } #endif - // 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. + // 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. + +#if KOKKOS_VERSION < 30200 if constexpr (std::is_same_v) { @@ -529,6 +531,7 @@ namespace deal_II_exceptions std::abort(); } else +#endif { Kokkos::abort( "Abort() was called during dealing with an assertion or exception.");