From ae1803dd1b611e7902b237d316ce7e4ec0886332 Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Thu, 3 May 2018 18:36:38 +0200 Subject: [PATCH] fix bug on MPI_Recv when MPI_IGNORE_STATUS is used with MPI_PROC_NULL as a sender --- src/smpi/bindings/smpi_pmpi_request.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/smpi/bindings/smpi_pmpi_request.cpp b/src/smpi/bindings/smpi_pmpi_request.cpp index 458f7f9608..4e98afbe02 100644 --- a/src/smpi/bindings/smpi_pmpi_request.cpp +++ b/src/smpi/bindings/smpi_pmpi_request.cpp @@ -311,8 +311,10 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI if (comm == MPI_COMM_NULL) { retval = MPI_ERR_COMM; } else if (src == MPI_PROC_NULL) { - simgrid::smpi::Status::empty(status); - status->MPI_SOURCE = MPI_PROC_NULL; + if(status != MPI_STATUS_IGNORE){ + simgrid::smpi::Status::empty(status); + status->MPI_SOURCE = MPI_PROC_NULL; + } retval = MPI_SUCCESS; } else if (src!=MPI_ANY_SOURCE && (src >= comm->group()->size() || src <0)){ retval = MPI_ERR_RANK; -- 2.20.1