Skip to content

Commit

Permalink
Reenable tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstenhater committed Aug 14, 2023
1 parent cd13d2d commit 29f2f98
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/unit-distributed/test_domain_decomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ TEST(domain_decomposition, symmetric_groups) {
std::vector<gj_symmetric> recipes = {gj_symmetric(nranks, true), gj_symmetric(nranks, false)};
for (const auto& R: recipes) {
const auto D0 = partition_load_balance(R, ctx);
// EXPECT_EQ(6u, D0.num_groups());
EXPECT_EQ(6u, D0.num_groups());

unsigned shift = rank * R.num_cells()/nranks;
std::vector<std::vector<cell_gid_type>> expected_groups0 =
Expand All @@ -403,7 +403,7 @@ TEST(domain_decomposition, symmetric_groups) {
};

for (unsigned i = 0; i < 6; i++) {
// EXPECT_EQ(expected_groups0[i], D0.group(i).gids);
EXPECT_EQ(expected_groups0[i], D0.group(i).gids);
}

unsigned cells_per_rank = R.num_cells()/nranks;
Expand All @@ -417,33 +417,33 @@ TEST(domain_decomposition, symmetric_groups) {
hints[cell_kind::cable].prefer_gpu = false;

const auto D1 = partition_load_balance(R, ctx, hints);
// EXPECT_EQ(1u, D1.num_groups());
EXPECT_EQ(1u, D1.num_groups());

std::vector<cell_gid_type> expected_groups1 =
{0 + shift, 3 + shift, 4 + shift, 5 + shift, 8 + shift,
1 + shift, 2 + shift, 6 + shift, 7 + shift, 9 + shift};

// EXPECT_EQ(expected_groups1, D1.group(0).gids);
EXPECT_EQ(expected_groups1, D1.group(0).gids);

for (unsigned i = 0; i < R.num_cells(); i++) {
// EXPECT_EQ(i/cells_per_rank, (unsigned) D1.gid_domain(i));
EXPECT_EQ(i/cells_per_rank, (unsigned) D1.gid_domain(i));
}

hints[cell_kind::cable].cpu_group_size = cells_per_rank/2;
hints[cell_kind::cable].prefer_gpu = false;

const auto D2 = partition_load_balance(R, ctx, hints);
// EXPECT_EQ(2u, D2.num_groups());
EXPECT_EQ(2u, D2.num_groups());

std::vector<std::vector<cell_gid_type>> expected_groups2 =
{{0 + shift, 3 + shift, 4 + shift, 5 + shift, 8 + shift},
{1 + shift, 2 + shift, 6 + shift, 7 + shift, 9 + shift}};

for (unsigned i = 0; i < 2u; i++) {
// EXPECT_EQ(expected_groups2[i], D2.group(i).gids);
EXPECT_EQ(expected_groups2[i], D2.group(i).gids);
}
for (unsigned i = 0; i < R.num_cells(); i++) {
// EXPECT_EQ(i/cells_per_rank, (unsigned) D2.gid_domain(i));
EXPECT_EQ(i/cells_per_rank, (unsigned) D2.gid_domain(i));
}
}
}
Expand Down

0 comments on commit 29f2f98

Please sign in to comment.