Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ease the usage of cmake for SMPI programs
[simgrid.git] / examples / README.rst
index 240f554..1370212 100644 (file)
@@ -1,4 +1,4 @@
-.. S4U (Simgrid for you) is the modern interface of SimGrid, which new project should use.
+.. S4U (SimGrid for you) is the modern interface of SimGrid, which new project should use.
 ..
 .. This file follows the ReStructured syntax to be included in the
 .. documentation, but it should remain readable directly.
@@ -366,7 +366,7 @@ Checking for incoming communications
 ------------------------------------
 
 This example uses ``Mailbox.ready()`` to check for completed communications. When this function returns true, then at least a message
-is arrived, so you know that ``Mailbox.get()`` will complete imediately. This is thus another way toward asynchronous communications.
+is arrived, so you know that ``Mailbox.get()`` will complete immediately. This is thus another way toward asynchronous communications.
 
 .. tabs::
 
@@ -395,7 +395,7 @@ The ``suspend()`` and ``resume()`` functions block the progression of a given co
 
    .. example-tab:: examples/python/comm-suspend/comm-suspend.py
 
-      See also :py:func:`simgrid.Comm::suspend()` and
+      See also :py:func:`simgrid.Comm.suspend()` and
       :py:func:`simgrid.Comm.resume()`.
 
 Waiting for all communications in a set
@@ -620,7 +620,7 @@ on which they run is turned off: they are just terminated in this case, and thei
 failing hosts however, any blocking operation such as ``exec`` or ``wait`` will raise an exception that you can catch and react to. See also
 :ref:`howto_churn`,
 :ref:`this example <s4u_ex_platform_state_profile>` on how to attach a state profile to hosts, and
-:ref:`that example <s4u_ex_comm_failure>` on how to react to networ failures.
+:ref:`that example <s4u_ex_comm_failure>` on how to react to network failures.
 
 .. tabs::
 
@@ -717,16 +717,44 @@ result in short reads and short writes, as in reality.
 
 .. _s4u_ex_dag:
 
-DAG of activities
-=================
+Dependencies between activities
+===============================
+
+SimGrid makes it easy to express dependencies between activities, where a given activity cannot start until the completion of
+all its predecessors. You can even have simulation not involving any actors, where the main thread (called maestro) creates and
+schedules activities itself.
+
+Simple dependencies
+-------------------
+
+When you declare dependencies between two activities, the dependent will not actually start until all its dependencies complete,
+as shown in the following examples. The first one declare dependencies between executions while the second one declare
+dependencies between communications. You could declare such dependencies between arbitrary activities.
+
+.. tabs::
+
+   .. example-tab:: examples/cpp/exec-dependent/s4u-exec-dependent.cpp
+
+.. tabs::
+
+   .. example-tab:: examples/cpp/comm-dependent/s4u-comm-dependent.cpp
+
+Assigning activities
+--------------------
+
+To actually start, an activity needs to be assigned to a given resource. This examples illustrates how an execution that is not
+assigned will not actually start until being assigned. In some sense, activities' assignment can be seen as a specific
+dependency that can withdraw their execution.
 
-SimGrid makes it easy to express dependencies between activities, where a given activity cannot start until the completion of all its predecessors.
-You can even have simulation not involving any actors, where the main thread (called maestro) creates and schedules activities itself. 
+.. tabs::
+
+   .. example-tab:: examples/cpp/exec-unassigned/s4u-exec-unassigned.cpp
 
 Simple DAG of activities
 ------------------------
 
-This example shows how to create activities organized as a DAG (direct acyclic graph), and start them.
+This example shows how to create activities from the maestro directly without relying on an actor, organize the dependencies of
+activities as a DAG (direct acyclic graph), and start them. Each activity will start as soon as its dependencies are fulfilled.
 
 .. tabs::
 
@@ -750,15 +778,6 @@ This is a little example showing how add I/O activities to your DAG, representin
 
    .. example-tab:: examples/cpp/dag-io/s4u-dag-io.cpp
 
-Assigning activities
---------------------
-
-To actually start, an activity needs to be assigned to a given resource. This examples illustrates how an execution that is not assigned will not actually start until being assigned.
-
-.. tabs::
-
-   .. example-tab:: examples/cpp/exec-unassigned/s4u-exec-unassigned.cpp
-
 Scheduling activities
 ---------------------
 
@@ -772,7 +791,7 @@ to determine which host is the better fit for a given activity, and this example
 Loading DAGs from file
 ----------------------
 
-There is currently two file formats that you can load directly in SimGrid, but writting another loader for your beloved format should not be difficult.
+There is currently two file formats that you can load directly in SimGrid, but writing another loader for your beloved format should not be difficult.
 
 .. tabs::
 
@@ -812,21 +831,6 @@ This example shows how to deal with host or network failures while scheduling DA
 
    .. example-tab:: examples/cpp/dag-failure/s4u-dag-failure.cpp
 
-DAGs and actors
----------------
-
-You can also declare dependencies to regular activities that are executed by actors, as shown in the following examples. 
-The first one declare dependencies between executions while the second one declare dependencies between communications. 
-You could declare such dependencies between arbitrary activities.
-
-.. tabs::
-
-   .. example-tab:: examples/cpp/exec-dependent/s4u-exec-dependent.cpp
-
-.. tabs::
-
-   .. example-tab:: examples/cpp/comm-dependent/s4u-comm-dependent.cpp
-
 .. _s4u_ex_IPC:
 
 Classical synchronization objects