From: Augustin Degomme Date: Sun, 27 May 2018 10:00:49 +0000 (+0200) Subject: fix issue where some end of recv events were not generated whe MPI_STATUS_IGNORE... X-Git-Tag: v3.20~190 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6e9d32f8c0cc3a96693829c8def3f41717600a55 fix issue where some end of recv events were not generated whe MPI_STATUS_IGNORE was sent. --- diff --git a/src/smpi/bindings/smpi_pmpi_request.cpp b/src/smpi/bindings/smpi_pmpi_request.cpp index e63ceef911..fa24998944 100644 --- a/src/smpi/bindings/smpi_pmpi_request.cpp +++ b/src/smpi/bindings/smpi_pmpi_request.cpp @@ -335,12 +335,15 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, MPI retval = MPI_SUCCESS; // the src may not have been known at the beginning of the recv (MPI_ANY_SOURCE) - if (status != MPI_STATUS_IGNORE) { - int src_traced = getPid(comm, status->MPI_SOURCE); - if (not TRACE_smpi_view_internals()) { - TRACE_smpi_recv(src_traced, my_proc_id, tag); - } + int src_traced=0; + if (status != MPI_STATUS_IGNORE) + src_traced = getPid(comm, status->MPI_SOURCE); + else + src_traced = getPid(comm, src); + if (not TRACE_smpi_view_internals()) { + TRACE_smpi_recv(src_traced, my_proc_id, tag); } + TRACE_smpi_comm_out(my_proc_id); }