Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reset requests to MPI_REQUEST_NULL.
[simgrid.git] / src / smpi / smpi_base.c
index 6e4f684..0059f76 100644 (file)
@@ -652,6 +652,7 @@ int smpi_mpi_testany(int count, MPI_Request requests[], int *index,
     if(i != -1) {
       *index = map[i];
       finish_wait(&requests[*index], status);
+      requests[*index] = MPI_REQUEST_NULL;
       flag = 1;
     }
   }else{
@@ -803,6 +804,7 @@ int smpi_mpi_waitany(int count, MPI_Request requests[],
       if (i != -1) {
         index = map[i];
         finish_wait(&requests[index], status);
+        requests[index] = MPI_REQUEST_NULL;
       }
     }
     xbt_free(map);