]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Always use Kokkos::abort when it's noreturn 17552/head
authorDaniel Arndt <arndtd@ornl.gov>
Fri, 16 Aug 2024 16:58:02 +0000 (10:58 -0600)
committerDaniel Arndt <arndtd@ornl.gov>
Fri, 16 Aug 2024 16:58:26 +0000 (10:58 -0600)
source/base/exceptions.cc

index f20d577be1aadba1d3959251ae5776f6032b2262..794fb72cd9a85806df97c1d7bdcc3c6d0076e62a 100644 (file)
@@ -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<Kokkos::DefaultExecutionSpace,
                                    Kokkos::DefaultHostExecutionSpace>)
         {
@@ -529,6 +531,7 @@ namespace deal_II_exceptions
           std::abort();
         }
       else
+#endif
         {
           Kokkos::abort(
             "Abort() was called during dealing with an assertion or exception.");

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.