X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6339d6d3816709debf8f8ef0fb4733825ee4a9fc..033eb0461ca0bc73eff29615c388a81fb5bd80e8:/src/smpi/mpi/smpi_request.cpp diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index 2aa173b01a..6b461e181e 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -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); @@ -407,7 +413,7 @@ void Request::start() if ((smpi_privatize_global_variables != 0) && (static_cast(buf_) >= smpi_data_exe_start) && (static_cast(buf_) < smpi_data_exe_start + smpi_data_exe_size)) { XBT_DEBUG("Privatization : We are sending from a zone inside global memory. Switch data segment "); - smpi_switch_data_segment(src_); + smpi_switch_data_segment(simgrid::s4u::Actor::byPid(src_)); } buf = xbt_malloc(size_); memcpy(buf,oldbuf,size_); @@ -702,7 +708,7 @@ void Request::finish_wait(MPI_Request* request, MPI_Status * status) static_cast(req->old_buf_) >= smpi_data_exe_start && static_cast(req->old_buf_) < smpi_data_exe_start + smpi_data_exe_size) { XBT_VERB("Privatization : We are unserializing to a zone in global memory Switch data segment "); - smpi_switch_data_segment(simgrid::s4u::Actor::self()->getPid()); + smpi_switch_data_segment(simgrid::s4u::Actor::self()); } if(datatype->flags() & DT_FLAG_DERIVED){