From ddf6518ff03b8aa433ee799ac6025876b697aea3 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 30 Jan 2024 17:31:35 -0500 Subject: [PATCH] Fix TpetraWrappers::SparsityPattern when compiling for GPU backends --- source/lac/trilinos_tpetra_sparsity_pattern.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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( -- 2.39.5