From 06f1e76ed79d29bfa758b6ee7d66de7ac9f70e5a Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Fri, 31 Jan 2020 13:40:01 -0500 Subject: [PATCH] check MPI return value in one location --- source/base/mpi.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.39.5