From: Timo Heister Date: Fri, 31 Jan 2020 18:40:01 +0000 (-0500) Subject: check MPI return value in one location X-Git-Tag: v9.2.0-rc1~587^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9454%2Fhead;p=dealii.git check MPI return value in one location --- diff --git a/source/base/mpi.cc b/source/base/mpi.cc index e9b71e0e46..521f4743d3 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -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 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