.. raw:: html
- <object id="TOC" data="graphical-toc.svg" width="100%" type="image/svg+xml"></object>
+ <object id="TOC" data="graphical-toc.svg" type="image/svg+xml"></object>
<script>
window.onload=function() { // Wait for the SVG to be loaded before changing it
var elem=document.querySelector("#TOC").contentDocument.getElementById("ConfigBox")
Several ``--cfg`` command line arguments can naturally be used. If you
need to include spaces in the argument, don't forget to quote the
-argument. You can even escape the included quotes (write @' for ' if
-you have your argument between ').
+argument. You can even escape the included quotes (write ``@'`` for ``'`` if
+you have your argument between simple quotes).
Another solution is to use the ``<config>`` tag in the platform file. The
only restriction is that this tag must occur before the first
int main(int argc, char *argv[]) {
simgrid::s4u::Engine e(&argc, argv);
- e->set_config("Item:Value");
+ simgrid::s4u::Engine::set_config("Item:Value");
// Rest of your code
}
- **contexts/factory:** :ref:`cfg=contexts/factory`
- **contexts/guard-size:** :ref:`cfg=contexts/guard-size`
- **contexts/nthreads:** :ref:`cfg=contexts/nthreads`
-- **contexts/parallel-threshold:** :ref:`cfg=contexts/parallel-threshold`
- **contexts/stack-size:** :ref:`cfg=contexts/stack-size`
- **contexts/synchro:** :ref:`cfg=contexts/synchro`
- **network/bandwidth-factor:** :ref:`cfg=network/bandwidth-factor`
- **network/crosstraffic:** :ref:`cfg=network/crosstraffic`
- **network/latency-factor:** :ref:`cfg=network/latency-factor`
+- **network/loopback-lat:** :ref:`cfg=network/loopback`
+- **network/loopback-bw:** :ref:`cfg=network/loopback`
- **network/maxmin-selective-update:** :ref:`Network Optimization Level <options_model_optim>`
- **network/model:** :ref:`options_model_select`
- **network/optim:** :ref:`Network Optimization Level <options_model_optim>`
- ``cpu/model``: specify the used CPU model. We have only one model
for now:
- - **Cas01:** Simplistic CPU model (time=size/power)
+ - **Cas01:** Simplistic CPU model (time=size/speed)
- ``host/model``: The host concept is the aggregation of a CPU with a
network card. Three models exists, but actually, only 2 of them are
Note that with the default host model this option is activated by default.
+.. _cfg=network/loopback:
+
+Configuring loopback link
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Several network model provide an implicit loopback link to account for local
+communication on a host. By default it has a 10GBps bandwidth and a null latency.
+This can be changed with ``network/loopback-lat`` and ``network/loopback-bw``
+items.
+
.. _cfg=smpi/async-small-thresh:
Simulating Asynchronous Send
(this configuration item is experimental and may change or disappear)
-It is possible to specify that messages below a certain size will be
+It is possible to specify that messages below a certain size (in bytes) will be
sent as soon as the call to MPI_Send is issued, without waiting for
-the correspondant receive. This threshold can be configured through
+the correspondent receive. This threshold can be configured through
the ``smpi/async-small-thresh`` item. The default value is 0. This
behavior can also be manually set for mailboxes, by setting the
receiving mode of the mailbox with a call to
.. _cfg=storage/max_file_descriptors:
-File Descriptor Cound per Host
+File Descriptor Count per Host
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Option** ``storage/max_file_descriptors`` **Default:** 1024
the host energy plugin by adding ``--cfg=plugin:host_energy`` to your
command line.
-Here is the full list of plugins that can be activated this way:
+Here is a partial list of plugins that can be activated this way. You can get
+the full list by passing ``--cfg=plugin:help`` to your simulator.
- - **host_energy:** keeps track of the energy dissipated by
- computations. More details in @ref plugin_energy.
- - **link_energy:** keeps track of the energy dissipated by
- communications. More details in @ref SURF_plugin_energy.
- - **host_load:** keeps track of the computational load.
- More details in @ref plugin_load.
+ - :ref:`Host Energy <plugin_host_energy>`: models the energy dissipation of the compute units.
+ - :ref:`Link Energy <plugin_link_energy>`: models the energy dissipation of the network.
+ - :ref:`Host Load <plugin_host_load>`: monitors the load of the compute units.
.. _options_modelchecking:
- if (:ref:`smpi/send-is-detached-thresh <cfg=smpi/send-is-detached-thresh>` < size) then
MPI_Send returns only when the message has actually been sent over the network. This is known as the rendez-vous mode.
-The ``smpi/buffering`` option gives an easier interface to choose between these semantics. It can take two values:
+The ``smpi/buffering`` (only valid with MC) option gives an easier interface to choose between these semantics. It can take two values:
-- **zero:** means that buffering should be disabled. Blocking communications are actually blocking.
-- **infty:** means that buffering should be made infinite. Blocking communications are non-blocking.
+- **zero:** means that buffering should be disabled. All communications are actually blocking.
+- **infty:** means that buffering should be made infinite. All communications are non-blocking.
.. _cfg=model-check/property:
If you want to specify liveness properties, you have to pass them on
the command line, specifying the name of the file containing the
-property, as formatted by the ltl2ba program. Note that ltl2ba is not
-part of SimGrid and must be installed separatly.
+property, as formatted by the `ltl2ba <https://github.com/utwente-fmt/ltl2ba>`_ program.
+Note that ltl2ba is not part of SimGrid and must be installed separately.
.. code-block:: shell
Note that this feature may break the current implementation of the
DPOR reduction technique.
-The ``model-check/visited`` item is the maximum number of states,, which
+The ``model-check/visited`` item is the maximum number of states, which
are stored in memory. If the maximum number of snapshotted state is
reached, some states will be removed from the memory and some cycles
might be missed. Small values can lead to incorrect verifications, but
communication determinism mode of the model checker, which checks
determinism properties of the communications of an application.
+.. _options_mc_perf:
+
Verification Performance Considerations
.......................................
consumption when using model-checking. By default, each snapshot will
save a copy of the whole stacks and not only of the part that is
really meaningful: you should expect the contribution of the memory
-consumption of the snapshots to be @f$ @mbox{number of processes}
-@times @mbox{stack size} @times @mbox{number of states} @f$.
+consumption of the snapshots to be:
+:math:`\text{number of processes} \times \text{stack size} \times \text{number of states}`.
When compiled against the model checker, the stacks are not
protected with guards: if the stack size is too small for your
execution path. All options (but the model checker related ones) must
remain the same. In particular, if you ran your application with
``smpirun -wrapper simgrid-mc``, then do it again. Remove all
-MC-related options, keep the other ones and add
-``--cfg=model-check/replay``.
+MC-related options, keep non-MC-related ones and add
+``--cfg=model-check/replay:???``.
Currently, if the path is of the form ``X;Y;Z``, each number denotes
the actor's pid that is selected at each indecision point. If it's of
the form ``X/a;Y/b``, the X and Y are the selected pids while the a
-and b are the return values of their simcalls. In the previouse
+and b are the return values of their simcalls. In the previous
example, ``1/3;1/4``, you can see from the full output that the actor
1 is doing MC_RANDOM simcalls, so the 3 and 4 simply denote the values
that these simcall return.
If you want to push the scalability limits of your code, you might
want to reduce the ``contexts/stack-size`` item. Its default value is
8192 (in KiB), while our Chord simulation works with stacks as small
-as 16 KiB, for example. This *setting is ignored* when using the
-thread factory. Instead, you should compile SimGrid and your
-application with ``-fsplit-stack``. Note that this compilation flag is
-not compatible with the model checker right now.
+as 16 KiB, for example. You can ensure that some actors have a specific
+size by simply changing the value of this configuration item before
+creating these actors. The :cpp:func:`simgrid::s4u::Engine::set_config`
+functions are handy for that.
+
+This *setting is ignored* when using the thread factory (because there
+is no way to modify the stack size with C++ system threads). Instead,
+you should compile SimGrid and your application with
+``-fsplit-stack``. Note that this compilation flag is not compatible
+with the model checker right now.
The operating system should only allocate memory for the pages of the
stack which are actually used and you might not need to use this in
application.
.. _cfg=contexts/nthreads:
-.. _cfg=contexts/parallel-threshold:
.. _cfg=contexts/synchro:
Running User Code in Parallel
of cores that you have in your computer (or lower than 1 to have the
amount of cores auto-detected).
-Even if you asked several worker threads using the previous option,
-you can request to start the parallel execution (and pay the
-associated synchronization costs) only if the potential parallelism is
-large enough. For that, set the ``contexts/parallel-threshold``
-item to the minimal amount of user contexts needed to start the
-parallel execution. In any given simulation round, if that amount is
-not reached, the contexts will be run sequentially directly by the
-main thread (thus saving the synchronization costs). Note that this
-option is mainly useful when the grain of the user code is very fine,
-because our synchronization is now very efficient.
-
When parallel execution is activated, you can choose the
synchronization schema used with the ``contexts/synchro`` item,
which value is either:
.. code-block:: shell
- --cfg=tracing:yes --cfg=tracing/uncategorized:yes --cfg=triva/uncategorized:uncat.plist
+ --cfg=tracing:yes --cfg=tracing/uncategorized:yes
- The first parameter activates the tracing subsystem, the second
+ The first parameter activates the tracing subsystem, and the second
tells it to trace host and link utilization (without any
- categorization) and the third creates a graph configuration file to
- configure Triva when analysing the resulting trace file.
+ categorization).
- MSG or SimDag-based simulator and categorized traces (you need to
declare categories and classify your tasks according to them)
.. code-block:: shell
- --cfg=tracing:yes --cfg=tracing/categorized:yes --cfg=triva/categorized:cat.plist
+ --cfg=tracing:yes --cfg=tracing/categorized:yes
- The first parameter activates the tracing subsystem, the second
- tells it to trace host and link categorized utilization and the
- third creates a graph configuration file to configure Triva when
- analysing the resulting trace file.
+ The first parameter activates the tracing subsystem, and the second
+ tells it to trace host and link categorized utilization.
- SMPI simulator and traces for a space/time view:
this 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 ``smpi/host-speed`` allows one 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 adjust it to get accurate simulation results.
+simulated machine. The variable ``smpi/host-speed`` allows one to
+specify the computational speed of the host machine (in flop/s by
+default) to use when scaling the execution times.
+
+The default value is ``smpi/host-speed=20kf`` (= 20,000 flop/s). This
+is probably underestimated for most machines, leading SimGrid to
+overestimate the amount of flops in the execution blocks that are
+automatically injected in the simulator. As a result, the execution
+time of the whole application will probably be overestimated until you
+use a realistic value.
When the code consists of numerous consecutive MPI calls, the
previous mechanism feeds the simulation kernel with numerous tiny
to **no**. 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
-Section :ref:`SMPI_adapting_speed`.
+Section :ref:`SMPI_use_faster`.
+------------------------------------+-------------------------+-----------------------------+
| Solution | Computations executed? | Computations simulated? |
message sizes, as protocols may adapt to different message sizes. With
this option, a series of message sizes and factors are given, helping
the simulation to be more realistic. For instance, the current default
-value means that messages with size 65472 and more will get a total of
+value means that messages with size 65472 bytes and more will get a total of
MAX_BANDWIDTH*0.940694, messages of size 15424 to 65471 will get
MAX_BANDWIDTH*0.697866, and so on (where MAX_BANDWIDTH denotes the
bandwidth of the link).
so this example contains two sections. Furthermore, each section
consists of three values.
-1. The first value denotes the minimum size for this section to take effect;
+1. The first value denotes the minimum size in bytes for this section to take effect;
read it as "if message size is greater than this value (and other section has a larger
first value that is also smaller than the message size), use this".
In the first section above, this value is "1".
With the ``global`` algorithm, each call to SMPI_SHARED_MALLOC()
returns a new address, but it only points to a shadow block: its memory
-area is mapped on a 1MB file on disk. If the returned block is of size
-N MB, then the same file is mapped N times to cover the whole bloc.
+area is mapped on a 1 MiB file on disk. If the returned block is of size
+N MiB, then the same file is mapped N times to cover the whole block.
At the end, no matter how many times you call SMPI_SHARED_MALLOC, this will
-only consume 1 MB in memory.
+only consume 1 MiB in memory.
You can disable this behavior and come back to regular mallocs (for
-example for debugging purposes) using @c "no" as a value.
+example for debugging purposes) using ``no`` as a value.
If you want to keep private some parts of the buffer, for instance if these
parts are used by the application logic and should not be corrupted, you
When smpi/shared-malloc:global is used, the memory consumption problem
is solved, but it may induce too much load on the kernel's pages table.
In this case, you should use huge pages so that the kernel creates only one
-entry per MB of malloced data instead of one entry per 4 KB.
+entry per MB of malloced data instead of one entry per 4 kB.
To activate this, you must mount a hugetlbfs on your system and allocate
at least one huge page: