Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'add_mutex_python_bindings' into 'master'
[simgrid.git] / examples / python / synchro-mutex / synchro-mutex.tesh
1 #!/usr/bin/env tesh
2
3 p Testing Mutex
4
5 $ ${pythoncmd:=python3} ${PYTHON_TOOL_OPTIONS:=} ${bindir:=.}/synchro-mutex.py --platform ${platfdir}/two_hosts.xml --actors 0 "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
6 >[ 10.000000] (1:master@Tremblay) I'm done, good bye
7
8 $ ${pythoncmd:=python3} ${PYTHON_TOOL_OPTIONS:=} ${bindir:=.}/synchro-mutex.py --platform ${platfdir}/two_hosts.xml --actors 1 "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
9 >[  0.000000] (2:worker-0(mgr)@Jupiter) Hello simgrid, I'm ready to compute after acquiring the mutex from a context manager
10 >[  0.000000] (2:worker-0(mgr)@Jupiter) I'm done, good bye
11 >[  0.000000] (3:worker-0@Tremblay) Hello simgrid, I'm ready to compute after a regular lock
12 >[  0.000000] (3:worker-0@Tremblay) I'm done, good bye
13 >[ 10.000000] (1:master@Tremblay) Result[0] -> 2
14 >[ 10.000000] (1:master@Tremblay) I'm done, good bye
15
16 $ ${pythoncmd:=python3} ${PYTHON_TOOL_OPTIONS:=} ${bindir:=.}/synchro-mutex.py --platform ${platfdir}/two_hosts.xml --actors 5 "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
17 >[  0.000000] (2:worker-0(mgr)@Jupiter) Hello simgrid, I'm ready to compute after acquiring the mutex from a context manager
18 >[  0.000000] (2:worker-0(mgr)@Jupiter) I'm done, good bye
19 >[  0.000000] (3:worker-0@Tremblay) Hello simgrid, I'm ready to compute after a regular lock
20 >[  0.000000] (3:worker-0@Tremblay) I'm done, good bye
21 >[  0.000000] (4:worker-1(mgr)@Jupiter) Hello simgrid, I'm ready to compute after acquiring the mutex from a context manager
22 >[  0.000000] (4:worker-1(mgr)@Jupiter) I'm done, good bye
23 >[  0.000000] (5:worker-1@Tremblay) Hello simgrid, I'm ready to compute after a regular lock
24 >[  0.000000] (5:worker-1@Tremblay) I'm done, good bye
25 >[  0.000000] (6:worker-2(mgr)@Jupiter) Hello simgrid, I'm ready to compute after acquiring the mutex from a context manager
26 >[  0.000000] (6:worker-2(mgr)@Jupiter) I'm done, good bye
27 >[  0.000000] (7:worker-2@Tremblay) Hello simgrid, I'm ready to compute after a regular lock
28 >[  0.000000] (7:worker-2@Tremblay) I'm done, good bye
29 >[  0.000000] (8:worker-3(mgr)@Jupiter) Hello simgrid, I'm ready to compute after acquiring the mutex from a context manager
30 >[  0.000000] (8:worker-3(mgr)@Jupiter) I'm done, good bye
31 >[  0.000000] (9:worker-3@Tremblay) Hello simgrid, I'm ready to compute after a regular lock
32 >[  0.000000] (9:worker-3@Tremblay) I'm done, good bye
33 >[  0.000000] (10:worker-4(mgr)@Jupiter) Hello simgrid, I'm ready to compute after acquiring the mutex from a context manager
34 >[  0.000000] (10:worker-4(mgr)@Jupiter) I'm done, good bye
35 >[  0.000000] (11:worker-4@Tremblay) Hello simgrid, I'm ready to compute after a regular lock
36 >[  0.000000] (11:worker-4@Tremblay) I'm done, good bye
37 >[ 10.000000] (1:master@Tremblay) Result[0] -> 2
38 >[ 10.000000] (1:master@Tremblay) Result[1] -> 2
39 >[ 10.000000] (1:master@Tremblay) Result[2] -> 2
40 >[ 10.000000] (1:master@Tremblay) Result[3] -> 2
41 >[ 10.000000] (1:master@Tremblay) Result[4] -> 2
42 >[ 10.000000] (1:master@Tremblay) I'm done, good bye