From 97de38f24d138f86b8439ee0d8944fed59976e22 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 16 Aug 2024 10:58:02 -0600 Subject: [PATCH] Always use Kokkos::abort when it's noreturn --- source/base/exceptions.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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."); -- 2.39.5