From 5fdebbd53eb1d0057feb96dd1a4755b7e6e79245 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 2 Jul 2023 23:34:23 -0500 Subject: [PATCH] lac/trilinos_tpetra...h: Fix compilation on Ubuntu 20.04 --- .../deal.II/lac/trilinos_tpetra_vector.templates.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/deal.II/lac/trilinos_tpetra_vector.templates.h b/include/deal.II/lac/trilinos_tpetra_vector.templates.h index e1f1dc06b5..d521d6607d 100644 --- a/include/deal.II/lac/trilinos_tpetra_vector.templates.h +++ b/include/deal.II/lac/trilinos_tpetra_vector.templates.h @@ -132,7 +132,16 @@ namespace LinearAlgebra auto vector_2d = vector.template getLocalView( Tpetra::Access::ReadOnly); # else - vector.template sync(); + /* + * For Trilinos older than 13.2 we would normally have to call + * vector.template sync() 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(); # endif auto vector_1d = Kokkos::subview(vector_2d, Kokkos::ALL(), 0); -- 2.39.5