From: Wolfgang Bangerth Date: Tue, 1 Mar 2022 18:02:42 +0000 (-0700) Subject: Use a valid communicator. X-Git-Tag: v9.4.0-rc1~416^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f776f00a28ea1c834f6d79d0c8398498405ab0c;p=dealii.git Use a valid communicator. --- 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);