Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add test for call location with ti traces/replay/adjustment/sleep/computing=0.
authorAugustin Degomme <adegomme@gmail.com>
Thu, 3 Oct 2019 14:26:50 +0000 (16:26 +0200)
committerAugustin Degomme <adegomme@gmail.com>
Thu, 3 Oct 2019 14:27:04 +0000 (16:27 +0200)
Idea is to replay twice a trace with an adjustment file meant to speedup the sleep (and only it, to avoid variability).
It's clearly not realistic, but timings should be reproducible (or not..).

examples/smpi/CMakeLists.txt
examples/smpi/trace_call_location/adjust [new file with mode: 0644]
examples/smpi/trace_call_location/trace_call_location.c
examples/smpi/trace_call_location/trace_call_location.tesh

index 313a577..b72db9a 100644 (file)
@@ -68,7 +68,8 @@ set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions0.t
                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_reducescatter.txt
                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_waitall.txt
                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions_with_isend.txt
-                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay/split_traces                         PARENT_SCOPE)
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay/split_traces
+                                   ${CMAKE_CURRENT_SOURCE_DIR}/trace_call_location/adjust                  PARENT_SCOPE)
 
 if(enable_smpi)
   # MC is currently broken with threads (deadlock => timeout)
diff --git a/examples/smpi/trace_call_location/adjust b/examples/smpi/trace_call_location/adjust
new file mode 100644 (file)
index 0000000..03b309f
--- /dev/null
@@ -0,0 +1,2 @@
+"start:stop","ratio"
+"trace_call_location.c:15:trace_call_location.c:15","1000"
index 4397aaf..f2c5081 100644 (file)
@@ -12,6 +12,7 @@ int main(int argc, char *argv[])
 {
   MPI_Init(&argc, &argv);
   MPI_Barrier (MPI_COMM_WORLD);
+  sleep(1000);
   MPI_Finalize();
   return 0;
 }
index e6231df..fa8df47 100644 (file)
@@ -4,8 +4,23 @@
 
 p Test SMPI with call-location tracing. This means that the binary must have
 p already been compiled with the -trace-call-location switch.
-$ ${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/host-speed:1 --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+$ ${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_kernel.thres:warning --log=xbt_cfg.thres:warning
 
 $ grep -q "12 0.* 2 1 7 .*trace_call_location\.c\" 14$" ${bindir:=.}/smpi_trace.trace 
 
 $ rm -f ${bindir:=.}/smpi_trace.trace 
+
+#the same, but with trace-ti
+$ ${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_kernel.thres:warning --log=xbt_cfg.thres:warning
+
+#Test replaying the trace, without altering the time.
+#We disable computation, but leave the sleep.
+$ ${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_kernel.thres:warning --log=xbt_cfg.thres:warning --cfg=smpi/simulate-computation:no
+> [Fafard:2:(3) 1000.003952] [smpi_replay/INFO] Simulation time 1000.003952
+
+#Test replaying the trace, altering the time to have the sleep much faster (1 instead of 1000).
+$ ${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_kernel.thres:warning --log=xbt_cfg.thres:warning --cfg=smpi/simulate-computation:no
+> [Fafard:2:(3) 1.003952] [smpi_replay/INFO] Simulation time 1.003952
+
+$ rm -f ${bindir:=.}/smpi_trace.tx*
+