Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ifpack2 uninitialized read fix #10795

Merged
merged 1 commit into from
Jul 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,14 @@ setup(const Teuchos::RCP<const row_matrix_type>& A_unfiltered,
//Fill the local matrix of A_ (filtered and permuted)
//First, construct the rowmap by counting the entries in each row
row_map_type localRowptrs(Kokkos::view_alloc(Kokkos::WithoutInitializing, "Filtered rowptrs"), numLocalRows + 1);
Kokkos::parallel_for(policy_type(0, numLocalRows),
Kokkos::parallel_for(policy_type(0, numLocalRows + 1),
KOKKOS_LAMBDA(local_ordinal_type i)
{
if(i == numLocalRows)
{
localRowptrs(i) = 0;
return;
}
//Count the entries that will be in filtered row i.
//This means entries which correspond to local, non-singleton rows/columns.
local_ordinal_type numEntries = 0;
Expand Down Expand Up @@ -270,8 +275,6 @@ setup(const Teuchos::RCP<const row_matrix_type>& A_unfiltered,
}
}
localRowptrs(i) = numEntries;
if(i == numLocalRows - 1)
localRowptrs(i + 1) = 0;
});
//Prefix sum to finish computing the rowptrs
size_type numLocalEntries;
Expand Down