Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
c3555f21b2e37f99bf55d859359c51cf2a42159a
[simgrid.git] / docs / source / application.rst
1 .. _application:
2
3 .. raw:: html
4
5    <object id="TOC" data="graphical-toc.svg" width="100%" type="image/svg+xml"></object>
6    <script>
7    window.onload=function() { // Wait for the SVG to be loaded before changing it
8      var elem=document.querySelector("#TOC").contentDocument.getElementById("ApplicationBox")
9      elem.style="opacity:0.93999999;fill:#ff0000;fill-opacity:0.1;stroke:#000000;stroke-width:0.35277778;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1";
10    }
11    </script>
12    <br/>
13    <br/>
14
15 Describing your Application
16 ***************************
17
18 Every SimGrid simulation entails a distributed application, that
19 virtually executes on the simulated platform. This application can
20 be either an existing MPI program (if you use the SMPI interface), or
21 a program specifically written to execute within SimGrid, using one of
22 the dedicated APIs.
23
24 .. _S4U_doc:
25
26 The S4U Interface
27 =================
28
29 The S4U interface (SimGrid for you) mixes the full power of SimGrid
30 with the full power of C++. This is the prefered interface to describe
31 abstract algorithms in the domains of Cloud, P2P, HPC, IoT and similar
32 settings.
33
34 Main Concepts
35 -------------
36
37 A typical SimGrid simulation is composed of several |Actors|_, that
38 execute user-provided functions. The actors have to explicitly use the
39 S4U interface to express their computation, communication, disk usage
40 and other |Activities|_, so that they get reflected within the
41 simulator. These activities take place on resources: |Hosts|_,
42 |Links|_, |Storages|_ and |VirtualMachines|_. SimGrid predicts the
43 time taken by each activity and orchestrates accordingly the actors
44 waiting for the completion of these activities.
45
46
47 Each actor executes a user-provided function on a simulated |Host|_,
48 with which it can interact using the :ref:`simgrid::s4u::this_actor
49 <namespace_simgrid__s4u__this_actor>` namespace.  **Communications**
50 are not directly sent to actors, but posted onto a |Mailbox|_ that
51 serve as rendez-vous point between communicating actors.  Actors can
52 also interact through **classical synchronization mechanisms** such as
53 |Barrier|_, |Semaphore|_, |Mutex|_ and |ConditionVariable|_.
54
55 .. todo:: Add NetZone
56
57 .. |Actors| replace:: **Actors**
58 .. _Actors: api/classsimgrid_1_1s4u_1_1Actor.html
59
60 .. |Activities| replace:: **Activities**
61 .. _Activities: api/classsimgrid_1_1s4u_1_1Activity.html
62
63 .. |Hosts| replace:: **Hosts**
64 .. _Hosts: api/classsimgrid_1_1s4u_1_1Host.html
65
66 .. |Links| replace:: **Links**
67 .. _Links: api/classsimgrid_1_1s4u_1_1Link.html
68
69 .. |Storages| replace:: **Storages**
70 .. _Storages: api/classsimgrid_1_1s4u_1_1Storage.html
71
72 .. |VirtualMachines| replace:: **VirtualMachines**
73 .. _VirtualMachines: api/classsimgrid_1_1s4u_1_1VirtualMachine.html
74
75 .. |Host| replace:: **Host**
76 .. _Host: api/classsimgrid_1_1s4u_1_1Host.html
77
78 .. |Mailbox| replace:: **Mailbox**
79 .. _Mailbox: api/classsimgrid_1_1s4u_1_1Mailbox.html
80
81 .. |Barrier| replace:: **Barrier**
82 .. _Barrier: api/classsimgrid_1_1s4u_1_1Barrier.html
83
84 .. |ConditionVariable| replace:: **ConditionVariable**
85 .. _ConditionVariable: api/classsimgrid_1_1s4u_1_1ConditionVariable.html
86
87 .. |Mutex| replace:: **Mutex**
88 .. _Mutex: api/classsimgrid_1_1s4u_1_1Mutex.html
89
90
91 .. include:: app_smpi.rst
92
93 .. include:: app_legacy.rst