Skip to content

Commit

Permalink
Merge pull request #12874 from cgcgcg/mueluRegressionUVM2
Browse files Browse the repository at this point in the history
MueLu: Set counts for Regression test
  • Loading branch information
cgcgcg authored Apr 4, 2024
2 parents f7582a7 + e727d62 commit 9b24394
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
-->

<!-- =========== GENERAL ================ -->
<Parameter name="aggregation: deterministic" type="bool" value="true"/>

<Parameter name="verbosity" type="string" value="high"/>

<Parameter name="coarse: max size" type="int" value="50"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
-->

<!-- =========== GENERAL ================ -->
<Parameter name="aggregation: deterministic" type="bool" value="true"/>

<Parameter name="verbosity" type="string" value="high"/>

<Parameter name="coarse: max size" type="int" value="50"/>
Expand Down
10 changes: 9 additions & 1 deletion packages/muelu/test/unit_tests/Regression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,17 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Regression, H2D, Scalar, LocalOrdinal, GlobalO

if (Node::is_cpu) {
TEST_EQUALITY(Tpetra::Details::DeepCopyCounter::get_count_different_space(), 0);
} else {
}
#ifdef KOKKOS_HAS_SHARED_SPACE
else {
size_t targetNumDeepCopies = std::is_same_v<typename Node::memory_space, Kokkos::SharedSpace> ? 20 : 37;
TEST_EQUALITY(Tpetra::Details::DeepCopyCounter::get_count_different_space(), targetNumDeepCopies);
}
#else
else {
TEST_EQUALITY(Tpetra::Details::DeepCopyCounter::get_count_different_space(), 37);
}
#endif

auto X = Xpetra::MultiVectorFactory<SC, LO, GO, NO>::Build(A->getRowMap(), 1);
auto B = Xpetra::MultiVectorFactory<SC, LO, GO, NO>::Build(A->getRowMap(), 1);
Expand Down
2 changes: 1 addition & 1 deletion packages/muelu/test/unit_tests_kokkos/Regression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TEUCHOS_UNIT_TEST_TEMPLATE_4_DECL(Regression, H2D, Scalar, LocalOrdinal, GlobalO
}
#ifdef KOKKOS_HAS_SHARED_SPACE
else {
size_t targetNumDeepCopies = std::is_same_v<typename Node::memory_space, Kokkos::SharedSpace> ? 31 : 42;
size_t targetNumDeepCopies = std::is_same_v<typename Node::memory_space, Kokkos::SharedSpace> ? 27 : 42;
TEST_EQUALITY(Tpetra::Details::DeepCopyCounter::get_count_different_space(), targetNumDeepCopies);
}
#else
Expand Down

0 comments on commit 9b24394

Please sign in to comment.