diff --git a/packages/muelu/test/unit_tests/Regression.cpp b/packages/muelu/test/unit_tests/Regression.cpp index 3bb6e65b2a4f..24d54ed37859 100644 --- a/packages/muelu/test/unit_tests/Regression.cpp +++ b/packages/muelu/test/unit_tests/Regression.cpp @@ -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 ? 24 : 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::Build(A->getRowMap(), 1); auto B = Xpetra::MultiVectorFactory::Build(A->getRowMap(), 1);