From 9f776f00a28ea1c834f6d79d0c8398498405ab0c Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 1 Mar 2022 11:02:42 -0700 Subject: [PATCH] Use a valid communicator. --- tests/fullydistributed_grids/repartitioning_05.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/fullydistributed_grids/repartitioning_05.cc b/tests/fullydistributed_grids/repartitioning_05.cc index f3810754ef..0f83f4421a 100644 --- a/tests/fullydistributed_grids/repartitioning_05.cc +++ b/tests/fullydistributed_grids/repartitioning_05.cc @@ -55,7 +55,7 @@ create_sub_comm(const MPI_Comm &comm, const unsigned int size) { ierr = MPI_Comm_free(&sub_comm); AssertThrowMPI(ierr); - return MPI_COMM_NULL; + return MPI_COMM_SELF; } } @@ -69,9 +69,9 @@ partition_distributed_triangulation(const Triangulation &tria_in, const auto comm_tria = tria_in.get_communicator(); const auto n_global_active_cells = Utilities::MPI::max( - comm_tria == MPI_COMM_NULL ? 0 : tria_in.n_global_active_cells(), comm); + comm_tria == MPI_COMM_SELF ? 0 : tria_in.n_global_active_cells(), comm); - if (comm_tria == MPI_COMM_NULL) + if (comm_tria == MPI_COMM_SELF) { LinearAlgebra::distributed::Vector partition{ IndexSet(n_global_active_cells), IndexSet(n_global_active_cells), comm}; @@ -111,7 +111,7 @@ test(const MPI_Comm comm, const unsigned int n_partitions) parallel::distributed::Triangulation tria(sub_comm); - if (sub_comm != MPI_COMM_NULL) + if (sub_comm != MPI_COMM_SELF) { GridGenerator::subdivided_hyper_cube(tria, 4); tria.refine_global(3); @@ -136,7 +136,7 @@ test(const MPI_Comm comm, const unsigned int n_partitions) print_statistics(tria_pft); print_statistics(dof_handler); - if (sub_comm != MPI_COMM_NULL) + if (sub_comm != MPI_COMM_SELF) { const int ierr = MPI_Comm_free(&sub_comm); AssertThrowMPI(ierr); -- 2.39.5