Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mv examples/s4u examples/cpp
[simgrid.git] / docs / source / Tutorial_Algorithms.rst
index cbb9a8c72c359bb9cf4ccae4fa501fba1feac3b2..d7b44c45f56b1814db103afe6deb6a62e28bfe34 100644 (file)
@@ -111,7 +111,7 @@ as a replacement to printf() or to cout to ensure that the messages
 are nicely logged along with the simulated time and actor name.
 
 
-.. literalinclude:: ../../examples/s4u/app-masterworkers/s4u-app-masterworkers-fun.cpp
+.. literalinclude:: ../../examples/cpp/app-masterworkers/s4u-app-masterworkers-fun.cpp
    :language: c++
    :start-after: master-begin
    :end-before: master-end
@@ -127,7 +127,7 @@ The worker retrieves its own host with
 :ref:`simgrid::s4u::this_actor <API_s4u_this_actor>`
 namespace contains many such helping functions.
 
-.. literalinclude:: ../../examples/s4u/app-masterworkers/s4u-app-masterworkers-fun.cpp
+.. literalinclude:: ../../examples/cpp/app-masterworkers/s4u-app-masterworkers-fun.cpp
    :language: c++
    :start-after: worker-begin
    :end-before: worker-end
@@ -146,7 +146,7 @@ functions to the engine (on lines 7 and 8), load the simulated platform
 from its description file (on line 11), map actors onto that platform
 (on line 12) and run the simulation until its completion on line 15.
 
-.. literalinclude:: ../../examples/s4u/app-masterworkers/s4u-app-masterworkers-fun.cpp
+.. literalinclude:: ../../examples/cpp/app-masterworkers/s4u-app-masterworkers-fun.cpp
    :language: c++
    :start-after: main-begin
    :end-before: main-end
@@ -192,7 +192,7 @@ Deployment files specify the execution scenario: it lists the actors
 that should be started, along with their parameter. In the following
 example, we start 6 actors: one master and 5 workers.
 
-.. literalinclude:: ../../examples/s4u/app-masterworkers/s4u-app-masterworkers_d.xml
+.. literalinclude:: ../../examples/cpp/app-masterworkers/s4u-app-masterworkers_d.xml
    :language: xml
 
 Execution Example
@@ -204,13 +204,23 @@ informative messages.
 
 .. "WARNING: Over dedent has detected" is expected here as we remove the $ marker this way
 
-.. literalinclude:: ../../examples/s4u/app-masterworkers/s4u-app-masterworkers.tesh
+.. literalinclude:: ../../examples/cpp/app-masterworkers/s4u-app-masterworkers.tesh
    :language: shell
    :start-after: s4u-app-masterworkers-fun
    :prepend: $$$ ./masterworkers platform.xml deploy.xml
    :append: $$$
    :dedent: 2
 
+Each example included in the SimGrid distribution comes with a `tesh`
+file that presents how to start the example once compiled, along with
+the expected output. These files are used for the automatic testing of
+the framework, but can be used to see the examples' output without
+compiling them. See e.g. the file
+`examples/cpp/app-masterworkers/s4u-app-masterworkers.tesh <https://framagit.org/simgrid/simgrid/-/blob/master/examples/cpp/app-masterworkers/s4u-app-masterworkers.tesh>`_.
+Lines starting with `$` are the commands to execute;
+lines starting with `>` are the expected output of each command while
+lines starting with `!` are configuration items for the test runner.
+
 
 Improve it Yourself
 -------------------
@@ -403,7 +413,7 @@ is a better way to visualize SimGrid traces (see below).
 
 .. code-block:: shell
 
-   ./master-workers small_platform.xml master-workers_d.xml --cfg=tracing:yes --cfg=tracing/msg/process:yes
+   ./master-workers small_platform.xml master-workers_d.xml --cfg=tracing:yes --cfg=tracing/actor:yes
    vite simgrid.trace
 
 .. image:: /tuto_s4u/img/vite-screenshot.png
@@ -416,7 +426,7 @@ and use it as follows:
 
 .. code-block:: shell
 
-   ./master-workers small_platform.xml master-workers_d.xml --cfg=tracing:yes --cfg=tracing/msg/process:yes
+   ./master-workers small_platform.xml master-workers_d.xml --cfg=tracing:yes --cfg=tracing/actor:yes
    Rscript draw_gantt.R simgrid.trace
 
 It produces a ``Rplots.pdf`` with the following content:
@@ -611,7 +621,7 @@ default. You can still see the debug messages as follows:
 
 .. code-block:: shell
 
-   ./master-workers-lab3 small_platform.xml deployment3.xml --log=msg_test.thres:debug
+   ./master-workers-lab3 small_platform.xml deployment3.xml --log=s4u_app_masterworker.thres:debug
 
 
 Lab 4: Competing Applications