]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify code. 17018/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 15 May 2024 00:23:33 +0000 (18:23 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 16 May 2024 12:43:30 +0000 (06:43 -0600)
Co-authored-by: Daniel Arndt <arndtd@ornl.gov>
source/base/exceptions.cc

index 951c0d3844ee7c7cdcac3659f869245bd630d0d7..50cd791f1ddd8158b618389a1c77b849cc527e01 100644 (file)
@@ -517,20 +517,11 @@ 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
+      // 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.
       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.