From e7cc3d45799195490aeb5592aae24d4d7af0370a Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 13 Jul 2018 11:27:31 +0200 Subject: [PATCH] cleanup: use actor::yield() instead of a compute(0) It changes the execution order, thus the tesh revalidation, but that's OK --- examples/smpi/replay/replay.tesh | 2 +- src/smpi/internals/smpi_replay.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/smpi/replay/replay.tesh b/examples/smpi/replay/replay.tesh index a5f27446c6..49560a8dae 100644 --- a/examples/smpi/replay/replay.tesh +++ b/examples/smpi/replay/replay.tesh @@ -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 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 -> 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 diff --git a/src/smpi/internals/smpi_replay.cpp b/src/smpi/internals/smpi_replay.cpp index b78eec21bd..a11183d07f 100644 --- a/src/smpi/internals/smpi_replay.cpp +++ b/src/smpi/internals/smpi_replay.cpp @@ -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 { - //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(); } } -- 2.20.1