From dd5f5e6b1f16f01285ecc65040e2b4513c0d1cd7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 1 Mar 2022 10:58:18 -0700 Subject: [PATCH] Check MPI error codes. --- tests/fullydistributed_grids/repartitioning_05.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/fullydistributed_grids/repartitioning_05.cc b/tests/fullydistributed_grids/repartitioning_05.cc index 89f4451e74..f3810754ef 100644 --- a/tests/fullydistributed_grids/repartitioning_05.cc +++ b/tests/fullydistributed_grids/repartitioning_05.cc @@ -46,13 +46,15 @@ create_sub_comm(const MPI_Comm &comm, const unsigned int size) int color = rank < size; MPI_Comm sub_comm; - MPI_Comm_split(comm, color, rank, &sub_comm); + int ierr = MPI_Comm_split(comm, color, rank, &sub_comm); + AssertThrowMPI(ierr); if (rank < size) return sub_comm; else { - MPI_Comm_free(&sub_comm); + ierr = MPI_Comm_free(&sub_comm); + AssertThrowMPI(ierr); return MPI_COMM_NULL; } } @@ -135,7 +137,10 @@ test(const MPI_Comm comm, const unsigned int n_partitions) print_statistics(dof_handler); if (sub_comm != MPI_COMM_NULL) - MPI_Comm_free(&sub_comm); + { + const int ierr = MPI_Comm_free(&sub_comm); + AssertThrowMPI(ierr); + } } -- 2.39.5