From e9befaced39d9f668fb9de3bfbc37dc7ac7cf2de Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Wed, 30 Oct 2013 14:46:16 +0100 Subject: [PATCH] Add an Inception tesh to test TI output. It uses pingpong executable to generate a TI trace. Then it replays this TI trace, generating a second one. They are then compared one to each other (after sorting), and should be identical --- buildtools/Cmake/AddTests.cmake | 1 + teshsuite/smpi/CMakeLists.txt | 1 + teshsuite/smpi/TI_output.tesh | 69 +++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 teshsuite/smpi/TI_output.tesh diff --git a/buildtools/Cmake/AddTests.cmake b/buildtools/Cmake/AddTests.cmake index 2393da7049..6c1f959d51 100644 --- a/buildtools/Cmake/AddTests.cmake +++ b/buildtools/Cmake/AddTests.cmake @@ -436,6 +436,7 @@ if(NOT enable_memcheck) if(HAVE_TRACING) ADD_TEST(smpi-tracing-ptp ${TESH_COMMAND} ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/tracing/smpi_traced.tesh) ADD_TEST(smpi-replay ${TESH_COMMAND} ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi --cd ${CMAKE_BINARY_DIR}/examples/smpi ${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/smpi_replay.tesh) + ADD_TEST(smpi-replay-ti-tracing ${TESH_COMMAND} ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/TI_output.tesh) endif() FOREACH (GATHER_COLL default ompi mpich ompi_basic_linear ompi_linear_sync ompi_binomial) diff --git a/teshsuite/smpi/CMakeLists.txt b/teshsuite/smpi/CMakeLists.txt index a43a67da45..e24465cf88 100644 --- a/teshsuite/smpi/CMakeLists.txt +++ b/teshsuite/smpi/CMakeLists.txt @@ -101,6 +101,7 @@ set(tesh_files ${CMAKE_CURRENT_SOURCE_DIR}/reduce_scatter_coll.tesh ${CMAKE_CURRENT_SOURCE_DIR}/struct.tesh ${CMAKE_CURRENT_SOURCE_DIR}/vector.tesh + ${CMAKE_CURRENT_SOURCE_DIR}/TI_output.tesh PARENT_SCOPE ) set(xml_files diff --git a/teshsuite/smpi/TI_output.tesh b/teshsuite/smpi/TI_output.tesh new file mode 100644 index 0000000000..a4aa997a85 --- /dev/null +++ b/teshsuite/smpi/TI_output.tesh @@ -0,0 +1,69 @@ +p Test output of time independent tracing +p generate a trace with pingpong, and replay itself, then check that output trace of the second run is the same as in the first (once sorted) +! setenv LD_LIBRARY_PATH=../../lib +! output sort +$ ../../smpi_script/bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 4 ./pingpong -q +> *** Ping-pong test (MPI_Send/MPI_Recv) *** +> == pivot=0 : pingpong [0] <--> [1] +> == pivot=1 : pingpong [1] <--> [2] +> == pivot=2 : pingpong [2] <--> [3] +> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to '1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'smpi_simgrid.txt' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi' to '1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format' to 'TI' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/computing' to '1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'out_in_ti.txt' +> [0] About to send 1st message '99' to process [1] +> [0] Received reply message '100' from process [1] +> [1] About to send 1st message '100' to process [2] +> [1] About to send back message '100' to process [0] +> [1] Received 1st message '99' from process [0] +> [1] Received reply message '101' from process [2] +> [1] increment message's value to '100' +> [2] About to send 1st message '101' to process [3] +> [2] About to send back message '101' to process [1] +> [2] Received 1st message '100' from process [1] +> [2] Received reply message '102' from process [3] +> [2] increment message's value to '101' +> [3] About to send back message '102' to process [2] +> [3] Received 1st message '101' from process [2] +> [3] increment message's value to '102' +> [rank 0] -> Tremblay +> [rank 1] -> Jupiter +> [rank 2] -> Fafard +> [rank 3] -> Ginette + +< out_in_ti.txt +$ mkfile replay_in.txt + +$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.:critical -trace-ti --cfg=tracing/filename:out_ti.txt -map -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../examples/msg/small_platform.xml -np 4 ../../examples/smpi/smpi_replay ./replay_in.txt +> [rank 0] -> Tremblay +> [rank 1] -> Jupiter +> [rank 2] -> Fafard +> [rank 3] -> Ginette +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to '1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'smpi_simgrid.txt' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi' to '1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format' to 'TI' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/computing' to '1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'maxmin/precision' to '1e-9' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP_gamma' to '4194304' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'out_ti.txt' +> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) +> [Jupiter:1:(0) 0.016798] [smpi_replay/INFO] Simulation time 0.0167976 + +$ sort out_in_ti.txt -o out_in_ti_sorted.txt +$ sort out_ti.txt -o out_ti_sorted.txt + + +$ rm replay_in.txt +$ rm out_ti.txt +$ rm out_in_ti.txt +$ rm out_ti_sorted.txt +$ rm out_in_ti_sorted.txt + -- 2.20.1