Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleanup: use actor::yield() instead of a compute(0)
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 13 Jul 2018 09:27:31 +0000 (11:27 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 13 Jul 2018 12:31:57 +0000 (14:31 +0200)
It changes the execution order, thus the tesh revalidation, but that's OK

examples/smpi/replay/replay.tesh
src/smpi/internals/smpi_replay.cpp

index a5f2744..49560a8 100644 (file)
@@ -157,13 +157,13 @@ $ tail -n +3 ./simgrid.trace
 > 5 7 2 smpi_replay_run_init "0 1 0"
 > 6 0.000000 2 1 0 "rank-2"
 > 6 0.000000 3 1 0 "rank-3"
 > 5 7 2 smpi_replay_run_init "0 1 0"
 > 6 0.000000 2 1 0 "rank-2"
 > 6 0.000000 3 1 0 "rank-3"
+> 5 8 2 action_bcast "0 0.78 0.39"
 > 12 0.000000 2 1 7
 > 13 0.000000 2 1
 > 12 0.000000 2 2 7
 > 13 0.000000 2 2
 > 12 0.000000 2 3 7
 > 13 0.000000 2 3
 > 12 0.000000 2 1 7
 > 13 0.000000 2 1
 > 12 0.000000 2 2 7
 > 13 0.000000 2 2
 > 12 0.000000 2 3 7
 > 13 0.000000 2 3
-> 5 8 2 action_bcast "0 0.78 0.39"
 > 12 0.000000 2 1 8
 > 12 0.000000 2 2 8
 > 12 0.000000 2 3 8
 > 12 0.000000 2 1 8
 > 12 0.000000 2 2 8
 > 12 0.000000 2 3 8
index b78eec2..a11183d 100644 (file)
@@ -744,9 +744,8 @@ void smpi_replay_init(int* argc, char*** argv)
     XBT_VERB("Delayed start for instance - Sleeping for %f flops ",value );
     smpi_execute_flops(value);
   } else {
     XBT_VERB("Delayed start for instance - Sleeping for %f flops ",value );
     smpi_execute_flops(value);
   } else {
-    //UGLY: force a context switch to be sure that all MSG_processes begin initialization
-    XBT_DEBUG("Force context switch by smpi_execute_flops  - Sleeping for 0.0 flops ");
-    smpi_execute_flops(0.0);
+    // Wait for the other actors to initialize also
+    simgrid::s4u::this_actor::yield();
   }
 }
 
   }
 }