Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / examples / cpp / exec-failure / s4u-exec-failure.tesh
1 #!/usr/bin/env tesh
2
3 $ ${bindir:=.}/s4u-exec-failure "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
4 > [  0.000000] (1:Dispatcher@Host1) Initiating asynchronous exec on Host1
5 > [  0.000000] (2:HostKiller@Host1) HostKiller  sleeping 10 seconds...
6 > [  0.000000] (1:Dispatcher@Host1) Initiating asynchronous exec on Host2
7 > [  0.000000] (1:Dispatcher@Host1) Calling wait_any..
8 > [ 10.000000] (2:HostKiller@Host1) HostKiller turning off host Host2
9 > [ 10.000000] (1:Dispatcher@Host1) Dispatcher has experienced a host failure exception, so it knows that something went wrong
10 > [ 10.000000] (1:Dispatcher@Host1) Now it needs to figure out which of the two execs failed by looking at their state
11 > [ 10.000000] (1:Dispatcher@Host1) Exec on Host1 has state: STARTED
12 > [ 10.000000] (1:Dispatcher@Host1) Exec on Host2 has state: FAILED
13 > [ 10.000000] (1:Dispatcher@Host1) Waiting on a FAILED exec raises an exception: 'Cannot wait for a failed exec'
14 > [ 10.000000] (1:Dispatcher@Host1) Wait for remaining exec, just to be nice
15 > [ 10.000000] (2:HostKiller@Host1) HostKiller ends
16 > [ 20.000000] (1:Dispatcher@Host1) Dispatcher ends