Skip to content

Commit

Permalink
debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
cwpearson committed Dec 18, 2023
1 parent 7057324 commit 207e99f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions unit_tests/test_initfinalize.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <gtest/gtest.h>

TEST(InitFinalize, nothing) {
std::cerr << __FILE__ << ":" << __LINE__ << "\n";
ASSERT_TRUE(true);
std::cerr << __FILE__ << ":" << __LINE__ << "\n";
}

6 changes: 4 additions & 2 deletions unit_tests/test_isendrecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using ScalarTypes = ::testing::Types<float, double, Kokkos::complex<float>, Kokk
TYPED_TEST_SUITE(IsendRecv, ScalarTypes);

TYPED_TEST(IsendRecv, 1D_contig) {

std::cerr << __FILE__ << ":" << __LINE__ << "\n";
Kokkos::View<typename TestFixture::Scalar *> a("a", 1000);

int rank;
Expand All @@ -34,11 +34,12 @@ TYPED_TEST(IsendRecv, 1D_contig) {
}, errs);
ASSERT_EQ(errs, 0);
}
std::cerr << __FILE__ << ":" << __LINE__ << "\n";
}


TYPED_TEST(IsendRecv, 1D_noncontig) {

std::cerr << __FILE__ << ":" << __LINE__ << "\n";
// this is C-style layout, i.e. b(0,0) is next to b(0,1)
Kokkos::View<typename TestFixture::Scalar **, Kokkos::LayoutRight> b("a", 10, 10);
auto a = Kokkos::subview(b, 2, Kokkos::ALL); // take column 2 (non-contiguous)
Expand All @@ -62,4 +63,5 @@ TYPED_TEST(IsendRecv, 1D_noncontig) {
}, errs);
ASSERT_EQ(errs, 0);
}
std::cerr << __FILE__ << ":" << __LINE__ << "\n";
}
6 changes: 4 additions & 2 deletions unit_tests/test_sendrecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using ScalarTypes = ::testing::Types<int, int64_t, float, double, Kokkos::comple
TYPED_TEST_SUITE(SendRecv, ScalarTypes);

TYPED_TEST(SendRecv, 1D_contig) {

std::cerr << __FILE__ << ":" << __LINE__ << "\n";
Kokkos::View<typename TestFixture::Scalar *> a("a", 1000);

int rank;
Expand All @@ -34,11 +34,12 @@ TYPED_TEST(SendRecv, 1D_contig) {
}, errs);
ASSERT_EQ(errs, 0);
}
std::cerr << __FILE__ << ":" << __LINE__ << "\n";
}


TYPED_TEST(SendRecv, 1D_noncontig) {

std::cerr << __FILE__ << ":" << __LINE__ << "\n";
// this is C-style layout, i.e. b(0,0) is next to b(0,1)
Kokkos::View<typename TestFixture::Scalar **, Kokkos::LayoutRight> b("a", 10, 10);
auto a = Kokkos::subview(b, 2, Kokkos::ALL); // take column 2 (non-contiguous)
Expand All @@ -61,4 +62,5 @@ TYPED_TEST(SendRecv, 1D_noncontig) {
}, errs);
ASSERT_EQ(errs, 0);
}
std::cerr << __FILE__ << ":" << __LINE__ << "\n";
}

0 comments on commit 207e99f

Please sign in to comment.