]> https://gitweb.dealii.org/ - dealii.git/commitdiff
lac/trilinos_tpetra...h: Fix compilation on Ubuntu 20.04 15612/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 3 Jul 2023 04:34:23 +0000 (23:34 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 3 Jul 2023 04:34:23 +0000 (23:34 -0500)
include/deal.II/lac/trilinos_tpetra_vector.templates.h

index e1f1dc06b5ef011f8b86e33510ca77c0b048111b..d521d6607d9ebc2d46eb8fe897cb64a3ebcb628d 100644 (file)
@@ -132,7 +132,16 @@ namespace LinearAlgebra
       auto vector_2d = vector.template getLocalView<Kokkos::HostSpace>(
         Tpetra::Access::ReadOnly);
 #  else
-      vector.template sync<Kokkos::HostSpace>();
+      /*
+       * For Trilinos older than 13.2 we would normally have to call
+       * vector.template sync<Kokkos::HostSpace>() at this place in order
+       * to sync between memory spaces. This is necessary for GPU support.
+       * Unfortunately, we are in a const context here and cannot call to
+       * sync() (which is a non-const member function).
+       *
+       * Let us choose to simply ignore this problem for such an old
+       * Trilinos version.
+       */
       auto vector_2d = vector.template getLocalView<Kokkos::HostSpace>();
 #  endif
       auto vector_1d = Kokkos::subview(vector_2d, Kokkos::ALL(), 0);

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.