X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6f13df6a73ac3bbfe197cf4076108a818ec21960..e75ba902f7af764cbfa89b263912863ba8f6100d:/src/smpi/mpi/smpi_request.cpp diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index 979b0dffe9..10c3639918 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -680,7 +680,7 @@ void Request::iprobe(int source, int tag, MPI_Comm comm, int* flag, MPI_Status* // nsleeps is a multiplier to the sleeptime, to increase speed of execution, each failed iprobe will increase it // This can speed up the execution of certain applications by an order of magnitude, such as HPL static int nsleeps = 1; - double speed = simgrid::s4u::Actor::self()->get_host()->getSpeed(); + double speed = simgrid::s4u::Actor::self()->get_host()->get_speed(); double maxrate = simgrid::config::get_value("smpi/iprobe-cpu-usage"); MPI_Request request = new Request(nullptr, 0, MPI_CHAR, source == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(source)->get_pid(), @@ -737,6 +737,9 @@ void Request::finish_wait(MPI_Request* request, MPI_Status * status) if (req->cancelled_==1){ if (status!=MPI_STATUS_IGNORE) status->cancelled=1; + if(req->detached_sender_ != nullptr) + unref(&(req->detached_sender_)); + unref(request); return; } @@ -874,7 +877,7 @@ int Request::waitany(int count, MPI_Request requests[], MPI_Status * status) if ((requests[index] == MPI_REQUEST_NULL) || (not((requests[index]->flags_ & MPI_REQ_ACCUMULATE) && (requests[index]->flags_ & MPI_REQ_RECV)))) { finish_wait(&requests[index],status); - if (requests[i] != MPI_REQUEST_NULL && (requests[i]->flags_ & MPI_REQ_NON_PERSISTENT)) + if (requests[index] != MPI_REQUEST_NULL && (requests[index]->flags_ & MPI_REQ_NON_PERSISTENT)) requests[index] = MPI_REQUEST_NULL; } }