From: Wolfgang Bangerth Date: Tue, 1 Mar 2022 17:58:18 +0000 (-0700) Subject: Check MPI error codes. X-Git-Tag: v9.4.0-rc1~424^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd5f5e6b1f16f01285ecc65040e2b4513c0d1cd7;p=dealii.git Check MPI error codes. --- 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); + } }