From: Arnaud Giersch Date: Fri, 15 Nov 2013 08:57:40 +0000 (+0100) Subject: Use %f to print simulation time like in xbt_log, and get the same precision. X-Git-Tag: v3_11_beta~300 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8b9696f20b03e9968251c7d4eb34061ef0ede759?hp=92035670d5948e603654fcd323cefbf5862e97d9;ds=sidebyside Use %f to print simulation time like in xbt_log, and get the same precision. --- diff --git a/examples/smpi/replay/smpi_replay.tesh b/examples/smpi/replay/smpi_replay.tesh index 589c0c8920..15704d3980 100644 --- a/examples/smpi/replay/smpi_replay.tesh +++ b/examples/smpi/replay/smpi_replay.tesh @@ -29,7 +29,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical -- > [Jupiter:1:(0) 14.286929] [smpi_replay/VERBOSE] 1 reduce 5e4 5e8 6.553424 > [Tremblay:0:(0) 18.250974] [smpi_replay/VERBOSE] 0 reduce 5e4 5e8 8.056774 > [Fafard:2:(0) 19.691622] [smpi_replay/VERBOSE] 2 reduce 5e4 5e8 6.553424 -> [Fafard:2:(0) 19.691622] [smpi_replay/INFO] Simulation time 19.6916 +> [Fafard:2:(0) 19.691622] [smpi_replay/INFO] Simulation time 19.691622 $ rm -f replay/one_trace @@ -47,7 +47,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical -- > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/computing' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) -> [Fafard:2:(0) 19.691622] [smpi_replay/INFO] Simulation time 19.6916 +> [Fafard:2:(0) 19.691622] [smpi_replay/INFO] Simulation time 19.691622 $ rm -f replay/one_trace @@ -244,7 +244,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical -- > [Tremblay:0:(0) 13.435773] [smpi_replay/VERBOSE] 0 recv 1 1e6 13.271310 > [Jupiter:1:(0) 13.600235] [smpi_replay/VERBOSE] 1 wait 0.328926 > [Tremblay:0:(0) 13.600235] [smpi_replay/VERBOSE] 0 send 1 1e6 0.164463 -> [Jupiter:1:(0) 13.600235] [smpi_replay/INFO] Simulation time 13.6002 +> [Jupiter:1:(0) 13.600235] [smpi_replay/INFO] Simulation time 13.600235 $ rm -f ./split_traces_tesh @@ -267,7 +267,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical -- > [Tremblay:0:(0) 2.495453] [smpi_replay/VERBOSE] 0 compute 98095000 1.000000 > [Jupiter:1:(0) 2.498398] [smpi_replay/VERBOSE] 1 compute 76296000 1.000000 > [Fafard:2:(0) 2.499434] [smpi_replay/VERBOSE] 2 compute 76296000 1.000000 -> [Fafard:2:(0) 2.499434] [smpi_replay/INFO] Simulation time 2.49943 +> [Fafard:2:(0) 2.499434] [smpi_replay/INFO] Simulation time 2.499434 $ rm -f replay/one_trace @@ -294,7 +294,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical -- > [Fafard:2:(0) 13.294318] [smpi_replay/VERBOSE] 2 Isend 0 1e6 0.000000 > [Tremblay:0:(0) 13.447633] [smpi_replay/VERBOSE] 0 recv 2 1e6 3.088971 > [Fafard:2:(0) 19.847741] [smpi_replay/VERBOSE] 2 compute 5e8 6.553424 -> [Fafard:2:(0) 19.847741] [smpi_replay/INFO] Simulation time 19.8477 +> [Fafard:2:(0) 19.847741] [smpi_replay/INFO] Simulation time 19.847741 $ rm -f replay/one_trace @@ -316,7 +316,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical -- > [Tremblay:0:(0) 10.209875] [smpi_replay/VERBOSE] 0 compute 5e8 5.097100 > [Jupiter:1:(0) 13.121883] [smpi_replay/VERBOSE] 1 compute 5e8 6.553424 > [Fafard:2:(0) 13.122523] [smpi_replay/VERBOSE] 2 compute 5e8 6.553424 -> [Fafard:2:(0) 13.122523] [smpi_replay/INFO] Simulation time 13.1225 +> [Fafard:2:(0) 13.122523] [smpi_replay/INFO] Simulation time 13.122523 $ rm -f replay/one_trace @@ -334,7 +334,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical -- > [Tremblay:0:(0) 0.004041] [smpi_replay/VERBOSE] 0 allToAll 500 500 0.004041 > [Jupiter:1:(0) 0.006920] [smpi_replay/VERBOSE] 1 allToAll 500 500 0.006920 > [Fafard:2:(0) 0.006920] [smpi_replay/VERBOSE] 2 allToAll 500 500 0.006920 -> [Fafard:2:(0) 0.006920] [smpi_replay/INFO] Simulation time 0.00692004 +> [Fafard:2:(0) 0.006920] [smpi_replay/INFO] Simulation time 0.006920 $ rm -f replay/one_trace @@ -352,7 +352,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical -- > [Tremblay:0:(0) 0.003999] [smpi_replay/VERBOSE] 0 allToAllV 100 1 40 30 1000 1 80 100 0.003999 > [Jupiter:1:(0) 0.006934] [smpi_replay/VERBOSE] 1 allToAllV 1000 80 1 40 1000 40 1 30 0.006934 > [Fafard:2:(0) 0.006936] [smpi_replay/VERBOSE] 2 allToAllV 1000 100 30 1 1000 30 40 1 0.006936 -> [Fafard:2:(0) 0.006936] [smpi_replay/INFO] Simulation time 0.00693554 +> [Fafard:2:(0) 0.006936] [smpi_replay/INFO] Simulation time 0.006936 $ rm -f replay/one_trace @@ -370,7 +370,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical -- > [Tremblay:0:(0) 0.841244] [smpi_replay/VERBOSE] 0 allGatherV 275427 275427 275427 275427 204020 0 0 0.841244 > [Fafard:2:(0) 1.239482] [smpi_replay/VERBOSE] 2 allGatherV 275427 275427 275427 275427 204020 0 0 1.239482 > [Jupiter:1:(0) 1.239482] [smpi_replay/VERBOSE] 1 allGatherV 275427 275427 275427 275427 204020 0 0 1.239482 -> [Jupiter:1:(0) 1.239482] [smpi_replay/INFO] Simulation time 1.23948 +> [Jupiter:1:(0) 1.239482] [smpi_replay/INFO] Simulation time 1.239482 $ rm -f replay/one_trace @@ -394,6 +394,6 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical -- > [Fafard:2:(0) 0.000000] [smpi_replay/VERBOSE] 2 Isend 0 3000 0.000000 > [Tremblay:0:(0) 0.003787] [smpi_replay/VERBOSE] 0 waitAll 0.003787 > [Fafard:2:(0) 0.006220] [smpi_replay/VERBOSE] 2 waitAll 0.006220 -> [Fafard:2:(0) 0.006220] [smpi_replay/INFO] Simulation time 0.00622039 +> [Fafard:2:(0) 0.006220] [smpi_replay/INFO] Simulation time 0.006220 $ rm -f replay/one_trace diff --git a/src/smpi/smpi_replay.c b/src/smpi/smpi_replay.c index 507957f0e9..816ad8c516 100644 --- a/src/smpi/smpi_replay.c +++ b/src/smpi/smpi_replay.c @@ -986,7 +986,7 @@ int smpi_replay_finalize(){ /* Last process alive speaking */ /* end the simulated timer */ sim_time = smpi_process_simulated_elapsed(); - XBT_INFO("Simulation time %g", sim_time); + XBT_INFO("Simulation time %f", sim_time); _xbt_replay_action_exit(); xbt_free(reqq); reqq = NULL; diff --git a/teshsuite/smpi/TI_output.tesh b/teshsuite/smpi/TI_output.tesh index d8cc911669..081f8fece3 100644 --- a/teshsuite/smpi/TI_output.tesh +++ b/teshsuite/smpi/TI_output.tesh @@ -57,7 +57,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.:critical -trace-t > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'out_ti.txt' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' > [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.0167975 +> [Jupiter:1:(0) 0.016798] [smpi_replay/INFO] Simulation time 0.016798 ! output sort $ find ./out_ti.txt_files -type f -exec cat {} \; @@ -167,7 +167,7 @@ $ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.:critical -trace-t > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'out_ti.txt' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi/format/ti_one_file' to 'yes' > [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 +> [Jupiter:1:(0) 0.016798] [smpi_replay/INFO] Simulation time 0.016798