- c = count;
- while(c > 0) {
- index = smpi_mpi_waitany(count, requests, pstat);
- if(index == MPI_UNDEFINED) {
- break;
+ for(c = 0; c < count; c++) {
+ if(MC_IS_ENABLED) {
+ smpi_mpi_wait(&requests[c], pstat);
+ index = c;
+ } else {
+ index = smpi_mpi_waitany(count, requests, pstat);
+ if(index == MPI_UNDEFINED) {
+ break;
+ }