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()
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.
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.
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
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,
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
- \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
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
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
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
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
#! ./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] ****************************************************
#! ./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 ****
$ 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
< 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
< 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
< 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
< 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
< 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
< 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
< 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
< 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
$ 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
$ ./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
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
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'
> [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
> [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'
> [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)
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");
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
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;
{
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;
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() {
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;
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;
}
/* 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());
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 */
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_);
}
}
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);
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);
}
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));
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;
}
}}
{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();
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_;
};
}
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;
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())
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();
, 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);
}
/*
}
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()) {
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() {
~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;
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;
};
/*********
{
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.
/* 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;
: 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.
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)
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;
};
-$ ${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
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
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()
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]
> [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]
> [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
> [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
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'