Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
avoid looping forever on iprobe
authorAugustin Degomme <degomme@idpann.imag.fr>
Fri, 5 Apr 2013 08:04:15 +0000 (10:04 +0200)
committerAugustin Degomme <degomme@idpann.imag.fr>
Tue, 9 Apr 2013 10:00:52 +0000 (12:00 +0200)
src/smpi/colls/reduce-arrival-pattern-aware.c

index db6c0dc..7c921af 100644 (file)
@@ -88,9 +88,11 @@ int smpi_coll_tuned_reduce_arrival_pattern_aware(void *buf, void *rbuf,
       while (sent_count < (size - 1)) {
 
         for (i = 1; i < size; i++) {
       while (sent_count < (size - 1)) {
 
         for (i = 1; i < size; i++) {
-          if (already_received[i] == 0)
+          if (already_received[i] == 0) {
             smpi_mpi_iprobe(i, MPI_ANY_TAG, MPI_COMM_WORLD, &flag_array[i],
             smpi_mpi_iprobe(i, MPI_ANY_TAG, MPI_COMM_WORLD, &flag_array[i],
-                       MPI_STATUSES_IGNORE);
+                             MPI_STATUSES_IGNORE);
+            simcall_process_sleep(0.0001);
+            }
         }
 
         header_index = 0;
         }
 
         header_index = 0;