From: Augustin Degomme Date: Thu, 18 Jul 2019 15:03:56 +0000 (+0200) Subject: Fix the fix of the fix of testsome. X-Git-Tag: v3.24~285 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fae8bb2359200e3b42825d648a0e7ffcec168bb1?hp=79cd61a2811607c02b5470132f4241fcf91bfe6d Fix the fix of the fix of testsome. --- diff --git a/src/smpi/bindings/smpi_f77_request.cpp b/src/smpi/bindings/smpi_f77_request.cpp index 485f062e81..7e128bc0a1 100644 --- a/src/smpi/bindings/smpi_f77_request.cpp +++ b/src/smpi/bindings/smpi_f77_request.cpp @@ -276,7 +276,7 @@ void mpi_testsome_ (int* incount, int* requests, int* outcount, int* indices, M } *ierr = MPI_Testsome(*incount, reqs, outcount, indices, FORT_STATUSES_IGNORE(statuses)); for(i=0;i<*incount;i++){ - if(indices[i] && reqs[indices[i]]==MPI_REQUEST_NULL){ + if(reqs[indices[i]]==MPI_REQUEST_NULL){ simgrid::smpi::Request::free_f(requests[indices[i]]); requests[indices[i]]=MPI_FORTRAN_REQUEST_NULL; } diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index 05cdc18c1e..7ae4f42bd1 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -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; }