Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
8c176643b7f47a4144c2c26f503e06b74e22e854
[simgrid.git] / examples / cpp / synchro-mutex / s4u-mc-synchro-mutex.tesh
1 #!/usr/bin/env tesh
2
3 p This file tests the dependencies between MUTEX transitions
4
5 $ ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.thres:verbose --log=root.fmt="[Checker]%e%m%n" -- ${bindir:=.}/s4u-synchro-mutex --cfg=actors:1 --log=s4u_test.thres:critical --log=root.fmt="[App%e%e%e%e]%e%m%n"
6 > [App    ] Configuration change: Set 'actors' to '1'
7 > [Checker] Start a DFS exploration. Reduction is: dpor.
8 > [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (stack depth: 1, state: 1, 0 interleaves)
9 > [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner: 1) (stack depth: 2, state: 2, 0 interleaves)
10 > [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 3, state: 3, 0 interleaves)
11 > [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 4, state: 4, 0 interleaves)
12 > [Checker] INDEPENDENT Transitions:
13 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
14 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
15 > [Checker] INDEPENDENT Transitions:
16 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=2)
17 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
18 > [Checker] Dependent Transitions:
19 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=1)
20 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
21 > [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 5, state: 5, 0 interleaves)
22 > [Checker] Dependent Transitions:
23 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
24 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=5)
25 > [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 6, 0 interleaves)
26 > [Checker] Dependent Transitions:
27 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
28 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=6)
29 > [Checker] Execution came to an end at 1;1;1;2;2;2;0 (state: 7, depth: 7)
30 > [Checker] Backtracking from 1;1;1;2;2;2;0
31 > [App    ] Configuration change: Set 'actors' to '1'
32 > [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (stack depth: 3, state: 3, 0 interleaves)
33 > [Checker] INDEPENDENT Transitions:
34 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=2)
35 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=3)
36 > [Checker] Dependent Transitions:
37 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=1)
38 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=3)
39 > [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: 2) (stack depth: 4, state: 8, 0 interleaves)
40 > [Checker] INDEPENDENT Transitions:
41 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=3)
42 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 2) (state=8)
43 > [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 5, state: 9, 0 interleaves)
44 > [Checker] Dependent Transitions:
45 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 2) (state=8)
46 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=9)
47 > [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 10, 0 interleaves)
48 > [Checker] Dependent Transitions:
49 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 2) (state=8)
50 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=10)
51 > [Checker] Execution came to an end at 1;1;2;1;2;2;0 (state: 11, depth: 7)
52 > [Checker] Backtracking from 1;1;2;1;2;2;0
53 > [App    ] Configuration change: Set 'actors' to '1'
54 > [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 1, state: 1, 0 interleaves)
55 > [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 2, state: 12, 0 interleaves)
56 > [Checker] Dependent Transitions:
57 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=1)
58 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=12)
59 > [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 3, state: 13, 0 interleaves)
60 > [Checker] INDEPENDENT Transitions:
61 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=12)
62 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=13)
63 > [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: 1) (stack depth: 4, state: 14, 0 interleaves)
64 > [Checker] INDEPENDENT Transitions:
65 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=12)
66 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=14)
67 > [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner: 1) (stack depth: 5, state: 15, 0 interleaves)
68 > [Checker] Dependent Transitions:
69 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=14)
70 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=15)
71 > [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 16, 0 interleaves)
72 > [Checker] Dependent Transitions:
73 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=14)
74 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=16)
75 > [Checker] Execution came to an end at 2;1;2;2;1;1;0 (state: 17, depth: 7)
76 > [Checker] Backtracking from 2;1;2;2;1;1;0
77 > [Checker] DFS exploration ended. 17 unique states visited; 3 backtracks (21 transition replays, 2 states visited overall)
78
79 $ ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true -- ${bindir:=.}/s4u-synchro-mutex --cfg=actors:2 --log=s4u_test.thres:critical --log=xbt_cfg.thres:critical 
80 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/sleep-set' to 'true'
81 > [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor.
82 > [0.000000] [mc_dfs/INFO] DFS exploration ended. 128 unique states visited; 26 backtracks (296 transition replays, 143 states visited overall)
83
84 $ ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true -- ${bindir:=.}/s4u-synchro-mutex --cfg=actors:3 --log=s4u_test.thres:critical --log=xbt_cfg.thres:critical 
85 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/sleep-set' to 'true'
86 > [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor.
87 > [0.000000] [mc_dfs/INFO] DFS exploration ended. 4645 unique states visited; 1082 backtracks (18004 transition replays, 12278 states visited overall)