From c3667a869f5252151ec3142010ffb7ac36ceaeca Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 8 Jun 2018 13:55:43 +0200 Subject: [PATCH] Completed request was already nulled in Request::waitany. Use the right index. This reverts commit b034798c622c83cdd6fc4f068ca6a86771f82014. --- src/smpi/bindings/smpi_pmpi_request.cpp | 1 - src/smpi/mpi/smpi_request.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) 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; } } -- 2.20.1