Skip to content

Commit

Permalink
Xpetra: Fix CrsMatrix unit test
Browse files Browse the repository at this point in the history
Failed, since the local matrix isn't cached anymore in Epetra.
  • Loading branch information
cgcgcg committed Sep 29, 2021
1 parent fc98845 commit 49aeeb3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/xpetra/test/CrsMatrix/CrsMatrix_UnitTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,13 @@ namespace {

// check that the local_matrix_type taken the second time is the same
auto view3 = A->getLocalMatrixHost();
TEST_EQUALITY(view2.graph.row_map.data(), view3.graph.row_map.data());
// The row pointer is only identical for Tpetra. For Epetra, the
// rowptr has a different type than what the local matrix wants,
// so we are copying to a new Kokkos view..
if (map->lib() == Xpetra::UseTpetra)
TEST_EQUALITY(view2.graph.row_map.data(), view3.graph.row_map.data());
TEST_EQUALITY(view2.graph.entries.data(), view3.graph.entries.data());
TEST_EQUALITY(view2.values.data(), view3.values.data());

for (LO r = 0; r < view2.numRows(); ++r) {
// extract data from current row r
Expand Down

0 comments on commit 49aeeb3

Please sign in to comment.