Skip to content

Commit

Permalink
Amesos2 : reindex initialize to catch un-matched col GIDs
Browse files Browse the repository at this point in the history
Signed-off-by: iyamazaki <iyamaza@sandia.gov>
  • Loading branch information
iyamazaki committed Feb 5, 2025
1 parent 9a75bdd commit e595265
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ namespace Amesos2 {
}
// Create new GID list for ColMap
Kokkos::View<global_ordinal_t*, HostExecSpaceType> colIndexList ("colIndexList", nCols);
for (local_ordinal_t k = 0; k < nCols; k++) {
colIndexList(k) = indexBase-1; // initialize to catch col GIDs that are not in row GIDs
}
typedef Tpetra::MultiVector<global_ordinal_t,
local_ordinal_t,
global_ordinal_t,
Expand All @@ -144,7 +147,7 @@ namespace Amesos2 {
auto col_view = col_mv.getLocalViewHost(Tpetra::Access::ReadOnly);
for(int i=0; i<nCols; i++) {
if (col_view(i,0) < indexBase) {
// This indicate colMap has GIDs that are not in rowMap (rectangular matrix)
// This indicates colMap has GIDs that are not in rowMap (rectangular matrix)
contigRowMap = RCP<map_t>();
contigColMap = RCP<map_t>();
return RCP<ConcreteMatrixAdapter<matrix_t>>();
Expand Down

0 comments on commit e595265

Please sign in to comment.