X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7b50ef668fe46e44363e4c7ea2089e37c6afec38..82bffec16701223d01c1e08fd48169689740d009:/src/smpi/mpi/smpi_request.cpp diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index f2a700da71..05c2e70dc3 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -369,7 +369,6 @@ int Request::recv(void *buf, int count, MPI_Datatype datatype, int src, int tag, { MPI_Request request = irecv(buf, count, datatype, src, tag, comm); int retval = wait(&request,status); - request = nullptr; return retval; } @@ -382,7 +381,6 @@ void Request::bsend(const void *buf, int count, MPI_Datatype datatype, int dst, if(dst != MPI_PROC_NULL) request->start(); wait(&request, MPI_STATUS_IGNORE); - request = nullptr; } void Request::send(const void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm) @@ -393,7 +391,6 @@ void Request::send(const void *buf, int count, MPI_Datatype datatype, int dst, i if(dst != MPI_PROC_NULL) request->start(); wait(&request, MPI_STATUS_IGNORE); - request = nullptr; } void Request::ssend(const void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm) @@ -405,7 +402,6 @@ void Request::ssend(const void *buf, int count, MPI_Datatype datatype, int dst, if(dst != MPI_PROC_NULL) request->start(); wait(&request,MPI_STATUS_IGNORE); - request = nullptr; } void Request::sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,int dst, int sendtag, @@ -535,12 +531,11 @@ void Request::start() if ((flags_ & MPI_REQ_SSEND) == 0 && ((flags_ & MPI_REQ_RMA) != 0 || (flags_ & MPI_REQ_BSEND) != 0 || static_cast(size_) < smpi_cfg_detached_send_thresh())) { - void *oldbuf = nullptr; detached_ = true; XBT_DEBUG("Send request %p is detached", this); this->ref(); if (not(type_->flags() & DT_FLAG_DERIVED)) { - oldbuf = buf_; + void* oldbuf = buf_; if (not process->replaying() && oldbuf != nullptr && size_ != 0) { if (smpi_switch_data_segment(simgrid::s4u::Actor::by_pid(src_), buf_)) XBT_DEBUG("Privatization : We are sending from a zone inside global memory. Switch data segment ");