From a0824a805540f320a5d56f32f0a1849420d409bd Mon Sep 17 00:00:00 2001 From: Marcel Koch Date: Wed, 14 Feb 2024 16:40:41 +0000 Subject: [PATCH] adjust tests --- reference/test/distributed/matrix_kernels.cpp | 218 ++++++------------ test/distributed/matrix_kernels.cpp | 38 +-- test/mpi/matrix.cpp | 8 +- 3 files changed, 86 insertions(+), 178 deletions(-) diff --git a/reference/test/distributed/matrix_kernels.cpp b/reference/test/distributed/matrix_kernels.cpp index eb2473fbfda..302e16a2d6f 100644 --- a/reference/test/distributed/matrix_kernels.cpp +++ b/reference/test/distributed/matrix_kernels.cpp @@ -46,10 +46,7 @@ class Matrix : public ::testing::Test { local_values{ref}, non_local_row_idxs{ref}, non_local_col_idxs{ref}, - non_local_values{ref}, - gather_idxs{ref}, - recv_sizes{ref}, - non_local_to_global{ref} + non_local_values{ref} {} void validate( @@ -72,56 +69,50 @@ class Matrix : public ::testing::Test { std::tuple, std::initializer_list, std::initializer_list, std::initializer_list>> - non_local_entries, - std::initializer_list> - gather_idx_entries, - std::initializer_list> - recv_sizes_entries) + non_local_entries) { std::vector> ref_locals; - std::vector> + std::vector< + std::tuple, gko::array, + gko::array, gko::array>> ref_non_locals; - std::vector> ref_gather_idxs; - std::vector> ref_recv_sizes; auto input = gko::device_matrix_data{ ref, size, gko::array{ref, input_rows}, gko::array{ref, input_cols}, gko::array{ref, input_vals}}; - this->recv_sizes.resize_and_reset( - static_cast(row_partition->get_num_parts())); for (auto entry : local_entries) { ref_locals.emplace_back(ref, std::get<0>(entry), std::get<1>(entry), std::get<2>(entry), std::get<3>(entry)); } for (auto entry : non_local_entries) { - ref_non_locals.emplace_back(ref, std::get<0>(entry), - std::get<1>(entry), std::get<2>(entry), - std::get<3>(entry)); - } - for (auto entry : gather_idx_entries) { - ref_gather_idxs.emplace_back(ref, entry); - } - for (auto entry : recv_sizes_entries) { - ref_recv_sizes.emplace_back(ref, entry); + ref_non_locals.emplace_back( + std::get<0>(entry), + gko::array{ref, std::get<1>(entry)}, + gko::array{ref, std::get<2>(entry)}, + gko::array{ref, std::get<3>(entry)}); } for (comm_index_type part = 0; part < row_partition->get_num_parts(); ++part) { - gko::kernels::reference::distributed_matrix::build_local_nonlocal( - ref, input, row_partition.get(), col_partition.get(), part, - local_row_idxs, local_col_idxs, local_values, - non_local_row_idxs, non_local_col_idxs, non_local_values, - gather_idxs, recv_sizes, non_local_to_global); - - assert_device_matrix_data_equal(local_row_idxs, local_col_idxs, - local_values, ref_locals[part]); - assert_device_matrix_data_equal( - non_local_row_idxs, non_local_col_idxs, non_local_values, - ref_non_locals[part]); - GKO_ASSERT_ARRAY_EQ(gather_idxs, ref_gather_idxs[part]); - GKO_ASSERT_ARRAY_EQ(recv_sizes, ref_recv_sizes[part]); + gko::kernels::reference::distributed_matrix:: + separate_local_nonlocal( + ref, input, row_partition.get(), col_partition.get(), part, + local_row_idxs, local_col_idxs, local_values, + non_local_row_idxs, non_local_col_idxs, non_local_values); + + + auto local_arrays = ref_locals[part].empty_out(); + GKO_ASSERT_ARRAY_EQ(local_row_idxs, local_arrays.row_idxs); + GKO_ASSERT_ARRAY_EQ(local_col_idxs, local_arrays.col_idxs); + GKO_ASSERT_ARRAY_EQ(local_values, local_arrays.values); + GKO_ASSERT_ARRAY_EQ(non_local_row_idxs, + std::get<1>(ref_non_locals[part])); + GKO_ASSERT_ARRAY_EQ(non_local_col_idxs, + std::get<2>(ref_non_locals[part])); + GKO_ASSERT_ARRAY_EQ(non_local_values, + std::get<3>(ref_non_locals[part])); } } @@ -165,18 +156,15 @@ class Matrix : public ::testing::Test { gko::array local_col_idxs; gko::array local_values; gko::array non_local_row_idxs; - gko::array non_local_col_idxs; + gko::array non_local_col_idxs; gko::array non_local_values; - gko::array gather_idxs; - gko::array recv_sizes; - gko::array non_local_to_global; }; TYPED_TEST_SUITE(Matrix, gko::test::ValueLocalGlobalIndexTypes, TupleTypenameNameGenerator); -TYPED_TEST(Matrix, BuildsLocalNonLocalEmpty) +TYPED_TEST(Matrix, SeparateLocalNonLocalEmpty) { using lit = typename TestFixture::local_index_type; using git = typename TestFixture::global_index_type; @@ -194,12 +182,11 @@ TYPED_TEST(Matrix, BuildsLocalNonLocalEmpty) std::make_tuple(gko::dim<2>{3, 3}, I{}, I{}, I{})}, {std::make_tuple(gko::dim<2>{2, 0}, I{}, I{}, I{}), std::make_tuple(gko::dim<2>{3, 0}, I{}, I{}, I{}), - std::make_tuple(gko::dim<2>{3, 0}, I{}, I{}, I{})}, - {{}, {}, {}}, {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}); + std::make_tuple(gko::dim<2>{3, 0}, I{}, I{}, I{})}); } -TYPED_TEST(Matrix, BuildsLocalNonLocalSmall) +TYPED_TEST(Matrix, SeparateLocalNonLocalSmall) { using lit = typename TestFixture::local_index_type; using git = typename TestFixture::global_index_type; @@ -216,12 +203,11 @@ TYPED_TEST(Matrix, BuildsLocalNonLocalSmall) {std::make_tuple(gko::dim<2>{1, 1}, I{0}, I{0}, I{4}), std::make_tuple(gko::dim<2>{1, 1}, I{0}, I{0}, I{1})}, {std::make_tuple(gko::dim<2>{1, 1}, I{0}, I{0}, I{3}), - std::make_tuple(gko::dim<2>{1, 1}, I{0}, I{0}, I{2})}, - {{0}, {0}}, {{0, 1}, {1, 0}}); + std::make_tuple(gko::dim<2>{1, 1}, I{0}, I{1}, I{2})}); } -TYPED_TEST(Matrix, BuildsLocalNonLocalNoNonLocal) +TYPED_TEST(Matrix, SeparateLocalNonLocalNoNonLocal) { using lit = typename TestFixture::local_index_type; using git = typename TestFixture::global_index_type; @@ -243,12 +229,11 @@ TYPED_TEST(Matrix, BuildsLocalNonLocalNoNonLocal) I{3, 4, 7})}, {std::make_tuple(gko::dim<2>{2, 0}, I{}, I{}, I{}), std::make_tuple(gko::dim<2>{2, 0}, I{}, I{}, I{}), - std::make_tuple(gko::dim<2>{2, 0}, I{}, I{}, I{})}, - {{}, {}, {}}, {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}); + std::make_tuple(gko::dim<2>{2, 0}, I{}, I{}, I{})}); } -TYPED_TEST(Matrix, BuildsLocalNonLocalNoLocal) +TYPED_TEST(Matrix, SeparateLocalNonLocalNoLocal) { using lit = typename TestFixture::local_index_type; using git = typename TestFixture::global_index_type; @@ -265,16 +250,15 @@ TYPED_TEST(Matrix, BuildsLocalNonLocalNoLocal) {std::make_tuple(gko::dim<2>{2, 2}, I{}, I{}, I{}), std::make_tuple(gko::dim<2>{2, 2}, I{}, I{}, I{}), std::make_tuple(gko::dim<2>{2, 2}, I{}, I{}, I{})}, - {std::make_tuple(gko::dim<2>{2, 1}, I{1}, I{0}, I{6}), - std::make_tuple(gko::dim<2>{2, 3}, I{0, 0, 1}, I{2, 1, 0}, + {std::make_tuple(gko::dim<2>{2, 1}, I{1}, I{1}, I{6}), + std::make_tuple(gko::dim<2>{2, 3}, I{0, 0, 1}, I{1, 3, 2}, I{1, 2, 8}), - std::make_tuple(gko::dim<2>{2, 2}, I{0, 1}, I{1, 0}, - I{5, 7})}, - {{0}, {0, 1, 0}, {1, 1}}, {{0, 0, 1}, {2, 0, 1}, {1, 1, 0}}); + std::make_tuple(gko::dim<2>{2, 2}, I{0, 1}, I{5, 3}, + I{5, 7})}); } -TYPED_TEST(Matrix, BuildsLocalNonLocalMixed) +TYPED_TEST(Matrix, SeparateLocalNonLocalMixed) { using lit = typename TestFixture::local_index_type; using git = typename TestFixture::global_index_type; @@ -287,26 +271,26 @@ TYPED_TEST(Matrix, BuildsLocalNonLocalMixed) this->validate( gko::dim<2>{6, 6}, partition, partition, + // clang-format on {0, 0, 0, 0, 1, 1, 1, 2, 3, 3, 4, 4, 5, 5}, {0, 1, 3, 5, 1, 4, 5, 3, 1, 2, 3, 4, 0, 2}, {11, 1, 2, 12, 13, 14, 5, 15, 6, 16, 7, 17, 18, 8}, - + // clang-format off {std::make_tuple(gko::dim<2>{2, 2}, I{0, 1}, I{1, 0}, I{15, 16}), std::make_tuple(gko::dim<2>{2, 2}, I{0, 0, 1}, I{0, 1, 0}, I{11, 12, 18}), std::make_tuple(gko::dim<2>{2, 2}, I{0, 0, 1}, I{0, 1, 1}, I{13, 14, 17})}, - {std::make_tuple(gko::dim<2>{2, 1}, I{1}, I{0}, I{6}), - std::make_tuple(gko::dim<2>{2, 3}, I{0, 0, 1}, I{2, 1, 0}, + {std::make_tuple(gko::dim<2>{2, 1}, I{1}, I{1}, I{6}), + std::make_tuple(gko::dim<2>{2, 3}, I{0, 0, 1}, I{1, 3, 2}, I{1, 2, 8}), - std::make_tuple(gko::dim<2>{2, 2}, I{0, 1}, I{1, 0}, - I{5, 7})}, - {{0}, {0, 1, 0}, {1, 1}}, {{0, 0, 1}, {2, 0, 1}, {1, 1, 0}}); + std::make_tuple(gko::dim<2>{2, 2}, I{0, 1}, I{5, 3}, + I{5, 7})}); } -TYPED_TEST(Matrix, BuildsLocalNonLocalEmptyWithColPartition) +TYPED_TEST(Matrix, SeparateLocalNonLocalEmptyWithColPartition) { using lit = typename TestFixture::local_index_type; using git = typename TestFixture::global_index_type; @@ -329,12 +313,11 @@ TYPED_TEST(Matrix, BuildsLocalNonLocalEmptyWithColPartition) std::make_tuple(gko::dim<2>{3, 3}, I{}, I{}, I{})}, {std::make_tuple(gko::dim<2>{2, 0}, I{}, I{}, I{}), std::make_tuple(gko::dim<2>{3, 0}, I{}, I{}, I{}), - std::make_tuple(gko::dim<2>{3, 0}, I{}, I{}, I{})}, - {{}, {}, {}}, {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}); + std::make_tuple(gko::dim<2>{3, 0}, I{}, I{}, I{})}); } -TYPED_TEST(Matrix, BuildsLocalNonLocalSmallWithColPartition) +TYPED_TEST(Matrix, SeparateLocalNonLocalSmallWithColPartition) { using lit = typename TestFixture::local_index_type; using git = typename TestFixture::global_index_type; @@ -354,12 +337,11 @@ TYPED_TEST(Matrix, BuildsLocalNonLocalSmallWithColPartition) {1, 2, 3, 4}, {std::make_tuple(gko::dim<2>{1, 1}, I{0}, I{0}, I{3}), std::make_tuple(gko::dim<2>{1, 1}, I{0}, I{0}, I{2})}, - {std::make_tuple(gko::dim<2>{1, 1}, I{0}, I{0}, I{4}), - std::make_tuple(gko::dim<2>{1, 1}, I{0}, I{0}, I{1})}, - {{0}, {0}}, {{0, 1}, {1, 0}}); + {std::make_tuple(gko::dim<2>{1, 1}, I{0}, I{1}, I{4}), + std::make_tuple(gko::dim<2>{1, 1}, I{0}, I{0}, I{1})}); } -TYPED_TEST(Matrix, BuildsLocalNonLocalNoNonLocalWithColPartition) +TYPED_TEST(Matrix, SeparateLocalNonLocalNoNonLocalWithColPartition) { using lit = typename TestFixture::local_index_type; using git = typename TestFixture::global_index_type; @@ -384,12 +366,11 @@ TYPED_TEST(Matrix, BuildsLocalNonLocalNoNonLocalWithColPartition) I{4, 5, 6})}, {std::make_tuple(gko::dim<2>{2, 0}, I{}, I{}, I{}), std::make_tuple(gko::dim<2>{2, 0}, I{}, I{}, I{}), - std::make_tuple(gko::dim<2>{2, 0}, I{}, I{}, I{})}, - {{}, {}, {}}, {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}); + std::make_tuple(gko::dim<2>{2, 0}, I{}, I{}, I{})}); } -TYPED_TEST(Matrix, BuildsLocalNonLocalNoLocalWithColPartition) +TYPED_TEST(Matrix, SeparateLocalNonLocalNoLocalWithColPartition) { using lit = typename TestFixture::local_index_type; using git = typename TestFixture::global_index_type; @@ -410,17 +391,16 @@ TYPED_TEST(Matrix, BuildsLocalNonLocalNoLocalWithColPartition) {std::make_tuple(gko::dim<2>{2, 2}, I{}, I{}, I{}), std::make_tuple(gko::dim<2>{2, 2}, I{}, I{}, I{}), std::make_tuple(gko::dim<2>{2, 2}, I{}, I{}, I{})}, - {std::make_tuple(gko::dim<2>{2, 3}, I{0, 1, 0}, I{1, 2, 0}, + {std::make_tuple(gko::dim<2>{2, 3}, I{0, 1, 0}, I{2, 3, 5}, I{1, 2, 3}), std::make_tuple(gko::dim<2>{2, 2}, I{0, 1}, I{0, 1}, I{4, 5}), - std::make_tuple(gko::dim<2>{2, 2}, I{0, 0}, I{0, 1}, - I{6, 7})}, - {{1, 0, 1}, {0, 1}, {1, 0}}, {{0, 1, 2}, {2, 0, 0}, {1, 1, 0}}); + std::make_tuple(gko::dim<2>{2, 2}, I{0, 0}, I{1, 4}, + I{6, 7})}); } -TYPED_TEST(Matrix, BuildsLocalNonLocalMixedWithColPartition) +TYPED_TEST(Matrix, SeparateLocalNonLocalMixedWithColPartition) { using lit = typename TestFixture::local_index_type; using git = typename TestFixture::global_index_type; @@ -436,9 +416,11 @@ TYPED_TEST(Matrix, BuildsLocalNonLocalMixedWithColPartition) this->ref, col_mapping, num_parts); this->validate(gko::dim<2>{6, 6}, partition, col_partition, + // clang-format off {2, 3, 3, 0, 5, 1, 4, 2, 3, 2, 0, 0, 1, 1, 4, 4}, - {0, 0, 1, 5, 4, 2, 2, 3, 2, 4, 1, 2, 4, 5, 0, 5}, + { 0, 0, 1, 5, 4, 2, 2, 3, 2, 4, 1, 2, 4, 5, 0, 5}, {11, 12, 13, 14, 15, 16, 17, 1, 2, 3, 4, 5, 6, 7, 8, 9}, + // clang-format on {std::make_tuple(gko::dim<2>{2, 2}, I{0, 1, 1}, I{0, 0, 1}, I{11, 12, 13}), std::make_tuple(gko::dim<2>{2, 2}, I{0, 1}, @@ -446,17 +428,15 @@ TYPED_TEST(Matrix, BuildsLocalNonLocalMixedWithColPartition) std::make_tuple(gko::dim<2>{2, 2}, I{0, 1}, I{0, 0}, I{16, 17})}, {std::make_tuple(gko::dim<2>{2, 3}, I{0, 1, 0}, - I{2, 1, 0}, I{1, 2, 3}), + I{3, 2, 4}, I{1, 2, 3}), std::make_tuple(gko::dim<2>{2, 2}, I{0, 0}, - I{0, 1}, I{4, 5}), + I{1, 2}, I{4, 5}), std::make_tuple(gko::dim<2>{2, 3}, I{0, 0, 1, 1}, - I{1, 2, 0, 2}, I{6, 7, 8, 9})}, - {{0, 0, 1}, {1, 0}, {0, 0, 1}}, - {{0, 1, 2}, {1, 0, 1}, {1, 2, 0}}); + I{4, 5, 0, 5}, I{6, 7, 8, 9})}); } -TYPED_TEST(Matrix, BuildsLocalNonLocalNonSquare) +TYPED_TEST(Matrix, SeparateLocalNonLocalNonSquare) { using lit = typename TestFixture::local_index_type; using git = typename TestFixture::global_index_type; @@ -473,76 +453,22 @@ TYPED_TEST(Matrix, BuildsLocalNonLocalNonSquare) this->validate( gko::dim<2>{6, 4}, partition, col_partition, - {2, 3, 0, 1, 4, 3, 3, 0, 1, 4}, {0, 0, 3, 2, 1, 2, 3, 0, 3, 3}, + // clang-format off + {2, 3, 0, 1, 4, 3, 3, 0, 1, 4}, + {0, 0, 3, 2, 1, 2, 3, 0, 3, 3}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, + // clang-format on {std::make_tuple(gko::dim<2>{2, 1}, I{0, 1}, I{0, 0}, I{1, 2}), std::make_tuple(gko::dim<2>{2, 1}, I{0}, I{0}, I{3}), std::make_tuple(gko::dim<2>{2, 2}, I{0, 1}, I{1, 0}, I{4, 5})}, - {std::make_tuple(gko::dim<2>{2, 2}, I{1, 1}, I{1, 0}, + {std::make_tuple(gko::dim<2>{2, 2}, I{1, 1}, I{2, 3}, I{6, 7}), std::make_tuple(gko::dim<2>{2, 1}, I{0}, I{0}, I{8}), - std::make_tuple(gko::dim<2>{2, 1}, I{0, 1}, I{0, 0}, - I{9, 10})}, - {{0, 1}, {0}, {0}}, {{0, 1, 1}, {1, 0, 0}, {0, 1, 0}}); + std::make_tuple(gko::dim<2>{2, 1}, I{0, 1}, I{3, 3}, + I{9, 10})}); } -TYPED_TEST(Matrix, BuildGhostMapContinuous) -{ - using value_type = typename TestFixture::value_type; - using local_index_type = typename TestFixture::local_index_type; - using global_index_type = typename TestFixture::global_index_type; - this->mapping = {this->ref, {0, 0, 0, 1, 1, 2, 2}}; - constexpr comm_index_type num_parts = 3; - auto partition = gko::experimental::distributed::Partition< - local_index_type, global_index_type>::build_from_mapping(this->ref, - this->mapping, - num_parts); - this->recv_sizes.resize_and_reset(num_parts + 1); - gko::array result[num_parts] = { - {this->ref, {3}}, {this->ref, {0, 6}}, {this->ref, {4}}}; - - for (int local_id = 0; local_id < num_parts; ++local_id) { - gko::kernels::reference::distributed_matrix::build_local_nonlocal( - this->ref, this->create_input_full_rank(), partition.get(), - partition.get(), local_id, this->local_row_idxs, - this->local_col_idxs, this->local_values, this->non_local_row_idxs, - this->non_local_col_idxs, this->non_local_values, this->gather_idxs, - this->recv_sizes, this->non_local_to_global); - - GKO_ASSERT_ARRAY_EQ(result[local_id], this->non_local_to_global); - } -} - -TYPED_TEST(Matrix, BuildGhostMapScattered) -{ - using value_type = typename TestFixture::value_type; - using local_index_type = typename TestFixture::local_index_type; - using global_index_type = typename TestFixture::global_index_type; - this->mapping = {this->ref, {0, 1, 2, 0, 1, 2, 0}}; - constexpr comm_index_type num_parts = 3; - auto partition = gko::experimental::distributed::Partition< - local_index_type, global_index_type>::build_from_mapping(this->ref, - this->mapping, - num_parts); - this->recv_sizes.resize_and_reset(num_parts + 1); - gko::array result[num_parts] = { - {this->ref, {5}}, - {this->ref, {6, 2}}, - {this->ref, {4}}}; // the columns are sorted by their part_id - - for (int local_id = 0; local_id < num_parts; ++local_id) { - gko::kernels::reference::distributed_matrix::build_local_nonlocal( - this->ref, this->create_input_full_rank(), partition.get(), - partition.get(), local_id, this->local_row_idxs, - this->local_col_idxs, this->local_values, this->non_local_row_idxs, - this->non_local_col_idxs, this->non_local_values, this->gather_idxs, - this->recv_sizes, this->non_local_to_global); - - GKO_ASSERT_ARRAY_EQ(result[local_id], this->non_local_to_global); - } -} - } // namespace diff --git a/test/distributed/matrix_kernels.cpp b/test/distributed/matrix_kernels.cpp index 8342898506d..5e3677db2f4 100644 --- a/test/distributed/matrix_kernels.cpp +++ b/test/distributed/matrix_kernels.cpp @@ -6,7 +6,6 @@ #include -#include #include @@ -15,8 +14,6 @@ #include #include -#include -#include #include "core/test/utils.hpp" @@ -35,7 +32,6 @@ class Matrix : public CommonTestFixture { 1, decltype(ValueLocalGlobalIndexType())>::type; using global_index_type = typename std::tuple_element< 2, decltype(ValueLocalGlobalIndexType())>::type; - using Mtx = gko::matrix::Csr; Matrix() : engine(42) {} @@ -65,34 +61,23 @@ class Matrix : public CommonTestFixture { gko::array d_local_col_idxs{exec}; gko::array d_local_values{exec}; gko::array non_local_row_idxs{ref}; - gko::array non_local_col_idxs{ref}; + gko::array non_local_col_idxs{ref}; gko::array non_local_values{ref}; gko::array d_non_local_row_idxs{exec}; - gko::array d_non_local_col_idxs{exec}; + gko::array d_non_local_col_idxs{exec}; gko::array d_non_local_values{exec}; - gko::array gather_idxs{ref}; - gko::array d_gather_idxs{exec}; - gko::array recv_sizes{ - ref, - static_cast(row_partition->get_num_parts())}; - gko::array d_recv_sizes{ - exec, - static_cast(row_partition->get_num_parts())}; - gko::array local_to_global_col{ref}; - gko::array d_local_to_global_col{exec}; - - gko::kernels::reference::distributed_matrix::build_local_nonlocal( - ref, input, row_partition.get(), col_partition.get(), part, - local_row_idxs, local_col_idxs, local_values, - non_local_row_idxs, non_local_col_idxs, non_local_values, - gather_idxs, recv_sizes, local_to_global_col); + + gko::kernels::reference::distributed_matrix:: + separate_local_nonlocal( + ref, input, row_partition.get(), col_partition.get(), part, + local_row_idxs, local_col_idxs, local_values, + non_local_row_idxs, non_local_col_idxs, non_local_values); gko::kernels::EXEC_NAMESPACE::distributed_matrix:: - build_local_nonlocal( + separate_local_nonlocal( exec, d_input, d_row_partition.get(), d_col_partition.get(), part, d_local_row_idxs, d_local_col_idxs, d_local_values, d_non_local_row_idxs, d_non_local_col_idxs, - d_non_local_values, d_gather_idxs, d_recv_sizes, - d_local_to_global_col); + d_non_local_values); GKO_ASSERT_ARRAY_EQ(local_row_idxs, d_local_row_idxs); GKO_ASSERT_ARRAY_EQ(local_col_idxs, d_local_col_idxs); @@ -100,9 +85,6 @@ class Matrix : public CommonTestFixture { GKO_ASSERT_ARRAY_EQ(non_local_row_idxs, d_non_local_row_idxs); GKO_ASSERT_ARRAY_EQ(non_local_col_idxs, d_non_local_col_idxs); GKO_ASSERT_ARRAY_EQ(non_local_values, d_non_local_values); - GKO_ASSERT_ARRAY_EQ(gather_idxs, d_gather_idxs); - GKO_ASSERT_ARRAY_EQ(recv_sizes, d_recv_sizes); - GKO_ASSERT_ARRAY_EQ(local_to_global_col, d_local_to_global_col); } } diff --git a/test/mpi/matrix.cpp b/test/mpi/matrix.cpp index 8f22c546185..aad699b541e 100644 --- a/test/mpi/matrix.cpp +++ b/test/mpi/matrix.cpp @@ -291,10 +291,10 @@ class Matrix : public CommonMpiTestFixture { gko::dim<2> size; - std::unique_ptr row_part; - std::unique_ptr col_part; - std::unique_ptr row_part_large; - std::unique_ptr col_part_large; + std::shared_ptr row_part; + std::shared_ptr col_part; + std::shared_ptr row_part_large; + std::shared_ptr col_part_large; std::unique_ptr dist_mat; std::unique_ptr dist_mat_large;