File: comm-failure.tesh

package info (click to toggle)
simgrid 4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 39,192 kB
  • sloc: cpp: 124,913; ansic: 66,744; python: 8,560; java: 6,773; fortran: 6,079; f90: 5,123; xml: 4,587; sh: 2,194; perl: 1,436; makefile: 111; lisp: 49; javascript: 7; sed: 6
file content (17 lines) | stat: -rw-r--r-- 1,310 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env tesh

$ ${pythoncmd:=python3} ${PYTHON_TOOL_OPTIONS:=} ${srcdir:=.}/comm-failure.py "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
> [  0.000000] (2:Receiver-1@Host2) Receiver posting a receive (mailbox2)...
> [  0.000000] (3:Receiver-2@Host3) Receiver posting a receive (mailbox3)...
> [  0.000000] (1:Sender@Host1) Initiating asynchronous send to mailbox2
> [  0.000000] (1:Sender@Host1) Initiating asynchronous send to mailbox3
> [  0.000000] (1:Sender@Host1) Calling wait_any..
> [ 10.000000] (4:LinkKiller@Host2) Turning off link 'link_to_2'
> [ 10.000000] (2:Receiver-1@Host2) Receiver has experience a network failure exception (mailbox2)
> [ 10.000000] (1:Sender@Host1) Sender has experienced a network failure exception, so it knows that something went wrong
> [ 10.000000] (1:Sender@Host1) Now it needs to figure out which of the two comms failed by looking at their state:
> [ 10.000000] (1:Sender@Host1)   Comm to mailbox2 has state: FAILED
> [ 10.000000] (1:Sender@Host1)   Comm to mailbox3 has state: STARTED
> [ 10.000000] (1:Sender@Host1) Waiting on a FAILED comm raises an exception: 'Cannot wait for a failed communication'
> [ 10.000000] (1:Sender@Host1) Wait for remaining comm, just to be nice
> [ 17.319588] (3:Receiver-2@Host3) Receiver has received successfully (mailbox3)!