From: Matthias Maier Date: Mon, 3 Jul 2023 04:34:23 +0000 (-0500) Subject: lac/trilinos_tpetra...h: Fix compilation on Ubuntu 20.04 X-Git-Tag: relicensing~780^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fdebbd53eb1d0057feb96dd1a4755b7e6e79245;p=dealii.git lac/trilinos_tpetra...h: Fix compilation on Ubuntu 20.04 --- 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);