]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use Kokkos::abort() where necessary.
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 14 May 2024 02:02:38 +0000 (20:02 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 14 May 2024 02:02:38 +0000 (20:02 -0600)
source/base/exceptions.cc

index 391dc385f2e2146368465fc8ce6a30bc47e85c26..951c0d3844ee7c7cdcac3659f869245bd630d0d7 100644 (file)
@@ -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
     }
 
 

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.