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
: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
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
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
.. "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
-------------------
.. 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
.. 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:
.. 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