From: Daniel Arndt Date: Tue, 30 Jan 2024 22:31:35 +0000 (-0500) Subject: Fix TpetraWrappers::SparsityPattern when compiling for GPU backends X-Git-Tag: relicensing~95^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16569%2Fhead;p=dealii.git Fix TpetraWrappers::SparsityPattern when compiling for GPU backends --- diff --git a/source/lac/trilinos_tpetra_sparsity_pattern.cc b/source/lac/trilinos_tpetra_sparsity_pattern.cc index dc533d7e66..515b7ce87b 100644 --- a/source/lac/trilinos_tpetra_sparsity_pattern.cc +++ b/source/lac/trilinos_tpetra_sparsity_pattern.cc @@ -336,12 +336,14 @@ namespace LinearAlgebra // Translate the vector of row lengths into one that only stores // those entries that related to the locally stored rows of the matrix: - Kokkos::DualView local_entries_per_row( - "local_entries_per_row", - row_map->getMaxGlobalIndex() - row_map->getMinGlobalIndex()); + Kokkos::DualView + local_entries_per_row("local_entries_per_row", + row_map->getMaxGlobalIndex() - + row_map->getMinGlobalIndex()); auto local_entries_per_row_host = - local_entries_per_row.view(); + local_entries_per_row + .template view(); std::uint64_t total_size = 0; for (unsigned int i = 0; i < local_entries_per_row.extent(0); ++i) @@ -350,8 +352,10 @@ namespace LinearAlgebra n_entries_per_row[row_map->getMinGlobalIndex() + i]; total_size += local_entries_per_row_host[i]; } - local_entries_per_row.modify(); - local_entries_per_row.sync(); + local_entries_per_row + .template modify(); + local_entries_per_row + .template sync(); AssertThrow( total_size < static_cast(