]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use Kokkos::abort directly 14772/head
authorDaniel Arndt <arndtd@ornl.gov>
Wed, 8 Feb 2023 22:13:50 +0000 (17:13 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Fri, 24 Feb 2023 17:20:07 +0000 (12:20 -0500)
include/deal.II/base/exceptions.h
include/deal.II/base/kokkos.h
include/deal.II/base/tensor.h
source/base/kokkos.cc

index 71c7889bd7f9007dc72ffb9983510dfdf15c904a..2f7416e4f2a45402f60778e1ee5eeb30c6398e0f 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <deal.II/base/config.h>
 
-#include <deal.II/base/kokkos.h>
+#include <Kokkos_Core.hpp>
 
 #include <exception>
 #include <ostream>
@@ -1524,7 +1524,7 @@ namespace deal_II_exceptions
           }))                                                                \
           KOKKOS_IF_ON_DEVICE(({                                             \
             if (!(cond))                                                     \
-              dealii::internal::kokkos_abort(#cond);                         \
+              Kokkos::abort(#cond);                                          \
           }))                                                                \
         }
 #    else /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
@@ -1544,7 +1544,7 @@ namespace deal_II_exceptions
           }))                                                                \
           KOKKOS_IF_ON_DEVICE(({                                             \
             if (!(cond))                                                     \
-              dealii::internal::kokkos_abort(#cond);                         \
+              Kokkos::abort(#cond);                                          \
           }))                                                                \
         }
 #    endif /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
@@ -1580,10 +1580,10 @@ namespace deal_II_exceptions
           }
 #      endif /*ifdef DEAL_II_HAVE_BUILTIN_EXPECT*/
 #    else    /*#ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
-#      define Assert(cond, exc)                    \
-        {                                          \
-          if (!(cond))                             \
-            dealii::internal::kokkos_abort(#cond); \
+#      define Assert(cond, exc)   \
+        {                         \
+          if (!(cond))            \
+            Kokkos::abort(#cond); \
         }
 #    endif /*ifdef KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
 #  endif   /*KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST*/
index 29023986c0365c2880f459a74457601c48ed3c62..70b5757c54fa401d329f141cf1d717dc22a21970 100644 (file)
@@ -34,13 +34,6 @@ namespace internal
   void
   ensure_kokkos_initialized();
 
-  /**
-   * Calls Kokkos::abort. This wrapper avoids including Kokkos_Core.hpp, which
-   * provides all of Kokkos' functionalities, on the call side.
-   */
-  KOKKOS_FUNCTION void
-  kokkos_abort(const char *error);
-
 } // namespace internal
 
 DEAL_II_NAMESPACE_CLOSE
index 1dc1dd9a128c929303676fb37c0bbf88f553f086..eefd25c2fb0de3b7c10cd20764147b28b015928d 100644 (file)
@@ -1166,7 +1166,7 @@ namespace internal
       KOKKOS_IF_ON_DEVICE(({
         (void)val;
         (void)s;
-        dealii::internal::kokkos_abort(
+        Kokkos::abort(
           "This function is not implemented for std::complex<Number>!\n");
       }))
 #  else
@@ -1175,7 +1175,7 @@ namespace internal
 #    else
       (void)val;
       (void)s;
-      dealii::internal::kokkos_abort(
+      Kokkos::abort(
         "This function is not implemented for std::complex<Number>!\n");
 #    endif
 #  endif
index 417efa5decee19fe90a950f56514c5ad9f3a16a5..5ea3b374c15a86b7fb3a1d115402be89e7d36e23 100644 (file)
@@ -41,11 +41,5 @@ namespace internal
         (void)dummy;
       }
   }
-
-  KOKKOS_FUNCTION void
-  kokkos_abort(const char *error)
-  {
-    Kokkos::abort(error);
-  }
 } // namespace internal
 DEAL_II_NAMESPACE_CLOSE

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.