Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
switch to infty buffering for now as some tests are broken in zero-buffering mode
[simgrid.git] / docs / source / Configuring_SimGrid.rst
index 27cb2c6..5c296c5 100644 (file)
@@ -140,6 +140,7 @@ Existing Configuration Items
 
 - **For collective operations of SMPI,** please refer to Section :ref:`cfg=smpi/coll-selector`
 - **smpi/async-small-thresh:** :ref:`cfg=smpi/async-small-thresh`
+- **smpi/buffering:** :ref:`cfg=smpi/buffering`
 - **smpi/bw-factor:** :ref:`cfg=smpi/bw-factor`
 - **smpi/coll-selector:** :ref:`cfg=smpi/coll-selector`
 - **smpi/comp-adjustment-file:** :ref:`cfg=smpi/comp-adjustment-file`
@@ -411,8 +412,8 @@ receiving mode of the mailbox with a call to
 this mailbox will have this behavior regardless of the message size.
 
 This value needs to be smaller than or equals to the threshold set at
-@ref options_model_smpi_detached , because asynchronous messages are
-meant to be detached as well.
+:ref:`cfg=smpi/send-is-detached-thresh`, because asynchronous messages
+are meant to be detached as well.
 
 .. _options_pls:
 
@@ -484,6 +485,32 @@ be executed using the simgrid-mc wrapper:
 Safety properties are expressed as assertions using the function
 :cpp:func:`void MC_assert(int prop)`.
 
+.. _cfg=smpi/buffering:
+
+Specifying the MPI buffering behavior
+.....................................
+
+**Option** ``smpi/buffering`` **Default:** infty
+
+Buffering in MPI has a huge impact on the communication semantic. For example,
+standard blocking sends are synchronous calls when the system buffers are full
+while these calls can complete immediately without even requiring a matching
+receive call for small messages sent when the system buffers are empty.
+
+In SMPI, this depends on the message size, that is compared against two thresholds:
+
+- if (size < :ref:`smpi/async-small-thresh <cfg=smpi/async-small-thresh>`) then
+  MPI_Send returns immediately, even if the corresponding receive has not be issued yet.
+- if (:ref:`smpi/async-small-thresh <cfg=smpi/async-small-thresh>` < size < :ref:`smpi/send-is-detached-thresh <cfg=smpi/send-is-detached-thresh>`) then
+  MPI_Send returns as soon as the corresponding receive has been issued. This is known as the eager mode.
+- 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:
+
+- **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.
+
 .. _cfg=model-check/property:
 
 Specifying a liveness property
@@ -661,10 +688,20 @@ generates an identifier for this path. Here is an example of output:
    [  0.000000] (0:@) Executed transitions = 46
 
 The interesting line is ``Path = 1/3;1/4``, which means that you should use
-`--cfg=model-check/replay:1/3;1/4`` to replay your application on the buggy
-execution path. The other options should be the same (but the model-checker
-should be disabled). Note that format and meaning of the path may change between
-different releases.
+``--cfg=model-check/replay:1/3;1/4`` to replay your application on the buggy
+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``.
+
+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
+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.
 
 Configuring the User Code Virtualization
 ----------------------------------------
@@ -1150,7 +1187,7 @@ Simulating MPI detached send
 
 This threshold specifies the size in bytes under which the send will
 return immediately. This is different from the threshold detailed in
-:ref:`options_model_network_asyncsend` because the message is not
+:ref:`cfg=smpi/async-small-thresh` because the message is not
 effectively sent when the send is posted. SMPI still waits for the
 correspondant receive to be posted to perform the communication
 operation.