]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check MPI error codes. 13470/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 1 Mar 2022 17:58:18 +0000 (10:58 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 1 Mar 2022 17:59:35 +0000 (10:59 -0700)
tests/fullydistributed_grids/repartitioning_05.cc

index 89f4451e74746fe42d45b52853e5525663d8b380..f3810754ef614c420a66549dd758404e3b1342ea 100644 (file)
@@ -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);
+    }
 }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.