Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 29 Aug 2016 21:09:49 +0000 (23:09 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 29 Aug 2016 21:09:49 +0000 (23:09 +0200)
30 files changed:
ChangeLog
doc/doxygen/module-smpi.doc
doc/doxygen/options.doc
doc/manpage/smpirun.1
examples/smpi/energy/energy.tesh
examples/smpi/energy/f77/energy.tesh
examples/smpi/energy/f90/energy.tesh
examples/smpi/mc/non_deterministic.tesh
examples/smpi/mc/only_send_deterministic.tesh
examples/smpi/replay/replay.tesh
examples/smpi/replay_multiple/replay_multiple.tesh
examples/smpi/smpi_msg_masterslave/msg_smpi.tesh
examples/smpi/trace_call_location/trace_call_location.tesh
examples/smpi/trace_simple/trace_simple.tesh
src/simgrid/sg_config.cpp
src/smpi/private.h
src/smpi/smpi_bench.cpp
src/smpi/smpi_global.cpp
src/surf/HostImpl.cpp
src/surf/HostImpl.hpp
src/surf/plugins/energy.cpp
src/surf/virtual_machine.cpp
src/surf/virtual_machine.hpp
src/surf/vm_hl13.cpp
src/surf/vm_hl13.hpp
teshsuite/smpi/bug-17132/bug-17132.tesh
teshsuite/smpi/coll-allreduce/coll-allreduce-automatic.tesh
teshsuite/smpi/isp/umpire/CMakeLists.txt
teshsuite/smpi/pt2pt-pingpong/TI_output.tesh
teshsuite/smpi/timers/timers.tesh

index 1fb6ff5..1da1efa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,9 @@ 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
+   smpi/running-power    is renamed to smpi/host-speed
+
  Dropped functions and features
  * msg_mailbox_t and associated functions. Use s4u::Mailbox instead.
    - MSG_mailbox_is_empty() -> Mailbox::empty()
index 5fe713d..83c0469 100644 (file)
@@ -569,7 +569,7 @@ precious for that). Then, try to modify your model (of the platform,
 of the collective operations) to reduce the most preeminent differences.
 
 If the discrepancies come from the computing time, try adapting the \c
-smpi/running-power: reduce it if your simulation runs faster than in
+smpi/host-speed: reduce it if your simulation runs faster than in
 reality. If the error come from the communication, then you need to
 fiddle with your platform file.
 
index 22cfa38..5adc381 100644 (file)
@@ -723,8 +723,8 @@ say that if you have a large computation between a \c MPI_Recv() and a
 code, and create an execution task within the simulator to take this
 into account. For that, the actual duration is measured on the host
 machine and then scaled to the power of the corresponding simulated
-machine. The variable \b smpi/running-power allows to specify the
-computational power of the host machine (in flop/s) to use when
+machine. The variable \b smpi/host-speed allows to specify the
+computational speed of the host machine (in flop/s) to use when
 scaling the execution times. It defaults to 20000, but you really want
 to update it to get accurate simulation results.
 
@@ -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
@@ -1189,16 +1192,16 @@ silently overflow on other parts of the memory.
 - \c smpi/comp-adjustment-file: \ref options_model_smpi_adj_file
 - \c smpi/cpu-threshold: \ref options_smpi_bench
 - \c smpi/display-timing: \ref options_smpi_timing
-- \c smpi/lat-factor: \ref options_model_smpi_lat_factor
+- \c smpi/host-speed: \ref options_smpi_bench
 - \c smpi/IB-penalty-factors: \ref options_model_network_coefs
 - \c smpi/iprobe: \ref options_model_smpi_iprobe
 - \c smpi/init: \ref options_model_smpi_init
+- \c smpi/lat-factor: \ref options_model_smpi_lat_factor
 - \c smpi/ois: \ref options_model_smpi_ois
 - \c smpi/or: \ref options_model_smpi_or
 - \c smpi/os: \ref options_model_smpi_os
 - \c smpi/papi-events: \ref options_smpi_papi_events
 - \c smpi/privatize-global-variables: \ref options_smpi_global
-- \c smpi/running-power: \ref options_smpi_bench
 - \c smpi/send-is-detached-thresh: \ref options_model_smpi_detached
 - \c smpi/simulate-computation: \ref options_smpi_bench
 - \c smpi/test: \ref options_model_smpi_test
index 08ab896..5e5726f 100644 (file)
@@ -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
index ff24068..bf48442 100644 (file)
@@ -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
index ee65341..a6668aa 100644 (file)
@@ -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
index 78c8664..c66b898 100644 (file)
@@ -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
index e92676d..03a4db5 100644 (file)
@@ -1,7 +1,7 @@
 #! ./tesh
 
 ! timeout 60
-$ ../../../smpi_script/bin/smpirun -wrapper ${bindir:=.}/../../../bin/simgrid-mc -hostfile ${srcdir:=.}/hostfile_non_deterministic  -platform ${srcdir:=.}/../../platforms/cluster.xml --log=xbt_cfg.thresh:warning --cfg=model-check/communications_determinism:1 --cfg=smpi/send-is-detached-thresh:0 --cfg=smpi/running-power:1e9 ./smpi_non_deterministic
+$ ../../../smpi_script/bin/smpirun -wrapper ${bindir:=.}/../../../bin/simgrid-mc -hostfile ${srcdir:=.}/hostfile_non_deterministic  -platform ${srcdir:=.}/../../platforms/cluster.xml --log=xbt_cfg.thresh:warning --cfg=model-check/communications_determinism:1 --cfg=smpi/send-is-detached-thresh:0 --cfg=smpi/host-speed:1e9 ./smpi_non_deterministic
 > [0.000000] [mc_global/INFO] Check communication determinism
 > [0.000000] [mc_comm_determinism/INFO] The communications pattern of the process 1 is different! (Different communication : 1)
 > [0.000000] [mc_comm_determinism/INFO] ****************************************************
index e8d4a6a..99ea34b 100644 (file)
@@ -1,7 +1,7 @@
 #! ./tesh
 
 ! timeout 60
-$ ../../../smpi_script/bin/smpirun -wrapper "${bindir:=.}/../../../bin/simgrid-mc" --log=xbt_cfg.thresh:warning -hostfile ${srcdir:=.}/hostfile_only_send_deterministic  -platform ${srcdir:=.}/../../platforms/cluster.xml --cfg=model-check/communications_determinism:1 --cfg=smpi/send-is-detached-thresh:0 --cfg=smpi/running-power:1e9 ./smpi_only_send_deterministic
+$ ../../../smpi_script/bin/smpirun -wrapper "${bindir:=.}/../../../bin/simgrid-mc" --log=xbt_cfg.thresh:warning -hostfile ${srcdir:=.}/hostfile_only_send_deterministic  -platform ${srcdir:=.}/../../platforms/cluster.xml --cfg=model-check/communications_determinism:1 --cfg=smpi/send-is-detached-thresh:0 --cfg=smpi/host-speed:1e9 ./smpi_only_send_deterministic
 > [0.000000] [mc_comm_determinism/INFO] Check communication determinism
 > [0.000000] [mc_comm_determinism/INFO] ******************************************************
 > [0.000000] [mc_comm_determinism/INFO] **** Only-send-deterministic communication pattern ****
index 2948da8..c6169b5 100644 (file)
@@ -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
index 2ef20e5..3764346 100644 (file)
@@ -7,7 +7,7 @@ $ ${srcdir:=.}/generate_multiple_deployment.sh -platform ${srcdir:=.}/../../plat
 $ ./replay_multiple description_file ${srcdir:=.}/../../platforms/small_platform_with_routers.xml ${srcdir:=.}/deployment.xml --log=smpi.:info
 > [0.000000] [msg_test/INFO] Initializing instance 1 of size 32
 > [0.000000] [msg_test/INFO] Initializing instance 2 of size 32
-> [0.000000] [smpi_kernel/INFO] You did not set the power of the host running the simulation.  The timings will certainly not be accurate.  Use the option "--cfg=smpi/running-power:<flops>" to set its value.Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information.
+> [0.000000] [smpi_kernel/INFO] You did not set the power of the host running the simulation.  The timings will certainly not be accurate.  Use the option "--cfg=smpi/host-speed:<flops>" to set its value.Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information.
 > [Jupiter:2:(52) 1140688.493796] [smpi_replay/INFO] Simulation time 1124371.141124
 > [1140688.493796] [msg_test/INFO] Simulation time 1.14069e+06
 
index 104ea72..677c6f1 100644 (file)
@@ -1,6 +1,6 @@
 p Test the use of SMPI+MSG in the same file, as well as several different SMPI instances at the same time
 $ ./masterslave_mailbox_smpi ${srcdir:=.}/../../platforms/small_platform_with_routers.xml ${srcdir:=.}/deployment_masterslave_mailbox_smpi.xml --log=smpi.:info
-> [0.000000] [smpi_kernel/INFO] You did not set the power of the host running the simulation.  The timings will certainly not be accurate.  Use the option "--cfg=smpi/running-power:<flops>" to set its value.Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information.
+> [0.000000] [smpi_kernel/INFO] You did not set the power of the host running the simulation.  The timings will certainly not be accurate.  Use the option "--cfg=smpi/host-speed:<flops>" to set its value.Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information.
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Got 1 slaves and 20 tasks to process
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] Sending "Task_0" (of 20) to mailbox "slave-0"
 > [Ginette:master_mpi:(3) 0.000000] [msg_test/INFO] here for rank 0
index c759a78..4627957 100644 (file)
@@ -4,7 +4,7 @@
 
 p Test SMPI with call-location tracing. This means that the binary must have
 p already been compiled with the -trace-call-location switch.
-$ ../../smpi_script/bin/smpirun -trace -trace-file smpi_trace.trace -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../platforms/small_platform.xml --cfg=smpi/trace-call-location:1 -np 3 ${bindir:=.}/trace_call_location/smpi_trace_call_location --cfg=smpi/running-power:-1 --log=smpi_kernel.thres:warning 
+$ ../../smpi_script/bin/smpirun -trace -trace-file smpi_trace.trace -hostfile ${srcdir:=.}/hostfile -platform ${srcdir:=.}/../platforms/small_platform.xml --cfg=smpi/trace-call-location:1 -np 3 ${bindir:=.}/trace_call_location/smpi_trace_call_location --cfg=smpi/host-speed:-1 --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'
@@ -12,7 +12,7 @@ $ ../../smpi_script/bin/smpirun -trace -trace-file smpi_trace.trace -hostfile ${
 > [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/trace-call-location' to '1'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/running-power' to '-1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/host-speed' to '-1'
 
 $ grep --quiet "12 0.* 2 1 5 .*trace_call_location\.c\" 14$" ./smpi_trace.trace 
 
index 251e7b1..508b308 100644 (file)
@@ -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)
index 62693e8..3f973e3 100644 (file)
@@ -566,8 +566,9 @@ void sg_config_init(int *argc, char **argv)
     xbt_cfg_register_alias("smpi/IB-penalty-factors","smpi/IB_penalty_factors");
     
 #if HAVE_SMPI
-    xbt_cfg_register_double("smpi/running-power", 20000.0, nullptr, "Power of the host running the simulation (in flop/s). Used to bench the operations.");
-    xbt_cfg_register_alias("smpi/running-power","smpi/running_power");
+    xbt_cfg_register_double("smpi/host-speed", 20000.0, nullptr, "Speed of the host running the simulation (in flop/s). Used to bench the operations.");
+    xbt_cfg_register_alias("smpi/host-speed","smpi/running_power");
+    xbt_cfg_register_alias("smpi/host-speed","smpi/running-power");
 
     xbt_cfg_register_boolean("smpi/display-timing", "no", nullptr, "Whether we should display the timing after simulation.");
     xbt_cfg_register_alias("smpi/display-timing", "smpi/display_timing");
index 23fb524..913a3b8 100644 (file)
@@ -399,7 +399,7 @@ XBT_PRIVATE int smpi_type_keyval_create(MPI_Type_copy_attr_function* copy_fn, MP
 XBT_PRIVATE int smpi_type_keyval_free(int* keyval);
 // utilities
 extern XBT_PRIVATE double smpi_cpu_threshold;
-extern XBT_PRIVATE double smpi_running_power;
+extern XBT_PRIVATE double smpi_host_speed;
 extern XBT_PRIVATE bool smpi_privatize_global_variables;
 extern XBT_PRIVATE char* smpi_start_data_exe; //start of the data+bss segment of the executable
 extern XBT_PRIVATE int smpi_size_data_exe; //size of the data+bss segment of the executable
index a536790..2b0a99e 100644 (file)
@@ -80,7 +80,7 @@ xbt_dict_t samples = nullptr;         /* Allocated on first use */
 xbt_dict_t calls = nullptr;           /* Allocated on first use */
 
 double smpi_cpu_threshold;
-double smpi_running_power;
+double smpi_host_speed;
 
 int smpi_loaded_page = -1;
 char* smpi_start_data_exe = nullptr;
@@ -219,7 +219,7 @@ void smpi_execute(double duration)
 {
   if (duration >= smpi_cpu_threshold) {
     XBT_DEBUG("Sleep for %g to handle real computation time", duration);
-    double flops = duration * smpi_running_power;
+    double flops = duration * smpi_host_speed;
     int rank = smpi_process_index();
     instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
     extra->type=TRACING_COMPUTING;
index 2e95353..5429977 100644 (file)
@@ -430,12 +430,16 @@ static void smpi_check_options(){
 
    xbt_assert(xbt_cfg_get_int("smpi/async-small-thresh") <= xbt_cfg_get_int("smpi/send-is-detached-thresh"));
 
-   if (xbt_cfg_is_default_value("smpi/running-power")) {
+   if (xbt_cfg_is_default_value("smpi/host-speed")) {
      XBT_INFO("You did not set the power of the host running the simulation.  "
               "The timings will certainly not be accurate.  "
-              "Use the option \"--cfg=smpi/running-power:<flops>\" to set its value."
+              "Use the option \"--cfg=smpi/host-speed:<flops>\" 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() {
@@ -759,7 +763,7 @@ static void smpi_init_options(){
 
     smpi_coll_cleanup_callback=nullptr;
     smpi_cpu_threshold = xbt_cfg_get_double("smpi/cpu-threshold");
-    smpi_running_power = xbt_cfg_get_double("smpi/running-power");
+    smpi_host_speed = xbt_cfg_get_double("smpi/host-speed");
     smpi_privatize_global_variables = xbt_cfg_get_boolean("smpi/privatize-global-variables");
     if (smpi_cpu_threshold < 0)
       smpi_cpu_threshold = DBL_MAX;
index d4ae879..cb08a98 100644 (file)
@@ -33,7 +33,7 @@ HostImpl *HostModel::createHost(const char *name, kernel::routing::NetCard *netE
   xbt_dynar_t storageList = (xbt_dynar_t)xbt_lib_get_or_null(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL);
 
   HostImpl *host = new simgrid::surf::HostImpl(surf_host_model, name, storageList, cpu);
-  XBT_DEBUG("Create host %s with %ld mounted disks", name, xbt_dynar_length(host->p_storage));
+  XBT_DEBUG("Create host %s with %ld mounted disks", name, xbt_dynar_length(host->storage_));
   return host;
 }
 
@@ -46,7 +46,7 @@ void HostModel::adjustWeightOfDummyCpuActions()
   /* iterate for all virtual machines */
   for (VirtualMachine *ws_vm : VirtualMachine::allVms_) {
 
-    Cpu *cpu = ws_vm->p_cpu;
+    Cpu *cpu = ws_vm->cpu_;
 
     int is_active = lmm_constraint_used(cpu->getModel()->getMaxminSystem(), cpu->getConstraint());
 
@@ -115,20 +115,20 @@ Action *HostModel::executeParallelTask(int host_nb,
 HostImpl::HostImpl(simgrid::surf::HostModel *model, const char *name, xbt_dynar_t storage, Cpu *cpu)
  : Resource(model, name)
  , PropertyHolder(nullptr)
- , p_storage(storage), p_cpu(cpu)
+ , storage_(storage), cpu_(cpu)
 {
   if (!EXTENSION_ID.valid())
     EXTENSION_ID = simgrid::s4u::Host::extension_create<simgrid::surf::HostImpl>();
-  p_params.ramsize = 0;
+  params_.ramsize = 0;
 }
 
 HostImpl::HostImpl(simgrid::surf::HostModel *model, const char *name, lmm_constraint_t constraint,
                  xbt_dynar_t storage, Cpu *cpu)
  : Resource(model, name, constraint)
  , PropertyHolder(nullptr)
- , p_storage(storage), p_cpu(cpu)
+ , storage_(storage), cpu_(cpu)
 {
-  p_params.ramsize = 0;
+  params_.ramsize = 0;
 }
 
 /** @brief use destroy() instead of this destructor */
@@ -138,28 +138,28 @@ HostImpl::~HostImpl()
 
 void HostImpl::attach(simgrid::s4u::Host* host)
 {
-  if (piface != nullptr)
+  if (piface_ != nullptr)
     xbt_die("Already attached to host %s", host->name().c_str());
   host->extension_set(this);
-  piface = host;
+  piface_ = host;
 }
 
 bool HostImpl::isOn() const {
-  return p_cpu->isOn();
+  return cpu_->isOn();
 }
 bool HostImpl::isOff() const {
-  return p_cpu->isOff();
+  return cpu_->isOff();
 }
 void HostImpl::turnOn(){
   if (isOff()) {
-    p_cpu->turnOn();
-    simgrid::s4u::Host::onStateChange(*this->piface);
+    cpu_->turnOn();
+    simgrid::s4u::Host::onStateChange(*this->piface_);
   }
 }
 void HostImpl::turnOff(){
   if (isOn()) {
-    p_cpu->turnOff();
-    simgrid::s4u::Host::onStateChange(*this->piface);
+    cpu_->turnOff();
+    simgrid::s4u::Host::onStateChange(*this->piface_);
   }
 }
 
@@ -170,7 +170,7 @@ simgrid::surf::Storage *HostImpl::findStorageOnMountList(const char* mount)
   unsigned int cursor;
 
   XBT_DEBUG("Search for storage name '%s' on '%s'", mount, getName());
-  xbt_dynar_foreach(p_storage,cursor,mnt){
+  xbt_dynar_foreach(storage_,cursor,mnt){
     XBT_DEBUG("See '%s'",mnt.name);
     if(!strcmp(mount,mnt.name)){
       st = static_cast<simgrid::surf::Storage*>(mnt.storage);
@@ -189,7 +189,7 @@ xbt_dict_t HostImpl::getMountedStorageList()
   xbt_dict_t storage_list = xbt_dict_new_homogeneous(nullptr);
   char *storage_name = nullptr;
 
-  xbt_dynar_foreach(p_storage,i,mnt){
+  xbt_dynar_foreach(storage_,i,mnt){
     storage_name = (char *)static_cast<simgrid::surf::Storage*>(mnt.storage)->getName();
     xbt_dict_set(storage_list,mnt.name,storage_name,nullptr);
   }
@@ -224,7 +224,7 @@ Action *HostImpl::open(const char* fullpath) {
   char *mount_name = nullptr;
 
   XBT_DEBUG("Search for storage name for '%s' on '%s'", fullpath, getName());
-  xbt_dynar_foreach(p_storage,cursor,mnt)
+  xbt_dynar_foreach(storage_,cursor,mnt)
   {
     XBT_DEBUG("See '%s'",mnt.name);
     file_mount_name = (char *) xbt_malloc ((strlen(mnt.name)+1));
@@ -386,13 +386,13 @@ xbt_dynar_t HostImpl::getVms()
 
 void HostImpl::getParams(vm_params_t params)
 {
-  *params = p_params;
+  *params = params_;
 }
 
 void HostImpl::setParams(vm_params_t params)
 {
   /* may check something here. */
-  p_params = *params;
+  params_ = *params;
 }
 
 }}
index b02cb26..9307cd3 100644 (file)
@@ -226,9 +226,9 @@ public:
     {THROW_IMPOSSIBLE;} // FIXME: Host should not be a Resource
 
 public:
-  xbt_dynar_t p_storage;
-  Cpu *p_cpu;
-  simgrid::s4u::Host* piface = nullptr;
+  xbt_dynar_t storage_;
+  Cpu *cpu_;
+  simgrid::s4u::Host* piface_ = nullptr;
 
   /** @brief Get the list of virtual machines on the current Host */
   xbt_dynar_t getVms();
@@ -239,9 +239,9 @@ public:
   void getParams(vm_params_t params);
   /** @brief Sets the params of that VM/PM */
   void setParams(vm_params_t params);
-  simgrid::s4u::Host* getHost() { return piface; }
+  simgrid::s4u::Host* getHost() { return piface_; }
 private:
-  s_vm_params_t p_params;
+  s_vm_params_t params_;
 };
 
 }
index 5212967..0ec679a 100644 (file)
@@ -70,12 +70,12 @@ void HostEnergy::update()
   double start_time = this->last_updated;
   double finish_time = surf_get_clock();
   double cpu_load;
-  if (surf_host->p_cpu->speed_.peak <= 0)
+  if (surf_host->cpu_->speed_.peak <= 0)
     // Some users declare a pstate of speed 0 flops (e.g., to model boot time).
     // We consider that the machine is then fully loaded. That's arbitrary but it avoids a NaN
     cpu_load = 1;
   else
-    cpu_load = lmm_constraint_get_usage(surf_host->p_cpu->getConstraint()) / surf_host->p_cpu->speed_.peak;
+    cpu_load = lmm_constraint_get_usage(surf_host->cpu_->getConstraint()) / surf_host->cpu_->speed_.peak;
 
   if (cpu_load > 1) // A machine with a load > 1 consumes as much as a fully loaded machine, not mores
     cpu_load = 1;
@@ -94,7 +94,7 @@ void HostEnergy::update()
   this->last_updated = finish_time;
 
   XBT_DEBUG("[update_energy of %s] period=[%.2f-%.2f]; current power peak=%.0E flop/s; consumption change: %.2f J -> %.2f J",
-      surf_host->getName(), start_time, finish_time, surf_host->p_cpu->speed_.peak, previous_energy, energy_this_step);
+      surf_host->getName(), start_time, finish_time, surf_host->cpu_->speed_.peak, previous_energy, energy_this_step);
 }
 
 HostEnergy::HostEnergy(simgrid::s4u::Host *ptr) : host(ptr), last_updated(surf_get_clock())
@@ -210,7 +210,7 @@ static void onActionStateChange(simgrid::surf::CpuAction *action, simgrid::surf:
     if (vm) // If it's a VM, take the corresponding PM
       host = vm->getPm()->extension<simgrid::surf::HostImpl>();
 
-    HostEnergy *host_energy = host->piface->extension<HostEnergy>();
+    HostEnergy *host_energy = host->piface_->extension<HostEnergy>();
 
     if(host_energy->last_updated < surf_get_clock())
       host_energy->update();
index 1666df5..3b35bf3 100644 (file)
@@ -39,8 +39,8 @@ VirtualMachine::VirtualMachine(HostModel *model, const char *name, simgrid::s4u:
 , hostPM_(hostPM)
 {
   allVms_.push_back(this);
-  piface = simgrid::s4u::Host::by_name_or_create(name);
-  piface->extension_set<simgrid::surf::HostImpl>(this);
+  piface_ = simgrid::s4u::Host::by_name_or_create(name);
+  piface_->extension_set<simgrid::surf::HostImpl>(this);
 }
 
 /*
@@ -57,11 +57,11 @@ VirtualMachine::~VirtualMachine()
 }
 
 e_surf_vm_state_t VirtualMachine::getState() {
-  return p_vm_state;
+  return vmState_;
 }
 
 void VirtualMachine::setState(e_surf_vm_state_t state) {
-  p_vm_state = state;
+  vmState_ = state;
 }
 void VirtualMachine::turnOn() {
   if (isOff()) {
@@ -75,6 +75,35 @@ void VirtualMachine::turnOff() {
     onVmStateChange(this);
   }
 }
+void VirtualMachine::suspend()
+{
+  action_->suspend();
+  vmState_ = SURF_VM_STATE_SUSPENDED;
+}
+
+void VirtualMachine::resume()
+{
+  action_->resume();
+  vmState_ = SURF_VM_STATE_RUNNING;
+}
+
+void VirtualMachine::save()
+{
+  vmState_ = SURF_VM_STATE_SAVING;
+
+  /* FIXME: do something here */
+  action_->suspend();
+  vmState_ = SURF_VM_STATE_SAVED;
+}
+
+void VirtualMachine::restore()
+{
+  vmState_ = SURF_VM_STATE_RESTORING;
+
+  /* FIXME: do something here */
+  action_->resume();
+  vmState_ = SURF_VM_STATE_RUNNING;
+}
 
 /** @brief returns the physical machine on which the VM is running **/
 sg_host_t VirtualMachine::getPm() {
index d75e480..b14a744 100644 (file)
@@ -60,16 +60,16 @@ public:
   ~VirtualMachine();
 
   /** @brief Suspend the VM */
-  virtual void suspend()=0;
+  virtual void suspend();
 
   /** @brief Resume the VM */
-  virtual void resume()=0;
+  virtual void resume();
 
   /** @brief Save the VM (Not yet implemented) */
-  virtual void save()=0;
+  virtual void save();
 
   /** @brief Restore the VM (Not yet implemented) */
-  virtual void restore()=0;
+  virtual void restore();
 
   /** @brief Migrate the VM to the destination host */
   virtual void migrate(sg_host_t dest_PM)=0;
@@ -93,7 +93,7 @@ public:
   static std::deque<VirtualMachine*> allVms_;
 
 protected:
-  e_surf_vm_state_t p_vm_state = SURF_VM_STATE_CREATED;
+  e_surf_vm_state_t vmState_ = SURF_VM_STATE_CREATED;
 };
 
 /*********
index 9dd72aa..41b183d 100644 (file)
@@ -32,7 +32,7 @@ s4u::Host *VMHL13Model::createVM(const char *name, sg_host_t host_PM)
 {
   VirtualMachine* vm = new VMHL13(this, name, host_PM);
   onVmCreation(vm);
-  return vm->piface;
+  return vm->piface_;
 }
 
 /* In the real world, processes on the guest operating system will be somewhat degraded due to virtualization overhead.
@@ -68,7 +68,7 @@ double VMHL13Model::next_occuring_event(double now)
 
   /* iterate for all virtual machines */
   for (VirtualMachine *ws_vm : VirtualMachine::allVms_) {
-    Cpu *cpu = ws_vm->p_cpu;
+    Cpu *cpu = ws_vm->cpu_;
     xbt_assert(cpu, "cpu-less host");
 
     double solved_value = ws_vm->action_->getVariable()->value;
@@ -95,7 +95,7 @@ VMHL13::VMHL13(VMModel *model, const char* name, sg_host_t host_PM)
  : VirtualMachine(model, name, host_PM)
 {
   /* Currently, we assume a VM has no storage. */
-  p_storage = nullptr;
+  storage_ = nullptr;
 
   /* Currently, a VM uses the network resource of its physical host. In
    * host_lib, this network resource object is referred from two different keys.
@@ -106,56 +106,27 @@ VMHL13::VMHL13(VMModel *model, const char* name, sg_host_t host_PM)
   sg_host_t host_VM = simgrid::s4u::Host::by_name_or_create(name);
   host_VM->pimpl_netcard = host_PM->pimpl_netcard;
 
-  p_vm_state = SURF_VM_STATE_CREATED;
+  vmState_ = SURF_VM_STATE_CREATED;
 
   // //// CPU  RELATED STUFF ////
   // Roughly, create a vcpu resource by using the values of the sub_cpu one.
-  CpuCas01 *sub_cpu = static_cast<CpuCas01*>(host_PM->pimpl_cpu);
+  CpuCas01 *sub_cpu = dynamic_cast<CpuCas01*>(host_PM->pimpl_cpu);
 
-  p_cpu = surf_cpu_model_vm->createCpu(host_VM, // the machine hosting the VM
+  cpu_ = surf_cpu_model_vm->createCpu(host_VM, // the machine hosting the VM
       sub_cpu->getSpeedPeakList(), 1 /*cores*/);
   if (sub_cpu->getPState() != 0)
-    p_cpu->setPState(sub_cpu->getPState());
+    cpu_->setPState(sub_cpu->getPState());
 
   /* We create cpu_action corresponding to a VM process on the host operating system. */
   /* FIXME: TODO: we have to periodically input GUESTOS_NOISE to the system? how ? */
   action_ = sub_cpu->execution_start(0);
 
-  XBT_VERB("Create VM(%s)@PM(%s) with %ld mounted disks", name, hostPM_->name().c_str(), xbt_dynar_length(p_storage));
+  XBT_VERB("Create VM(%s)@PM(%s) with %ld mounted disks", name, hostPM_->name().c_str(), xbt_dynar_length(storage_));
 }
 VMHL13::~VMHL13() {
-  delete p_cpu;
+  delete cpu_;
 }
 
-void VMHL13::suspend()
-{
-  action_->suspend();
-  p_vm_state = SURF_VM_STATE_SUSPENDED;
-}
-
-void VMHL13::resume()
-{
-  action_->resume();
-  p_vm_state = SURF_VM_STATE_RUNNING;
-}
-
-void VMHL13::save()
-{
-  p_vm_state = SURF_VM_STATE_SAVING;
-
-  /* FIXME: do something here */
-  action_->suspend();
-  p_vm_state = SURF_VM_STATE_SAVED;
-}
-
-void VMHL13::restore()
-{
-  p_vm_state = SURF_VM_STATE_RESTORING;
-
-  /* FIXME: do something here */
-  action_->resume();
-  p_vm_state = SURF_VM_STATE_RUNNING;
-}
 
 /* Update the physical host of the given VM */
 void VMHL13::migrate(sg_host_t host_dest)
index 54642d3..e50883a 100644 (file)
@@ -48,14 +48,7 @@ public:
   VMHL13(VMModel *model, const char* name, sg_host_t host_PM);
   ~VMHL13();
 
-  void suspend() override;
-  void resume() override;
-
-  void save() override;
-  void restore() override;
-
   void migrate(sg_host_t ind_dst_pm) override;
-
   void setBound(double bound) override;
 };
 
index 7778ebc..82fcbea 100644 (file)
@@ -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
index 96b1b3e..b34fd9b 100644 (file)
@@ -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
index 2173c46..3eda492 100644 (file)
@@ -218,14 +218,14 @@ if(enable_smpi AND enable_model-checking AND enable_smpi_ISP_testsuite)
   foreach (test ${umpire_tests_passing})
     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! timeout 30")
     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! output display" APPEND)
-    write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "\$ \${bindir:=.}/../../../../bin/smpirun -wrapper \"\${bindir:=.}/../../../../bin/simgrid-mc\" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=smpi/running-power:1e9 --cfg=smpi/coll_selector:mpich \${bindir:=.}/${test} --log=smpi_coll.thresh:error" APPEND)
+    write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "\$ \${bindir:=.}/../../../../bin/smpirun -wrapper \"\${bindir:=.}/../../../../bin/simgrid-mc\" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=smpi/host-speed:1e9 --cfg=smpi/coll_selector:mpich \${bindir:=.}/${test} --log=smpi_coll.thresh:error" APPEND)
   endforeach()
 
   foreach (test ${umpire_tests_deadlock} ${umpire_tests_problematic} )
     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! timeout 30"     )
     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! expect return 3" APPEND)
     write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! output display"  APPEND)
-    write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "\$ \${bindir:=.}/../../../../bin/smpirun -wrapper \"\${bindir:=.}/../../../../bin/simgrid-mc\" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=smpi/running-power:1e9 --cfg=smpi/coll_selector:mpich \${bindir:=.}/${test} --log=smpi_coll.thresh:error" APPEND)
+    write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "\$ \${bindir:=.}/../../../../bin/smpirun -wrapper \"\${bindir:=.}/../../../../bin/simgrid-mc\" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=smpi/host-speed:1e9 --cfg=smpi/coll_selector:mpich \${bindir:=.}/${test} --log=smpi_coll.thresh:error" APPEND)
   endforeach()
 endif()
 
index b4d98ee..309b105 100644 (file)
@@ -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
index e37f03c..4d8b3e1 100644 (file)
@@ -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/host-speed: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/running-power' to '100000'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to 'no'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/host-speed' to '100000'