Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
laste batch tonight
[simgrid.git] / src / smpi / mpi / smpi_request.cpp
index 2aa173b..c961ef2 100644 (file)
@@ -306,9 +306,15 @@ void Request::sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,int d
 {
   MPI_Request requests[2];
   MPI_Status stats[2];
-  unsigned int myid = simgrid::s4u::Actor::self()->getPid();
+  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 = 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);