Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
this example works \o/
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 6 Aug 2018 07:35:22 +0000 (09:35 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 6 Aug 2018 07:35:22 +0000 (09:35 +0200)
Copying the tesh to the msg example should hopefully work too (once
the INFO messages have been changed to display the same information)

examples/platforms/trace/ginette_state.trace
examples/platforms/trace/link3_state.trace
examples/platforms/trace/link4_state.trace
examples/s4u/platform-failures/s4u-platform-failures.cpp
examples/s4u/platform-failures/s4u-platform-failures.tesh

index db0ee4c..8b54502 100644 (file)
@@ -88,6 +88,24 @@ static int worker(int argc, char* argv[])
       XBT_INFO("Waiting a message on %s", mailbox->get_cname());
       payload   = static_cast<double*>(mailbox->get());
       comp_size = *payload;
+      xbt_assert(payload != nullptr, "mailbox->get() failed");
+      if (comp_size < 0) { /* - Exit when -1.0 is received */
+        XBT_INFO("I'm done. See you!");
+        break;
+      }
+      /*  - Otherwise, process the task */
+      try {
+        XBT_INFO("Start execution...");
+        simgrid::s4u::this_actor::execute(comp_size);
+        XBT_INFO("Execution complete.");
+      } catch (xbt_ex& e) {
+        if (e.category == host_error) {
+          XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
+          return -1;
+        } else
+          xbt_die("Unexpected behavior");
+      }
+
       delete payload;
     } catch (xbt_ex& e) {
       switch (e.category) {
@@ -101,23 +119,7 @@ static int worker(int argc, char* argv[])
           xbt_die("Unexpected behavior");
       }
     }
-    xbt_assert(payload != nullptr, "mailbox->get() failed");
-    if (comp_size < 0) { /* - Exit when -1.0 is received */
-      XBT_INFO("I'm done. See you!");
-      break;
-    }
-    /*  - Otherwise, process the task */
-    try {
-      simgrid::s4u::this_actor::execute(comp_size);
-    } catch (xbt_ex& e) {
-      if (e.category == host_error) {
-        XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
-        return -1;
-      } else
-        xbt_die("Unexpected behavior");
-    }
   }
-  XBT_INFO("I'm done. See you!");
   return 0;
 }
 
index 21fb97e..9393f77 100644 (file)
@@ -8,6 +8,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-failures$EXEEXT --log=xbt_cfg.thres:c
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
 > [  0.010309] (1:master@Tremblay) Send to worker-0 completed
+> [  0.010309] (2:worker@Tremblay) Start execution...
 > [  0.000000] (2:worker@Tremblay) Waiting a message on worker-0
 > [  0.000000] (3:worker@Jupiter) Waiting a message on worker-1
 > [  0.000000] (4:worker@Ginette) Waiting a message on worker-3
@@ -23,37 +24,85 @@ $ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-failures$EXEEXT --log=xbt_cfg.thres:c
 > [  2.000000] (0:maestro@) Restart processes on host Jupiter
 > [  2.000000] (1:master@Tremblay) Send a message to worker-3
 > [  2.000000] (7:worker@Jupiter) Waiting a message on worker-1
+> [  2.010309] (2:worker@Tremblay) Execution complete.
 > [  2.010309] (2:worker@Tremblay) Waiting a message on worker-0
 > [  3.030928] (1:master@Tremblay) Send to worker-3 completed
 > [  3.030928] (1:master@Tremblay) Send a message to worker-4
+> [  3.030928] (4:worker@Ginette) Start execution...
 > [  4.061856] (1:master@Tremblay) Send to worker-4 completed
 > [  4.061856] (1:master@Tremblay) Send a message to worker-0
+> [  4.061856] (5:worker@Bourassa) Start execution...
 > [  4.072165] (1:master@Tremblay) Send to worker-0 completed
 > [  4.072165] (1:master@Tremblay) Send a message to worker-1
+> [  4.072165] (2:worker@Tremblay) Start execution...
+> [  5.030928] (4:worker@Ginette) Execution complete.
 > [  5.030928] (4:worker@Ginette) Waiting a message on worker-3
 > [  5.103093] (1:master@Tremblay) Send to worker-1 completed
 > [  5.103093] (1:master@Tremblay) Send a message to worker-2
-> [ 24.103093] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'worker-2'. Nevermind. Let's keep going!
-> [ 24.103093] (1:master@Tremblay) Mmh. Something went wrong with 'worker-3'. Nevermind. Let's keep going!
-> [ 24.103093] (4:worker@Ginette) Mmh. Something went wrong. Nevermind. Let's keep going!
-> [ 25.134021] (1:master@Tremblay) Send completed
-> [ 25.144330] (1:master@Tremblay) Send completed
-> [ 26.175258] (1:master@Tremblay) Send completed
-> [ 36.175258] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'worker-2'. Nevermind. Let's keep going!
-> [ 37.206186] (1:master@Tremblay) Send completed
-> [ 37.206186] (1:master@Tremblay) Mmh. Something went wrong with 'worker-4'. Nevermind. Let's keep going!
-> [ 37.206186] (5:worker@Bourassa) Mmh. Something went wrong. Nevermind. Let's keep going!
-> [ 38.247423] (1:master@Tremblay) Send completed
-> [ 48.247423] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'worker-2'. Nevermind. Let's keep going!
-> [ 49.278351] (1:master@Tremblay) Send completed
-> [ 50.000000] (4:worker@Ginette) Gloups. The cpu on which I'm running just turned off!. See you!
-> [ 50.309278] (1:master@Tremblay) Send completed
-> [ 50.309278] (1:master@Tremblay) All tasks have been dispatched. Let's tell everybody the computation is over.
-> [ 50.309278] (2:worker@Tremblay) I'm done. See you!
-> [ 50.309278] (6:worker@Jupiter) I'm done. See you!
-> [ 51.309278] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'worker-2'. Nevermind. Let's keep going!
-> [ 52.309278] (0:maestro@) Simulation time 52.3093
-> [ 52.309278] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'worker-3'. Nevermind. Let's keep going!
-> [ 52.309278] (1:master@Tremblay) Goodbye now!
-> [ 52.309278] (5:worker@Bourassa) I'm done. See you!
-
+> [  5.103093] (7:worker@Jupiter) Start execution...
+> [  6.061856] (5:worker@Bourassa) Execution complete.
+> [  6.061856] (5:worker@Bourassa) Waiting a message on worker-4
+> [  6.072165] (2:worker@Tremblay) Execution complete.
+> [  6.072165] (2:worker@Tremblay) Waiting a message on worker-0
+> [  7.103093] (7:worker@Jupiter) Execution complete.
+> [  7.103093] (7:worker@Jupiter) Waiting a message on worker-1
+> [ 15.103093] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'worker-2'. Nevermind. Let's keep going!
+> [ 15.103093] (1:master@Tremblay) Send a message to worker-3
+> [ 15.103093] (1:master@Tremblay) Mmh. Something went wrong with 'worker-3'. Nevermind. Let's keep going!
+> [ 15.103093] (1:master@Tremblay) Send a message to worker-4
+> [ 15.103093] (4:worker@Ginette) Mmh. Something went wrong. Nevermind. Let's keep going!
+> [ 15.103093] (4:worker@Ginette) Waiting a message on worker-3
+> [ 16.134021] (1:master@Tremblay) Send to worker-4 completed
+> [ 16.134021] (1:master@Tremblay) Send a message to worker-0
+> [ 16.134021] (5:worker@Bourassa) Start execution...
+> [ 16.144330] (1:master@Tremblay) Send to worker-0 completed
+> [ 16.144330] (1:master@Tremblay) Send a message to worker-1
+> [ 16.144330] (2:worker@Tremblay) Start execution...
+> [ 17.175258] (1:master@Tremblay) Send to worker-1 completed
+> [ 17.175258] (1:master@Tremblay) Send a message to worker-2
+> [ 17.175258] (7:worker@Jupiter) Start execution...
+> [ 18.134021] (5:worker@Bourassa) Execution complete.
+> [ 18.134021] (5:worker@Bourassa) Waiting a message on worker-4
+> [ 18.144330] (2:worker@Tremblay) Execution complete.
+> [ 18.144330] (2:worker@Tremblay) Waiting a message on worker-0
+> [ 19.175258] (7:worker@Jupiter) Execution complete.
+> [ 19.175258] (7:worker@Jupiter) Waiting a message on worker-1
+> [ 27.175258] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'worker-2'. Nevermind. Let's keep going!
+> [ 27.175258] (1:master@Tremblay) Send a message to worker-3
+> [ 28.206186] (1:master@Tremblay) Send to worker-3 completed
+> [ 28.206186] (1:master@Tremblay) Send a message to worker-4
+> [ 28.206186] (1:master@Tremblay) Mmh. Something went wrong with 'worker-4'. Nevermind. Let's keep going!
+> [ 28.206186] (1:master@Tremblay) Send a message to worker-0
+> [ 28.206186] (4:worker@Ginette) Start execution...
+> [ 28.206186] (5:worker@Bourassa) Mmh. Something went wrong. Nevermind. Let's keep going!
+> [ 28.206186] (5:worker@Bourassa) Waiting a message on worker-4
+> [ 28.216495] (1:master@Tremblay) Send to worker-0 completed
+> [ 28.216495] (1:master@Tremblay) Send a message to worker-1
+> [ 28.216495] (2:worker@Tremblay) Start execution...
+> [ 29.247423] (1:master@Tremblay) Send to worker-1 completed
+> [ 29.247423] (1:master@Tremblay) Send a message to worker-2
+> [ 29.247423] (7:worker@Jupiter) Start execution...
+> [ 30.206186] (4:worker@Ginette) Execution complete.
+> [ 30.206186] (4:worker@Ginette) Waiting a message on worker-3
+> [ 30.216495] (2:worker@Tremblay) Execution complete.
+> [ 30.216495] (2:worker@Tremblay) Waiting a message on worker-0
+> [ 31.247423] (7:worker@Jupiter) Execution complete.
+> [ 31.247423] (7:worker@Jupiter) Waiting a message on worker-1
+> [ 39.247423] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'worker-2'. Nevermind. Let's keep going!
+> [ 39.247423] (1:master@Tremblay) Send a message to worker-3
+> [ 40.278351] (1:master@Tremblay) Send to worker-3 completed
+> [ 40.278351] (1:master@Tremblay) Send a message to worker-4
+> [ 40.278351] (4:worker@Ginette) Start execution...
+> [ 41.000000] (4:worker@Ginette) Gloups. The cpu on which I'm running just turned off!. See you!
+> [ 41.309278] (1:master@Tremblay) Send to worker-4 completed
+> [ 41.309278] (1:master@Tremblay) All tasks have been dispatched. Let's tell everybody the computation is over.
+> [ 41.309278] (2:worker@Tremblay) I'm done. See you!
+> [ 41.309278] (5:worker@Bourassa) Start execution...
+> [ 41.309278] (7:worker@Jupiter) I'm done. See you!
+> [ 42.309278] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'worker-2'. Nevermind. Let's keep going!
+> [ 43.309278] (0:maestro@) Simulation time 43.3093
+> [ 43.309278] (1:master@Tremblay) Mmh. Got timeouted while speaking to 'worker-3'. Nevermind. Let's keep going!
+> [ 43.309278] (1:master@Tremblay) Goodbye now!
+> [ 43.309278] (5:worker@Bourassa) Execution complete.
+> [ 43.309278] (5:worker@Bourassa) Waiting a message on worker-4
+> [ 43.309278] (5:worker@Bourassa) I'm done. See you!