From b3685de3f6639ce25de105539ef95dd5b753ccae Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 29 Aug 2016 17:23:40 +0200 Subject: [PATCH] smpi/cpu-threshold:-1 should become smpi/simulate-computation:no --- ChangeLog | 2 + doc/doxygen/options.doc | 13 +++--- doc/manpage/smpirun.1 | 8 ++++ examples/smpi/energy/energy.tesh | 4 +- examples/smpi/energy/f77/energy.tesh | 4 +- examples/smpi/energy/f90/energy.tesh | 4 +- examples/smpi/replay/replay.tesh | 40 +++++++++---------- examples/smpi/trace_simple/trace_simple.tesh | 4 +- src/smpi/smpi_global.cpp | 4 ++ teshsuite/smpi/bug-17132/bug-17132.tesh | 4 +- .../coll-allreduce-automatic.tesh | 2 +- teshsuite/smpi/pt2pt-pingpong/TI_output.tesh | 8 ++-- teshsuite/smpi/timers/timers.tesh | 4 +- 13 files changed, 59 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1fb6ff57ae..e9f3962707 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,8 @@ SimGrid (3.14) UNRELEASED; urgency=low values were ignored in some cases. The timings of these functions can now be significantly different. + * smpi/cpu-threshold:-1 should become smpi/simulate-computation:no + Dropped functions and features * msg_mailbox_t and associated functions. Use s4u::Mailbox instead. - MSG_mailbox_is_empty() -> Mailbox::empty() diff --git a/doc/doxygen/options.doc b/doc/doxygen/options.doc index 22cfa387c0..8de0afaa16 100644 --- a/doc/doxygen/options.doc +++ b/doc/doxygen/options.doc @@ -735,7 +735,6 @@ impacts badly the simulation performance. It specifies a threshold (in seconds) below which the execution chunks are not reported to the simulation kernel (default value: 1e-6). - \note The option smpi/cpu-threshold ignores any computation time spent below this threshold. SMPI does not consider the \a amount of these @@ -743,7 +742,7 @@ simulation kernel (default value: 1e-6). value that is too low, you may end up with unreliable simulation results. - In some cases, however, one may wish to disable simulation of +In some cases, however, one may wish to disable simulation of application computation. This is the case when SMPI is used not to simulate an MPI applications, but instead an MPI code that performs "live replay" of another MPI app (e.g., ScalaTrace's replay tool, @@ -756,15 +755,19 @@ be simulated using SMPI by calling internal smpi_execute*() functions. To disable the benchmarking/simulation of computation in the simulated application, the variable \b smpi/simulate-computation should be set to no. -Equivalently, setting \b smpi/cpu-threshold to -1 also ignores all -computation. \note This option just ignores the timings in your simulation; it still executes the computations itself. If you want to stop SMPI from doing that, - you should check the SMPI_SAMPLE macros, documented in the chapter + you should check the SMPI_SAMPLE macros, documented in the section \ref SMPI_adapting_speed. +Solution | Computations actually executed? | Computations simulated ? +---------------------------------- | ------------------------------- | ------------------------ +--cfg=smpi/simulate-computation:no | Yes | No, never +--cfg=smpi/cpu-threshold:42 | Yes, in all cases | Only if it lasts more than 42 seconds +SMPI_SAMPLE() macro | Only once per loop nest (see @ref SMPI_adapting_speed "documentation") | Always + \subsection options_model_smpi_adj_file smpi/comp-adjustment-file: Slow-down or speed-up parts of your code. This option allows you to pass a file that contains two columns: The first column diff --git a/doc/manpage/smpirun.1 b/doc/manpage/smpirun.1 index 08ab896a13..5e5726fa2c 100644 --- a/doc/manpage/smpirun.1 +++ b/doc/manpage/smpirun.1 @@ -76,6 +76,14 @@ You can change many simulation parameter on the command line by passing A full list of existing parameters and their meaning can be found at http://simgrid.gforge.inria.fr/simgrid/latest/doc/options.html +Here are some options commonly used with SMPI: +.TP +\fB--cfg=smpi/cpu-threshold:XXX\fR +Only simulate computation chunks that last more than XXX seconds. +.TP +\fB--cfg=smpi/simulate-computation:no\fR +Disable the simulation of all computation chunks (that are still executed on the host machine). + .SH AUTHORS The SimGrid team (simgrid-devel@lists.gforge.inria.fr) .SH COPYRIGHT AND LICENCE diff --git a/examples/smpi/energy/energy.tesh b/examples/smpi/energy/energy.tesh index ff2406830b..bf48442687 100644 --- a/examples/smpi/energy/energy.tesh +++ b/examples/smpi/energy/energy.tesh @@ -1,9 +1,9 @@ p Test smpi bindings for dvfs functions (C example) -$ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../platforms/energy_platform.xml --cfg=smpi/cpu-threshold:-1 ${bindir:=.}/smpi_energy --cfg=plugin:Energy --log=smpi_kernel.thres:warning +$ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../platforms/energy_platform.xml --cfg=smpi/simulate-computation:no ${bindir:=.}/smpi_energy --cfg=plugin:Energy --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'plugin' to 'Energy' > [0.000000] [rank 0] Pstates: 3; Powers: 100000000, 50000000, 20000000 > [0.000000] [rank 1] Pstates: 3; Powers: 100000000, 50000000, 20000000 diff --git a/examples/smpi/energy/f77/energy.tesh b/examples/smpi/energy/f77/energy.tesh index ee65341856..a6668aac82 100644 --- a/examples/smpi/energy/f77/energy.tesh +++ b/examples/smpi/energy/f77/energy.tesh @@ -1,10 +1,10 @@ p Test smpi bindings for dvfs functions (Fortran 77 example) -$ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../platforms/energy_platform.xml --cfg=smpi/cpu-threshold:-1 ${bindir:=.}/f77/sef --cfg=plugin:Energy --log=smpi_kernel.thres:warning +$ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../platforms/energy_platform.xml --cfg=smpi/simulate-computation:no ${bindir:=.}/f77/sef --cfg=plugin:Energy --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'plugin' to 'Energy' > [ 0.0000000000000000 ] [rank 0 ] 3 pstates available > [ 0.0000000000000000 ] [rank 1 ] 3 pstates available diff --git a/examples/smpi/energy/f90/energy.tesh b/examples/smpi/energy/f90/energy.tesh index 78c866405b..c66b898ad8 100644 --- a/examples/smpi/energy/f90/energy.tesh +++ b/examples/smpi/energy/f90/energy.tesh @@ -1,10 +1,10 @@ p Test smpi bindings for dvfs functions (Fortran 90 example) ! output sort 1 -$ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../platforms/energy_platform.xml --cfg=smpi/cpu-threshold:-1 ${bindir:=.}/f90/sef90 --cfg=plugin:Energy --log=smpi_kernel.thres:warning +$ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../../platforms/energy_platform.xml --cfg=smpi/simulate-computation:no ${bindir:=.}/f90/sef90 --cfg=plugin:Energy --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'plugin' to 'Energy' > [ 0.0000000000000000 ] [rank 0 ] 3 pstates available > [ 0.0000000000000000 ] [rank 1 ] 3 pstates available diff --git a/examples/smpi/replay/replay.tesh b/examples/smpi/replay/replay.tesh index 2948da8677..c6169b51fe 100644 --- a/examples/smpi/replay/replay.tesh +++ b/examples/smpi/replay/replay.tesh @@ -8,11 +8,11 @@ p Test of trace replay with SMPI (one trace for all processes) $ mkfile replay/one_trace ! timeout 60 -$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu-threshold:-1 -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning +$ ../../smpi_script/bin/smpirun -ext smpi_replay --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 ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [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 @@ -37,14 +37,14 @@ p The same with tracing activated < replay/actions_bcast.txt $ mkfile replay/one_trace -$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=no_loc --cfg=tracing:yes --cfg=tracing/smpi:yes --cfg=tracing/smpi/computing:yes --cfg=smpi/cpu-threshold:-1 -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning +$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=no_loc --cfg=tracing:yes --cfg=tracing/smpi:yes --cfg=tracing/smpi/computing:yes --cfg=smpi/simulate-computation:no -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi' to 'yes' > [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] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [Fafard:2:(3) 19.691622] [smpi_replay/INFO] Simulation time 19.691622 $ rm -f replay/one_trace @@ -226,11 +226,11 @@ p Another test of trace replay with SMPI (one trace per process) < replay/actions1.txt $ mkfile ./split_traces_tesh -$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu-threshold:-1 -np 2 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay ./split_traces_tesh --log=smpi_kernel.thres:warning +$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/simulate-computation:no -np 2 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay ./split_traces_tesh --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [Tremblay:0:(1) 0.164463] [smpi_replay/VERBOSE] 0 send 1 1e6 0.164463 > [Jupiter:1:(2) 0.164463] [smpi_replay/VERBOSE] 1 recv 0 1e6 0.164463 > [Jupiter:1:(2) 13.271310] [smpi_replay/VERBOSE] 1 compute 1e9 13.106847 @@ -248,11 +248,11 @@ p Test of barrier replay with SMPI (one trace for all processes) < replay/actions_barrier.txt $ mkfile replay/one_trace -$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu-threshold:-1 -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning +$ ../../smpi_script/bin/smpirun -ext smpi_replay --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 ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [Tremblay:0:(1) 1.491472] [smpi_replay/VERBOSE] 0 send 1 1e7 1.491472 > [Jupiter:1:(2) 1.491472] [smpi_replay/VERBOSE] 1 recv 0 1e7 1.491472 > [Tremblay:0:(1) 1.493448] [smpi_replay/VERBOSE] 0 barrier 0.001976 @@ -270,11 +270,11 @@ p Test of Isend replay with SMPI (one trace for all processes) < replay/actions_with_isend.txt $ mkfile replay/one_trace -$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu-threshold:-1 -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning +$ ../../smpi_script/bin/smpirun -ext smpi_replay --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 ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 Irecv 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.000100 @@ -301,11 +301,11 @@ p Test of Isend replay with SMPI (one trace for all processes) < replay/actions_allReduce.txt $ mkfile replay/one_trace -$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu-threshold:-1 -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning +$ ../../smpi_script/bin/smpirun -ext smpi_replay --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 ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [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 @@ -321,11 +321,11 @@ p Test of AllToAll replay with SMPI (one trace for all processes) < replay/actions_alltoall.txt $ mkfile replay/one_trace -$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu-threshold:-1 -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning +$ ../../smpi_script/bin/smpirun -ext smpi_replay --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 ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [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 @@ -340,11 +340,11 @@ p Test of AllToAllv replay with SMPI (one trace for all processes) < replay/actions_alltoallv.txt $ mkfile replay/one_trace -$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu-threshold:-1 -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning +$ ../../smpi_script/bin/smpirun -ext smpi_replay --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 ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [Tremblay:0:(1) 0.003999] [smpi_replay/VERBOSE] 0 allToAllV 100 1 40 30 1000 1 80 100 0.003999 > [Jupiter:1:(2) 0.006934] [smpi_replay/VERBOSE] 1 allToAllV 1000 80 1 40 1000 40 1 30 0.006934 > [Fafard:2:(3) 0.006936] [smpi_replay/VERBOSE] 2 allToAllV 1000 100 30 1 1000 30 40 1 0.006936 @@ -357,11 +357,11 @@ p Test of AllGatherv replay with SMPI (one trace for all processes) < replay/actions_allgatherv.txt $ mkfile replay/one_trace -$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu-threshold:-1 -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning +$ ../../smpi_script/bin/smpirun -ext smpi_replay --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 ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [Tremblay:0:(1) 0.882872] [smpi_replay/VERBOSE] 0 allGatherV 275427 275427 275427 275427 204020 0 0 0.882872 > [Fafard:2:(3) 1.300605] [smpi_replay/VERBOSE] 2 allGatherV 275427 275427 275427 275427 204020 0 0 1.300605 > [Jupiter:1:(2) 1.300605] [smpi_replay/VERBOSE] 1 allGatherV 275427 275427 275427 275427 204020 0 0 1.300605 @@ -375,11 +375,11 @@ p Test of waitall replay with SMPI (one trace for all processes) $ mkfile replay/one_trace ! output sort 19 -$ ../../smpi_script/bin/smpirun -ext smpi_replay --log=replay.thresh:critical --log=smpi_replay.thresh:verbose --log=no_loc --cfg=smpi/cpu-threshold:-1 -np 3 -platform ${srcdir:=.}/../platforms/small_platform.xml -hostfile ${srcdir:=.}/hostfile ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning +$ ../../smpi_script/bin/smpirun -ext smpi_replay --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 ./replay/smpi_replay replay/one_trace --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [Fafard:2:(3) 0.000000] [smpi_replay/VERBOSE] 2 Irecv 1 3000 0.000000 > [Fafard:2:(3) 0.000000] [smpi_replay/VERBOSE] 2 Isend 0 3000 0.000000 > [Jupiter:1:(2) 0.000000] [smpi_replay/VERBOSE] 1 Isend 0 2000 0.000000 diff --git a/examples/smpi/trace_simple/trace_simple.tesh b/examples/smpi/trace_simple/trace_simple.tesh index 251e7b1ac6..508b3086cb 100644 --- a/examples/smpi/trace_simple/trace_simple.tesh +++ b/examples/smpi/trace_simple/trace_simple.tesh @@ -39,7 +39,7 @@ $ ../../smpi_script/bin/smpirun -trace -trace-grouped -trace-file smpi_trace.tra > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/TCP-gamma' to '4194304' p Testing generation of viva configuration files -$ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-viva -trace-file smpi_trace.trace -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../platforms/small_platform.xml --cfg=path:${srcdir:=.}/../msg --cfg=smpi/cpu-threshold:-1 -np 3 ./trace_simple/smpi_trace_simple --log=smpi_kernel.thres:warning +$ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-viva -trace-file smpi_trace.trace -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../platforms/small_platform.xml --cfg=path:${srcdir:=.}/../msg --cfg=smpi/simulate-computation:no -np 3 ./trace_simple/smpi_trace_simple --log=smpi_kernel.thres:warning > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing' to 'yes' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'smpi_trace.trace' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/smpi' to 'yes' @@ -50,7 +50,7 @@ $ ../../smpi_script/bin/smpirun -trace -trace-resource -trace-viva -trace-file s > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [0.003952] [instr_config/INFO] No categories declared, ignoring generation of viva graph configuration p Testing with parameters but without activating them with the safe switch (-trace) diff --git a/src/smpi/smpi_global.cpp b/src/smpi/smpi_global.cpp index 2e95353a5e..0236f67606 100644 --- a/src/smpi/smpi_global.cpp +++ b/src/smpi/smpi_global.cpp @@ -436,6 +436,10 @@ static void smpi_check_options(){ "Use the option \"--cfg=smpi/running-power:\" to set its value." "Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information."); } + + xbt_assert(xbt_cfg_get_double("smpi/cpu-threshold") >=0, + "The 'smpi/cpu-threshold' option cannot have negative values [anymore]. If you want to discard " + "the simulation of any computation, please use 'smpi/simulate-computation:no' instead."); } int smpi_enabled() { diff --git a/teshsuite/smpi/bug-17132/bug-17132.tesh b/teshsuite/smpi/bug-17132/bug-17132.tesh index 7778ebcf2c..82fcbea742 100644 --- a/teshsuite/smpi/bug-17132/bug-17132.tesh +++ b/teshsuite/smpi/bug-17132/bug-17132.tesh @@ -1,7 +1,7 @@ -$ ${bindir:=.}/../../../bin/smpirun -np 16 -platform ../../../examples/platforms/small_platform.xml -hostfile ../hostfile ${bindir:=.}/bug-17132 --cfg=smpi/cpu-threshold:-1 --log=smpi_kernel.thres:warning +$ ${bindir:=.}/../../../bin/smpirun -np 16 -platform ../../../examples/platforms/small_platform.xml -hostfile ../hostfile ${bindir:=.}/bug-17132 --cfg=smpi/simulate-computation:no --log=smpi_kernel.thres:warning > You requested to use 16 processes, but there is only 5 processes in your hostfile... > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > Walltime = 0.468274 \ No newline at end of file diff --git a/teshsuite/smpi/coll-allreduce/coll-allreduce-automatic.tesh b/teshsuite/smpi/coll-allreduce/coll-allreduce-automatic.tesh index 96b1b3eb00..b34fd9bdf9 100644 --- a/teshsuite/smpi/coll-allreduce/coll-allreduce-automatic.tesh +++ b/teshsuite/smpi/coll-allreduce/coll-allreduce-automatic.tesh @@ -3,7 +3,7 @@ p Test allreduce ! output sort -$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ../../../examples/platforms/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error --cfg=smpi/allreduce:automatic --cfg=smpi/async-small-thresh:65536 --cfg=smpi/send-is-detached-thresh:128000 --cfg=smpi/cpu-threshold:-1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile_coll -platform ../../../examples/platforms/small_platform.xml -np 16 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce --log=smpi_kernel.thres:warning --log=smpi_coll.thres:error --cfg=smpi/allreduce:automatic --cfg=smpi/async-small-thresh:65536 --cfg=smpi/send-is-detached-thresh:128000 --cfg=smpi/simulate-computation:no "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [rank 0] -> Tremblay > [rank 1] -> Tremblay > [rank 2] -> Tremblay diff --git a/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh b/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh index b4d98eeb51..309b105e6d 100644 --- a/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh +++ b/teshsuite/smpi/pt2pt-pingpong/TI_output.tesh @@ -5,7 +5,7 @@ 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 -$ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt --cfg=smpi/cpu-threshold:-1 -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pt2pt-pingpong -q --log=smpi_kernel.thres:warning +$ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.txt --cfg=smpi/simulate-computation:no -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/pt2pt-pingpong -q --log=smpi_kernel.thres:warning > *** Ping-pong test (MPI_Send/MPI_Recv) *** > == pivot=0 : pingpong [0] <--> [1] > == pivot=1 : pingpong [1] <--> [2] @@ -19,7 +19,7 @@ $ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.t > [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.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [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] @@ -40,7 +40,7 @@ $ ${bindir:=.}/../../../bin/smpirun -trace-ti --cfg=tracing/filename:out_in_ti.t > [rank 2] -> Fafard > [rank 3] -> Ginette -$ ${bindir:=.}/../../../bin/smpirun -ext smpi_replay --log=replay.:critical -trace-ti --cfg=tracing/filename:out_ti.txt --cfg=smpi/cpu-threshold:-1 -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/../../../examples/smpi/replay/smpi_replay ./out_in_ti.txt --log=smpi_kernel.thres:warning +$ ${bindir:=.}/../../../bin/smpirun -ext smpi_replay --log=replay.:critical -trace-ti --cfg=tracing/filename:out_ti.txt --cfg=smpi/simulate-computation:no -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 4 ${bindir:=.}/../../../examples/smpi/replay/smpi_replay ./out_in_ti.txt --log=smpi_kernel.thres:warning > [rank 0] -> Tremblay > [rank 1] -> Jupiter > [rank 2] -> Fafard @@ -54,7 +54,7 @@ $ ${bindir:=.}/../../../bin/smpirun -ext smpi_replay --log=replay.:critical -tra > [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] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [Jupiter:1:(2) 0.016798] [smpi_replay/INFO] Simulation time 0.016798 ! output sort diff --git a/teshsuite/smpi/timers/timers.tesh b/teshsuite/smpi/timers/timers.tesh index e37f03ce62..8512a78eae 100644 --- a/teshsuite/smpi/timers/timers.tesh +++ b/teshsuite/smpi/timers/timers.tesh @@ -1,10 +1,10 @@ p Test timers ! setenv LD_LIBRARY_PATH=../../lib -$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 1 ${bindir:=.}/timers -q --log=smpi_kernel.thres:warning --cfg=smpi/cpu-threshold:-1 --cfg=smpi/running-power:100000 +$ ${bindir:=.}/../../../bin/smpirun -map -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 1 ${bindir:=.}/timers -q --log=smpi_kernel.thres:warning --cfg=smpi/simulate-computation:no --cfg=smpi/running-power:100000 > [rank 0] -> Tremblay > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/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 'smpi/cpu-threshold' to '-1' +> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running-power' to '100000' -- 2.20.1