Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Completed request was already nulled in Request::waitany. Use the right index.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 8 Jun 2018 11:55:43 +0000 (13:55 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 8 Jun 2018 11:56:13 +0000 (13:56 +0200)
This reverts commit b034798c622c83cdd6fc4f068ca6a86771f82014.

src/smpi/bindings/smpi_pmpi_request.cpp
src/smpi/mpi/smpi_request.cpp

index 3cedb54..b2192d9 100644 (file)
@@ -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);
   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)
   }
 
   for (MPI_Request& req : savedreqs)
index 979b0df..4732410 100644 (file)
@@ -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[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;
         }
       }
             requests[index] = MPI_REQUEST_NULL;
         }
       }