]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Backport for Kokkos 3.0
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 8 Dec 2022 14:17:51 +0000 (09:17 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 8 Dec 2022 22:13:15 +0000 (17:13 -0500)
cmake/modules/FindDEAL_II_KOKKOS.cmake
include/deal.II/lac/la_parallel_vector.templates.h
include/deal.II/lac/vector_operations_internal.h

index c147281c0d83dfc060d214de22aa03fb658e8e5c..bbe1f4054dc84213f069d319ff77c035e8fe780c 100644 (file)
@@ -32,7 +32,7 @@ if(DEAL_II_TRILINOS_WITH_KOKKOS)
   # Let deal.II know that we have found Kokkos
   set(KOKKOS_FOUND ON)
 else()
-  find_package(Kokkos 3.0.0 QUIET
+  find_package(Kokkos 3.7.0 QUIET
     HINTS ${KOKKOS_DIR} ${Kokkos_DIR} $ENV{Kokkos_DIR}
     )
 
index b280f69f9e90bc029b86b492447485533d75dd16..0733230f529d4562408ce933650eb2e70b7bc2cb 100644 (file)
@@ -480,7 +480,9 @@ namespace LinearAlgebra
               ::dealii::MemorySpace::Device::kokkos_space::execution_space>(
               exec, 0, size),
             KOKKOS_LAMBDA(size_type i, RealType & update) {
-#if KOKKOS_VERSION < 30700
+#if KOKKOS_VERSION < 30400
+              update = fmax(update, fabs(data.values(i)));
+#elif KOKKOS_VERSION < 30700
               update = Kokkos::Experimental::fmax(
                 update, Kokkos::Experimental::fabs(data.values(i)));
 #else
index 323ecb9705226c5f728bd71956f947d2c67aa4a8..4f2a2b475accbf1350e8daf7fac748432d0a02f7 100644 (file)
@@ -2529,7 +2529,9 @@ namespace internal
                                                                           0,
                                                                           size),
           KOKKOS_LAMBDA(size_type i, Number & update) {
-#if KOKKOS_VERSION < 30700
+#if KOKKOS_VERSION < 30400
+            update += fabs(data.values(i));
+#elif KOKKOS_VERSION < 30700
             update += Kokkos::Experimental::fabs(data.values(i));
 #else
             update += Kokkos::fabs(data.values(i));
@@ -2557,7 +2559,9 @@ namespace internal
                                                                           0,
                                                                           size),
           KOKKOS_LAMBDA(size_type i, Number & update) {
-#if KOKKOS_VERSION < 30700
+#if KOKKOS_VERSION < 30400
+            update += pow(fabs(data.values(i)), exp);
+#elif KOKKOS_VERSION < 30700
             update += Kokkos::Experimental::pow(
               Kokkos::Experimental::fabs(data.values(i)), exp);
 #else

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.