- int cpt;
- int index;
- int retval;
- smpi_mpi_status_t stat;
-
- for (cpt = 0; cpt < count; cpt++) {
- retval = smpi_mpi_waitany(count, requests, &index, &stat);
- if (retval != MPI_SUCCESS)
- return retval;
- memcpy(&(status[index]), &stat, sizeof(stat));
- }
- return MPI_SUCCESS;
+ int cpt;
+ int index;
+ int retval;
+ smpi_mpi_status_t stat;
+
+ for (cpt = 0; cpt < count; cpt++) {
+ retval = smpi_mpi_waitany(count, requests, &index, &stat);
+ if (retval != MPI_SUCCESS)
+ return retval;
+ if (MPI_STATUS_IGNORE != status)
+ memcpy(&(status[index]), &stat, sizeof(stat));
+ }
+ return MPI_SUCCESS;