From 9dfe23fdf9abd1568ce357de2a0573726948b2c2 Mon Sep 17 00:00:00 2001 From: degomme Date: Wed, 7 Mar 2018 13:49:02 +0100 Subject: [PATCH] set status even when sendrecv is skipped (same process) --- src/smpi/mpi/smpi_request.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index 2aa173b01a..c408fab9e8 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -309,6 +309,12 @@ void Request::sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,int d unsigned int myid = simgrid::s4u::Actor::self()->getPid(); if ((comm->group()->actor(dst)->getPid() == myid) && (comm->group()->actor(src)->getPid() == myid)){ Datatype::copy(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype); + if(status !=MPI_STATUS_IGNORE){ + status->MPI_SOURCE = comm->group()->rank(src); + status->MPI_TAG = recvtag; + status->MPI_ERROR = MPI_SUCCESS; + status->count = sendcount*sendtype->size(); + } return; } requests[0] = isend_init(sendbuf, sendcount, sendtype, dst, sendtag, comm); -- 2.20.1