Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
various ignorable cosmetics
[simgrid.git] / docs / source / Tutorial_Algorithms.rst
index e12657f..11eebf7 100644 (file)
@@ -22,41 +22,40 @@ actors, but posted onto a |Mailbox|_ that serve as rendez-vous point
 between communicating actors.
 
 .. |Actors| replace:: **Actors**
-.. _Actors: api/classsimgrid_1_1s4u_1_1Actor.html
+.. _Actors: app_s4u.html#s4u-actor
 
 .. |Activities| replace:: **Activities**
-.. _Activities: api/classsimgrid_1_1s4u_1_1Activity.html
+.. _Activities: app_s4u.html#s4u-activity
 
 .. |Hosts| replace:: **Hosts**
-.. _Hosts: api/classsimgrid_1_1s4u_1_1Host.html
+.. _Hosts: app_s4u.html#s4u-host
 
 .. |Links| replace:: **Links**
-.. _Links: api/classsimgrid_1_1s4u_1_1Link.html
+.. _Links: app_s4u.html#s4u-link
 
 .. |Storages| replace:: **Storages**
-.. _Storages: api/classsimgrid_1_1s4u_1_1Storage.html
+.. _Storages: app_s4u.html#s4u-storage
 
 .. |VirtualMachines| replace:: **VirtualMachines**
-.. _VirtualMachines: api/classsimgrid_1_1s4u_1_1VirtualMachine.html
+.. _VirtualMachines: app_s4u.html#s4u-virtualmachine
 
 .. |Host| replace:: **Host**
-.. _Host: api/classsimgrid_1_1s4u_1_1Host.html
+.. _Host: app_s4u.html#s4u-host
 
 .. |Link| replace:: **Link**
-.. _Link: api/classsimgrid_1_1s4u_1_1Link.html
+.. _Link: app_s4u.html#s4u-link
 
 .. |Mailbox| replace:: **Mailbox**
-.. _Mailbox: api/classsimgrid_1_1s4u_1_1Mailbox.html
+.. _Mailbox: app_s4u.html#s4u-mailbox
 
 .. |Barrier| replace:: **Barrier**
-.. _Barrier: api/classsimgrid_1_1s4u_1_1Barrier.html
+.. _Barrier: app_s4u.html#s4u-barrier
 
 .. |ConditionVariable| replace:: **ConditionVariable**
-.. _ConditionVariable: api/classsimgrid_1_1s4u_1_1ConditionVariable.html
+.. _ConditionVariable: app_s4u.html#s4u-conditionvariable
 
 .. |Mutex| replace:: **Mutex**
-.. _Mutex: api/classsimgrid_1_1s4u_1_1Mutex.html
-
+.. _Mutex: app_s4u.html#s4u-mutex
 
 **In the remainder of this tutorial**, you will discover a simple yet
 fully functioning example of SimGrid simulation: the Master/Workers
@@ -174,12 +173,12 @@ examples of platforms in the archive under ``examples/platforms``.
 .. |api_s4u_NetZone| image:: /img/extlink.png
    :align: middle
    :width: 12
-.. _api_s4u_NetZone: api/classsimgrid_1_1s4u_1_1NetZone.html#class-documentation
+.. _api_s4u_NetZone: app_s4u.html#s4u-netzone
 
 .. |api_s4u_Link| image:: /img/extlink.png
    :align: middle
    :width: 12
-.. _api_s4u_Link: api/classsimgrid_1_1s4u_1_1Link.html#class-documentation
+.. _api_s4u_Link: app_s4u.html#s4u-link
 
 .. literalinclude:: ../../examples/platforms/small_platform.xml
    :language: xml
@@ -203,6 +202,8 @@ This time, we have all parts: once the program is compiled, we can
 execute it as follows. Note how the XBT_INFO() requests turned into
 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
    :language: shell
    :start-after: s4u-app-masterworkers-fun
@@ -320,9 +321,9 @@ All needed dependencies are already installed in this container
 optional in this tutorial, it is not installed to reduce the image
 size.
 
-The code template is available under ``/source/simgrid-template-s4u.git`` 
+The code template is available under ``/source/simgrid-template-s4u.git``
 in the image. You should copy it to your working directory and
-recompile it when you first log in: 
+recompile it when you first log in:
 
 .. code-block:: shell
 
@@ -334,19 +335,19 @@ recompile it when you first log in:
 Using your Computer Natively
 ............................
 
-To take the tutorial on your machine, you first need to :ref:`install
-SimGrid <install>`, a C++ compiler and also ``pajeng`` to visualize
-the traces. You may want to install `Vite
-<http://vite.gforge.inria.fr/>`_ to get a first glance at the
-traces. The provided code template requires cmake to compile. On
-Debian and Ubuntu for example, you can get them as follows:
+To take the tutorial on your machine, you first need to :ref:`install 
+a recent version of SimGrid <install>`, a C++ compiler and also
+``pajeng`` to visualize the traces. You may want to install `Vite
+<http://vite.gforge.inria.fr/>`_ to get a first glance at the traces.
+The provided code template requires cmake to compile. On Debian and
+Ubuntu for example, you can get them as follows:
 
 .. code-block:: shell
 
    sudo apt install simgrid pajeng cmake g++ vite
 
-For R analysis of the produced traces, you may want to install R, 
-and the `pajengr<https://github.com/schnorr/pajengr#installation/>_ package.
+For R analysis of the produced traces, you may want to install R,
+and the `pajengr <https://github.com/schnorr/pajengr#installation/>`_ package.
 
 .. code-block:: shell
 
@@ -363,10 +364,10 @@ everything as follows:
 
    # (exporting SimGrid_PATH is only needed if SimGrid is installed in a non-standard path)
    export SimGrid_PATH=/where/to/simgrid
-   
-   git clone https://framagit.org/simgrid/simgrid.git
+
+   git clone https://framagit.org/simgrid/simgrid-template-s4u.git
    cd simgrid-template-s4u/
-   cmake . 
+   cmake .
    make
 
 If you struggle with the compilation, then you should double check
@@ -461,7 +462,7 @@ messages to all workers based on their number, for example as follows:
    for (int i = 0; i < tasks_count; i++) {
      std::string worker_rank          = std::to_string(i % workers_count);
      std::string mailbox_name         = std::string("worker-") + worker_rank;
-     simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::by_name(mailbox_name);
+     simgrid::s4u::Mailbox* mailbox = simgrid::s4u::Mailbox::by_name(mailbox_name);
 
      mailbox->put(...);
 
@@ -481,9 +482,8 @@ timing. ``put()`` and ``get()`` are matched regardless of their
 initiators' location and then the real communication occures between
 the involved parties.
 
-Please refer to the full `API of Mailboxes
-<api/classsimgrid_1_1s4u_1_1Mailbox.html#class-documentation>`_ for
-more details.
+Please refer to the full `Mailboxes' documentation
+<app_s4u.html#s4u-mailbox>`_ for more details.
 
 
 Lab 2: Using the Whole Platform