Skip to content

Commit

Permalink
Merge pull request #15612 from tamiko/fix_compilation_with_trilinos_1…
Browse files Browse the repository at this point in the history
…2.14

lac/trilinos_tpetra...h: Fix compilation on Ubuntu 20.04
  • Loading branch information
tamiko committed Jul 3, 2023
2 parents 80c4fc3 + 5fdebbd commit 68614f5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/deal.II/lac/trilinos_tpetra_vector.templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 68614f5

Please sign in to comment.