]> https://gitweb.dealii.org/ - dealii.git/commitdiff
check MPI return value in one location 9454/head
authorTimo Heister <timo.heister@gmail.com>
Fri, 31 Jan 2020 18:40:01 +0000 (13:40 -0500)
committerTimo Heister <timo.heister@gmail.com>
Fri, 31 Jan 2020 18:40:01 +0000 (13:40 -0500)
source/base/mpi.cc

index e9b71e0e463acea31ab55e0a72f73de6f0ffd90c..521f4743d3e2ca0895de2e158b56d962a93cfb93 100644 (file)
@@ -1332,7 +1332,8 @@ namespace Utilities
         Utilities::MPI::internal::Tags::consensus_algorithm_pex_process_deliver;
 
       MPI_Status status;
-      MPI_Probe(MPI_ANY_SOURCE, tag_request, this->comm, &status);
+      auto ierr = MPI_Probe(MPI_ANY_SOURCE, tag_request, this->comm, &status);
+      AssertThrowMPI(ierr);
 
       // get rank of incoming message
       const auto other_rank = status.MPI_SOURCE;
@@ -1340,8 +1341,8 @@ namespace Utilities
       std::vector<T1> buffer_recv;
 
       // get size of incoming message
-      int  number_amount;
-      auto ierr = MPI_Get_count(&status, MPI_BYTE, &number_amount);
+      int number_amount;
+      ierr = MPI_Get_count(&status, MPI_BYTE, &number_amount);
       AssertThrowMPI(ierr);
 
       // allocate memory for incoming message

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.