Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[smpi] replay from `smpirun -replay <tracefile>`
[simgrid.git] / examples / smpi / replay / replay-override-replayer.tesh
diff --git a/examples/smpi/replay/replay-override-replayer.tesh b/examples/smpi/replay/replay-override-replayer.tesh
new file mode 100644 (file)
index 0000000..ba2986b
--- /dev/null
@@ -0,0 +1,352 @@
+# use the tested library, not the installed one
+# (since we want to pass it to the child, it has to be redefined before each command)
+# Go for the first test
+
+p Test of trace replay with SMPI (one trace for all processes)
+
+< replay/actions_bcast.txt
+$ mkfile replay/one_trace_override
+! timeout 60
+
+$ ../../smpi_script/bin/smpirun -no-privatize -replay replay/one_trace_override --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+> [Tremblay:0:(1) 0.000000] [smpi_replay/VERBOSE] 0 bcast 5e4 0.000000
+> [Jupiter:1:(2) 0.015036] [smpi_replay/VERBOSE] 1 bcast 5e4 0.015036
+> [Fafard:2:(3) 0.015676] [smpi_replay/VERBOSE] 2 bcast 5e4 0.015676
+> [Jupiter:1:(2) 2.636405] [smpi_replay/VERBOSE] 1 compute 2e8 2.621369
+> [Tremblay:0:(1) 5.097100] [smpi_replay/VERBOSE] 0 compute 5e8 5.097100
+> [Tremblay:0:(1) 5.097100] [smpi_replay/VERBOSE] 0 bcast 5e4 0.000000
+> [Jupiter:1:(2) 5.112136] [smpi_replay/VERBOSE] 1 bcast 5e4 2.475730
+> [Fafard:2:(3) 6.569099] [smpi_replay/VERBOSE] 2 compute 5e8 6.553424
+> [Fafard:2:(3) 6.584775] [smpi_replay/VERBOSE] 2 bcast 5e4 0.015676
+> [Jupiter:1:(2) 7.733505] [smpi_replay/VERBOSE] 1 compute 2e8 2.621369
+> [Tremblay:0:(1) 10.194200] [smpi_replay/VERBOSE] 0 compute 5e8 5.097100
+> [Fafard:2:(3) 13.138198] [smpi_replay/VERBOSE] 2 compute 5e8 6.553424
+> [Jupiter:1:(2) 14.286929] [smpi_replay/VERBOSE] 1 reduce 5e4 5e8 6.553424
+> [Tremblay:0:(1) 18.250974] [smpi_replay/VERBOSE] 0 reduce 5e4 5e8 8.056774
+> [Fafard:2:(3) 19.691622] [smpi_replay/VERBOSE] 2 reduce 5e4 5e8 6.553424
+> [Fafard:2:(3) 19.691622] [smpi_replay/INFO] Simulation time 19.691622
+
+$ rm -f replay/one_trace_override
+
+p The same with tracing activated
+
+< replay/actions_bcast.txt
+$ mkfile replay/one_trace_override
+
+$ ../../smpi_script/bin/smpirun -no-privatize -replay replay/one_trace_override --log=replay.thresh:critical --log=no_loc  --cfg=tracing:yes --cfg=tracing/smpi:yes --cfg=tracing/smpi/computing:yes --cfg=tracing/filename:./simgrid_override.trace --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile  --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+> [Fafard:2:(3) 19.691622] [smpi_replay/INFO] Simulation time 19.691622
+
+# $ rm -f replay/one_trace_override
+
+$ tail -n +3 ./simgrid_override.trace
+> %EventDef PajeDefineContainerType 0
+> %       Alias string
+> %       Type string
+> %       Name string
+> %EndEventDef
+> %EventDef PajeDefineVariableType 1
+> %       Alias string
+> %       Type string
+> %       Name string
+> %       Color color
+> %EndEventDef
+> %EventDef PajeDefineStateType 2
+> %       Alias string
+> %       Type string
+> %       Name string
+> %EndEventDef
+> %EventDef PajeDefineEventType 3
+> %       Alias string
+> %       Type string
+> %       Name string
+> %EndEventDef
+> %EventDef PajeDefineLinkType 4
+> %       Alias string
+> %       Type string
+> %       StartContainerType string
+> %       EndContainerType string
+> %       Name string
+> %EndEventDef
+> %EventDef PajeDefineEntityValue 5
+> %       Alias string
+> %       Type string
+> %       Name string
+> %       Color color
+> %EndEventDef
+> %EventDef PajeCreateContainer 6
+> %       Time date
+> %       Alias string
+> %       Type string
+> %       Container string
+> %       Name string
+> %EndEventDef
+> %EventDef PajeDestroyContainer 7
+> %       Time date
+> %       Type string
+> %       Name string
+> %EndEventDef
+> %EventDef PajeSetVariable 8
+> %       Time date
+> %       Type string
+> %       Container string
+> %       Value double
+> %EndEventDef
+> %EventDef PajeAddVariable 9
+> %       Time date
+> %       Type string
+> %       Container string
+> %       Value double
+> %EndEventDef
+> %EventDef PajeSubVariable 10
+> %       Time date
+> %       Type string
+> %       Container string
+> %       Value double
+> %EndEventDef
+> %EventDef PajeSetState 11
+> %       Time date
+> %       Type string
+> %       Container string
+> %       Value string
+> %EndEventDef
+> %EventDef PajePushState 12
+> %       Time date
+> %       Type string
+> %       Container string
+> %       Value string
+> %EndEventDef
+> %EventDef PajePopState 13
+> %       Time date
+> %       Type string
+> %       Container string
+> %EndEventDef
+> %EventDef PajeResetState 14
+> %       Time date
+> %       Type string
+> %       Container string
+> %EndEventDef
+> %EventDef PajeStartLink 15
+> %       Time date
+> %       Type string
+> %       Container string
+> %       Value string
+> %       StartContainer string
+> %       Key string
+> %EndEventDef
+> %EventDef PajeEndLink 16
+> %       Time date
+> %       Type string
+> %       Container string
+> %       Value string
+> %       EndContainer string
+> %       Key string
+> %EndEventDef
+> %EventDef PajeNewEvent 17
+> %       Time date
+> %       Type string
+> %       Container string
+> %       Value string
+> %EndEventDef
+> 0 1 0 MPI
+> 2 2 1 MPI_STATE
+> 4 3 0 1 1 MPI_LINK
+> 4 4 0 1 1 MIGRATE_LINK
+> 2 5 1 MIGRATE_STATE
+> 6 0.000000 1 1 0 "rank-1"
+> 5 6 2 computing "0 1 1"
+> 5 7 2 smpi_replay_run_init "0 1 0"
+> 6 0.000000 2 1 0 "rank-2"
+> 6 0.000000 3 1 0 "rank-3"
+> 5 8 2 action_bcast "0 0.78 0.39"
+> 12 0.000000 2 1 7
+> 13 0.000000 2 1
+> 12 0.000000 2 2 7
+> 13 0.000000 2 2
+> 12 0.000000 2 3 7
+> 13 0.000000 2 3
+> 12 0.000000 2 1 8
+> 12 0.000000 2 2 8
+> 12 0.000000 2 3 8
+> 13 0.000000 2 1
+> 12 0.000000 2 1 6
+> 5 9 2 action_reduce "0 1 0"
+> 5 10 2 smpi_replay_run_finalize "0 1 0"
+> 13 0.015036 2 2
+> 12 0.015036 2 2 6
+> 13 0.015676 2 3
+> 12 0.015676 2 3 6
+> 13 2.636405 2 2
+> 12 2.636405 2 2 8
+> 13 5.097100 2 1
+> 12 5.097100 2 1 8
+> 13 5.097100 2 1
+> 12 5.097100 2 1 6
+> 13 5.112136 2 2
+> 12 5.112136 2 2 6
+> 13 6.569099 2 3
+> 12 6.569099 2 3 8
+> 13 6.584775 2 3
+> 12 6.584775 2 3 6
+> 13 7.733505 2 2
+> 12 7.733505 2 2 9
+> 13 10.194200 2 1
+> 12 10.194200 2 1 9
+> 13 13.138198 2 3
+> 12 13.138198 2 3 9
+> 13 14.286929 2 2
+> 12 14.286929 2 2 10
+> 13 18.250974 2 1
+> 12 18.250974 2 1 10
+> 13 19.691622 2 3
+> 12 19.691622 2 3 10
+> 13 19.691622 2 3
+> 7 19.691622 1 3
+> 13 19.691622 2 2
+> 7 19.691622 1 2
+> 13 19.691622 2 1
+> 7 19.691622 1 1
+
+$ rm -f ./simgrid_override.trace
+
+p Another test of trace replay with SMPI (one trace per process)
+
+< replay/actions0.txt
+< replay/actions1.txt
+$ mkfile ./split_traces_tesh_override
+
+$ ../../smpi_script/bin/smpirun -no-privatize -replay ./split_traces_tesh_override --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 2 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+> [Tremblay:0:(1) 0.167158] [smpi_replay/VERBOSE] 0 send 1 0 1e6 0.167158
+> [Jupiter:1:(2) 0.167158] [smpi_replay/VERBOSE] 1 recv 0 0 1e6 0.167158
+> [Jupiter:1:(2) 13.274005] [smpi_replay/VERBOSE] 1 compute 1e9 13.106847
+> [Jupiter:1:(2) 13.274005] [smpi_replay/VERBOSE] 1 isend 0 1 1e6 0.000000
+> [Jupiter:1:(2) 13.274005] [smpi_replay/VERBOSE] 1 irecv 0 2 1e6 0.000000
+> [Tremblay:0:(1) 13.441162] [smpi_replay/VERBOSE] 0 recv 1 1 1e6 13.274005
+> [Jupiter:1:(2) 13.608320] [smpi_replay/VERBOSE] 1 wait 0 1 2 0.334315
+> [Tremblay:0:(1) 13.608320] [smpi_replay/VERBOSE] 0 send 1 2 1e6 0.167158
+> [Jupiter:1:(2) 13.608320] [smpi_replay/INFO] Simulation time 13.608320
+
+$ rm -f ./split_traces_tesh_override
+
+p Test of barrier replay with SMPI (one trace for all processes)
+
+< replay/actions_barrier.txt
+$ mkfile replay/one_trace_override
+
+$ ../../smpi_script/bin/smpirun -no-privatize -replay replay/one_trace_override --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+> [Tremblay:0:(1) 1.518421] [smpi_replay/VERBOSE] 0 send 1 0 1e7 1.518421
+> [Jupiter:1:(2) 1.518421] [smpi_replay/VERBOSE] 1 recv 0 0 1e7 1.518421
+> [Tremblay:0:(1) 1.520397] [smpi_replay/VERBOSE] 0 barrier 0.001976
+> [Jupiter:1:(2) 1.521858] [smpi_replay/VERBOSE] 1 barrier 0.003438
+> [Fafard:2:(3) 1.522373] [smpi_replay/VERBOSE] 2 barrier 1.522373
+> [Tremblay:0:(1) 2.520397] [smpi_replay/VERBOSE] 0 compute 98095000 1.000000
+> [Jupiter:1:(2) 2.521858] [smpi_replay/VERBOSE] 1 compute 76296000 1.000000
+> [Fafard:2:(3) 2.522373] [smpi_replay/VERBOSE] 2 compute 76296000 1.000000
+> [Fafard:2:(3) 2.522373] [smpi_replay/INFO] Simulation time 2.522373
+
+$ rm -f replay/one_trace_override
+
+p Test of isend replay with SMPI (one trace for all processes)
+
+< replay/actions_with_isend.txt
+$ mkfile replay/one_trace_override
+
+$ ../../smpi_script/bin/smpirun -no-privatize -replay replay/one_trace_override --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+> [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 irecv 0 0 1e6 0.000000
+> [Jupiter:1:(2) 6.553424] [smpi_replay/VERBOSE] 1 compute 5e8 6.553424
+> [Jupiter:1:(2) 6.553524] [smpi_replay/VERBOSE] 1 test 0 1 0 0.000100
+> [Tremblay:0:(1) 10.194200] [smpi_replay/VERBOSE] 0 compute 1e9 10.194200
+> [Tremblay:0:(1) 10.361357] [smpi_replay/VERBOSE] 0 send 1 0 1e6 0.167158
+> [Jupiter:1:(2) 13.106947] [smpi_replay/VERBOSE] 1 compute 5e8 6.553424
+> [Jupiter:1:(2) 13.106947] [smpi_replay/VERBOSE] 1 wait 0 1 0 0.000000
+> [Tremblay:0:(1) 20.555557] [smpi_replay/VERBOSE] 0 compute 1e9 10.194200
+> [Fafard:2:(3) 26.213694] [smpi_replay/VERBOSE] 2 compute 2e9 26.213694
+> [Fafard:2:(3) 26.213694] [smpi_replay/VERBOSE] 2 irecv 1 1 1e6 0.000000
+> [Jupiter:1:(2) 26.403860] [smpi_replay/VERBOSE] 1 send 2 1 1e6 13.296913
+> [Fafard:2:(3) 29.490406] [smpi_replay/VERBOSE] 2 compute 2.5e8 3.276712
+> [Fafard:2:(3) 29.490606] [smpi_replay/VERBOSE] 2 test 1 2 1 0.000200
+> [Fafard:2:(3) 32.767318] [smpi_replay/VERBOSE] 2 compute 2.5e8 3.276712
+> [Fafard:2:(3) 32.767318] [smpi_replay/VERBOSE] 2 wait 1 2 1 0.000000
+> [Fafard:2:(3) 32.767318] [smpi_replay/VERBOSE] 2 isend 0 2 1e6 0.000000
+> [Tremblay:0:(1) 32.923014] [smpi_replay/VERBOSE] 0 recv 2 2 1e6 12.367458
+> [Fafard:2:(3) 39.320741] [smpi_replay/VERBOSE] 2 compute 5e8 6.553424
+> [Fafard:2:(3) 39.320741] [smpi_replay/INFO] Simulation time 39.320741
+
+$ rm -f replay/one_trace_override
+
+p Test of AllReduce replay with SMPI (one trace for all processes)
+
+< replay/actions_allreduce.txt
+$ mkfile replay/one_trace_override
+
+$ ../../smpi_script/bin/smpirun -no-privatize -replay replay/one_trace_override --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+> [Tremblay:0:(1) 5.112775] [smpi_replay/VERBOSE] 0 allreduce 5e4 5e8 5.112775
+> [Jupiter:1:(2) 6.584135] [smpi_replay/VERBOSE] 1 allreduce 5e4 5e8 6.584135
+> [Fafard:2:(3) 6.584775] [smpi_replay/VERBOSE] 2 allreduce 5e4 5e8 6.584775
+> [Tremblay:0:(1) 10.209875] [smpi_replay/VERBOSE] 0 compute 5e8 5.097100
+> [Jupiter:1:(2) 13.137559] [smpi_replay/VERBOSE] 1 compute 5e8 6.553424
+> [Fafard:2:(3) 13.138198] [smpi_replay/VERBOSE] 2 compute 5e8 6.553424
+> [Fafard:2:(3) 13.138198] [smpi_replay/INFO] Simulation time 13.138198
+
+$ rm -f replay/one_trace_override
+
+p Test of AllToAll replay with SMPI (one trace for all processes)
+
+< replay/actions_alltoall.txt
+$ mkfile replay/one_trace_override
+
+$ ../../smpi_script/bin/smpirun -no-privatize -replay replay/one_trace_override --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+> [Tremblay:0:(1) 0.004041] [smpi_replay/VERBOSE] 0 alltoall 500 500 0.004041
+> [Fafard:2:(3) 0.006920] [smpi_replay/VERBOSE] 2 alltoall 500 500 0.006920
+> [Jupiter:1:(2) 0.006920] [smpi_replay/VERBOSE] 1 alltoall 500 500 0.006920
+> [Jupiter:1:(2) 0.006920] [smpi_replay/INFO] Simulation time 0.006920
+
+
+
+$ rm -f replay/one_trace_override
+
+p Test of AllToAllv replay with SMPI (one trace for all processes)
+
+< replay/actions_alltoallv.txt
+$ mkfile replay/one_trace_override
+
+$ ../../smpi_script/bin/smpirun -no-privatize -replay replay/one_trace_override --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+> [Tremblay:0:(1) 0.004000] [smpi_replay/VERBOSE] 0 alltoallv 100 1 40 30 1000 1 80 100 0.004000
+> [Jupiter:1:(2) 0.006935] [smpi_replay/VERBOSE] 1 alltoallv 1000 80 1 40 1000 40 1 30 0.006935
+> [Fafard:2:(3) 0.006936] [smpi_replay/VERBOSE] 2 alltoallv 1000 100 30 1 1000 30 40 1 0.006936
+> [Fafard:2:(3) 0.006936] [smpi_replay/INFO] Simulation time 0.006936
+
+$ rm -f replay/one_trace_override
+
+p Test of AllGatherv replay with SMPI (one trace for all processes)
+
+< replay/actions_allgatherv.txt
+$ mkfile replay/one_trace_override
+
+$ ../../smpi_script/bin/smpirun -no-privatize -replay replay/one_trace_override --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 4 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+> [Tremblay:0:(1) 1.397261] [smpi_replay/VERBOSE] 0 allgatherv 275427 275427 275427 275427 204020 0 0 1.397261
+> [Ginette:3:(4) 1.760421] [smpi_replay/VERBOSE] 3 allgatherv 204020 275427 275427 275427 204020 0 0 1.760421
+> [Fafard:2:(3) 1.941986] [smpi_replay/VERBOSE] 2 allgatherv 275427 275427 275427 275427 204020 0 0 1.941986
+> [Jupiter:1:(2) 1.941986] [smpi_replay/VERBOSE] 1 allgatherv 275427 275427 275427 275427 204020 0 0 1.941986
+> [Jupiter:1:(2) 1.941986] [smpi_replay/INFO] Simulation time 1.941986
+
+$ rm -f replay/one_trace_override
+
+p Test of waitall replay with SMPI (one trace for all processes)
+
+< replay/actions_waitall.txt
+$ mkfile replay/one_trace_override
+
+! output sort 19
+$ ../../smpi_script/bin/smpirun -no-privatize -replay replay/one_trace_override --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+> [Fafard:2:(3) 0.000000] [smpi_replay/VERBOSE] 2 irecv 1 1 3000 0.000000
+> [Fafard:2:(3) 0.000000] [smpi_replay/VERBOSE] 2 isend 0 2 3000 0.000000
+> [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 isend 0 0 2000 0.000000
+> [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 isend 2 1 3000 0.000000
+> [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 waitall 0.000000
+> [Tremblay:0:(1) 0.000000] [smpi_replay/VERBOSE] 0 irecv 1 0 2000 0.000000
+> [Tremblay:0:(1) 0.000000] [smpi_replay/VERBOSE] 0 irecv 2 2 3000 0.000000
+> [Tremblay:0:(1) 0.003787] [smpi_replay/VERBOSE] 0 waitall 0.003787
+> [Fafard:2:(3) 0.006220] [smpi_replay/VERBOSE] 2 waitall 0.006220
+> [Fafard:2:(3) 0.006220] [smpi_replay/INFO] Simulation time 0.006220
+
+$ rm -f replay/one_trace_override