Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
moved a line for comprehension
[simgrid.git] / examples / smpi / trace_call_location / trace_call_location.tesh
1 # use the tested library, not the installed one
2 # (since we want to pass it to the child, it has to be redefined before each command)
3 # Go for the first test
4
5 p Test SMPI with call-location tracing. This means that the binary must have
6 p already been compiled with the -trace-call-location switch.
7 $ ${bindir:=.}/../../../smpi_script/bin/smpirun -trace -trace-file ${bindir:=.}/smpi_trace.trace -hostfile ${srcdir:=.}/hostfile -platform ${platfdir}/small_platform.xml --cfg=smpi/trace-call-location:1 -np 3 ${bindir:=.}/smpi_trace_call_location --cfg=smpi/trace-call-use-absolute-path:1 --cfg=smpi/host-speed:1 --log=smpi_config.thres:warning --log=xbt_cfg.thres:warning
8
9 $ grep -q "12 0.* 2 1 7 .*trace_call_location\.c\" 14$" ${bindir:=.}/smpi_trace.trace 
10
11 $ rm -f ${bindir:=.}/smpi_trace.trace 
12
13 #the same, but with trace-ti
14 $ ${bindir:=.}/../../../smpi_script/bin/smpirun -trace-ti -trace-file ${bindir:=.}/smpi_trace.txt --cfg=tracing/smpi/sleeping:1 -hostfile ${srcdir:=.}/hostfile -platform ${platfdir}/small_platform.xml --cfg=smpi/trace-call-location:1 -np 3 ${bindir:=.}/smpi_trace_call_location --cfg=smpi/host-speed:1 --log=smpi_config.thres:warning --log=xbt_cfg.thres:warning --cfg=smpi/cpu-threshold:0
15
16 #Test replaying the trace, without altering the time.
17 #We disable computation, but leave the sleep.
18 $ ${bindir:=.}/../../../smpi_script/bin/smpirun -hostfile ${srcdir:=.}/hostfile -platform ${platfdir}/small_platform.xml -np 3 -replay ${bindir:=.}/smpi_trace.txt ${bindir:=.}/../replay/smpi_replay --cfg=smpi/host-speed:1 --log=smpi_config.thres:warning --log=xbt_cfg.thres:warning --cfg=smpi/simulate-computation:no
19 > [Fafard:2:(3) 1000.007967] [smpi_replay/INFO] Simulation time 1000.007967
20
21 #Test replaying the trace, altering the time to have the sleep much faster (1 instead of 1000).
22 $ ${bindir:=.}/../../../smpi_script/bin/smpirun -hostfile ${srcdir:=.}/hostfile -platform ${platfdir}/small_platform.xml --cfg=smpi/comp-adjustment-file:${srcdir:=.}/trace_call_location/adjust -np 3 -replay ${bindir:=.}/smpi_trace.txt ${bindir:=.}/../replay/smpi_replay  --cfg=smpi/host-speed:1 --log=smpi_config.thres:warning --log=xbt_cfg.thres:warning --cfg=smpi/simulate-computation:no
23 > [Fafard:2:(3) 1.007967] [smpi_replay/INFO] Simulation time 1.007967
24
25 $ rm -f ${bindir:=.}/smpi_trace.tx*
26