Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix the fix of the fix of testsome.
[simgrid.git] / src / smpi / mpi / smpi_request.cpp
index 05cdc18..7ae4f42 100644 (file)
@@ -599,10 +599,10 @@ int Request::testsome(int incount, MPI_Request requests[], int *count, int *indi
       if(ret!=MPI_SUCCESS)
         error = 1;
       if(flag) {
-        indices[i] = 1;
-        (*count)++;
+        indices[*count] = i;
         if (status != MPI_STATUSES_IGNORE)
-          status[i] = *pstat;
+          status[*count] = *pstat;
+        (*count)++;
         if ((requests[i] != MPI_REQUEST_NULL) && (requests[i]->flags_ & MPI_REQ_NON_PERSISTENT))
           requests[i] = MPI_REQUEST_NULL;
       }