From: Arnaud Giersch Date: Fri, 8 Jun 2018 11:55:43 +0000 (+0200) Subject: Completed request was already nulled in Request::waitany. Use the right index. X-Git-Tag: v3.20~131^2~2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c3667a869f5252151ec3142010ffb7ac36ceaeca Completed request was already nulled in Request::waitany. Use the right index. This reverts commit b034798c622c83cdd6fc4f068ca6a86771f82014. --- diff --git a/src/smpi/bindings/smpi_pmpi_request.cpp b/src/smpi/bindings/smpi_pmpi_request.cpp index 3cedb54bd6..b2192d9055 100644 --- a/src/smpi/bindings/smpi_pmpi_request.cpp +++ b/src/smpi/bindings/smpi_pmpi_request.cpp @@ -688,7 +688,6 @@ int PMPI_Waitany(int count, MPI_Request requests[], int *index, MPI_Status * sta if(*index!=MPI_UNDEFINED){ trace_smpi_recv_helper(&savedreqs[*index], status); TRACE_smpi_comm_out(rank_traced); - requests[*index] = MPI_REQUEST_NULL; } for (MPI_Request& req : savedreqs) diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index 979b0dffe9..4732410eb3 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -874,7 +874,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; } }