Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / docs / source / Introduction.rst
1 .. _intro_concepts:
2
3 Introduction
4 ============
5
6 .. raw:: html
7
8    <object data="graphical-toc.svg" type="image/svg+xml"></object>
9    <br/>
10    <br/>
11
12 What is SimGrid
13 ---------------
14
15 SimGrid is a framework for developing simulators of distributed application executions on distributed platforms. It can 
16 be used to prototype, evaluate and compare relevant platform configurations, system designs, and algorithmic approaches.
17
18 What SimGrid allows you to do
19 ----------------------------
20
21 Here are some objectives for which SimGrid is particularly relevant and has been used extensively:
22
23  - **Compare designs**. This is a classical use case for researchers/developers, who use SimGrid to assess how their contributed solution (a platform, system, application, and/or algorithm design) compares to existing solutions from the literature.
24
25  - **Design the best [Simulated] Platform for a given Application.** Modifying a platform file use to drive simulations is much easier than building 
26    real-world platforms for testing purposes. SimGrid also allows for the co-design of the platform and the application, as both can be modified with little work.
27
28  - **Debug Real Applications**. With real systems it is often difficult to reproduce the exact run that would lead to a bug that is being tracked. 
29    With SimGrid, you are *clairvoyant* about your *reproducible experiments*: you can explore every part of the
30    system, and your exploration will not change the simulated state. It also makes it easy to mock or abstract away parts of the real system that
31    are not under study.
32
33  - **Formally assess an algorithm**. Inspired by model checking, SimGrid provides an execution mode that does not 
34    quantify an application's performance behavior, but that instead explores all causally possible outcomes of the application so as to evaluate application correctness. This exhaustive
35    search is ideal for finding bugs that are difficult to trigger experimentally. But because it is exhaustive, there is a limit to the scale of the applications for which it can be used. 
36
37 Anatomy of a project that uses SimGrid
38 --------------------------------------
39
40 Any project that uses SimGrid as its simulation framework comprises the following components:
41
42  - An **application**. An application consists of one or more process that can either implement distributed algorithms described using a simple API (either in C++, Python or
43    C) or be part of a full-featured real  parallel application implemented with, for example, the MPI standard :ref:`(more info) <application>`.
44
45  - A **simulated platform**. This is a description (in either XML or C++) of a distributed system's hardware (machines, links,
46    disks, clusters, etc). SimGrid makes it straightforward to augment the simulated platform with dynamic behaviors where, for example, the
47    links are slowed down (because of external usage) or the machines fail :ref:`(more info) <platform>`.
48
49  - An application's **deployment description**. To simulate the execution of the application on the platform, they way in which the application is
50    deployed on the platform must be described.  This is done by specifying which process is mapped onto which machine :ref:`(more
51    info) <scenario>`.
52
53  - **Platform models**. SimGrid implements models that describe how the simulated platform reacts to the simulated activities performed my
54   application processes.  SimGrid provides a range of documented models,
55   which the user can select and configure for their particular use case.  A
56   big selling point of SimGrid, which sets it apart from its competitors,
57   is that it can accurately model the network contention that results from
58   concurrent communications. :ref:`(more info) <models>`.
59
60
61 The above components are put together to run a **simulation experiment**
62 that produces **outcomes** (logs, visualization, statistics) that help
63 answer the user's research and development **question**. The outcomes
64 typically include a timeline of the application execution and information
65 about its energy consumption.  
66
67
68 We work hard to make SimGrid easy to use, but you should not blindly trust your results and always strive to validate
69 the simulation outcomes. Assessing the realism of these outcomes will lead you to better :ref:`calibrate the models <models_calibration>`,
70 which is the best way to achieved high simulation accuracy. Please refer to the section :ref:`howto_science`.
71
72 Using SimGrid in practice
73 -------------------------
74
75 SimGrid is versatile and can be used in many ways, but the most typical setup is to specify your algorithm as a C++ or Python
76 program using our API, along with one of the provided XML platform files as shown in the **first tutorial** on
77 :ref:`usecase_simalgo`. If your application is already written in MPI, then you are in luck because SimGrid comes with MPI support, 
78 as explained in our **second tutorial** on :ref:`usecase_smpi`. The **third tutorial** is on
79 :ref:`usecase_modelchecking`. Docker images are provided to run these tutorials without installing any software, other than Docker, on your machine.
80
81 SimGrid comes with :ref:`many examples <s4u_examples>`, so that you can quick-start your simulator by
82 assembling and modifying some of the provided examples (see :ref:`this section <setup_your_own>` on how to get your own project
83 to compile with SimGrid). An extensive documentation is available from the left menu bar. If you want to get an idea of how
84 SimGrid works you can read about its :ref:`design goals <design>`.
85
86 SimGrid Success Stories
87 -----------------------
88
89 SimGrid was cited in over 3,000 scientific papers (according to Google
90 Scholar). Among them,
91 `over 500 publications <https://simgrid.org/usages.html>`_
92 (written by hundreds of individuals) use SimGrid as a scientific
93 instrument to conduct experimental evaluations. These
94 numbers do not include those articles that directly contribute to SimGrid itself.
95 SimGrid was used in many research communities, such as
96 `High-Performance Computing <https://hal.inria.fr/inria-00580599/>`_,
97 `Cloud Computing <http://dx.doi.org/10.1109/CLOUD.2015.125>`_,
98 `Workflow Scheduling <http://dl.acm.org/citation.cfm?id=2310096.2310195>`_,
99 `Big Data <https://hal.inria.fr/hal-01199200/>`_ and
100 `MapReduce <http://dx.doi.org/10.1109/WSCAD-SSC.2012.18>`_,
101 `Data Grid <http://ieeexplore.ieee.org/document/7515695/>`_,
102 `Volunteer Computing <http://www.sciencedirect.com/science/article/pii/S1569190X17301028>`_,
103 `Peer-to-Peer Computing <https://hal.archives-ouvertes.fr/hal-01152469/>`_,
104 `Network Architecture <http://dx.doi.org/10.1109/TPDS.2016.2613043>`_,
105 `Fog Computing <http://ieeexplore.ieee.org/document/7946412/>`_, or
106 `Batch Scheduling <https://hal.archives-ouvertes.fr/hal-01333471>`_.
107
108 If your platform description is accurate enough (see
109 `here <http://hal.inria.fr/hal-00907887>`_ or
110 `there <https://hal.inria.fr/hal-01523608>`_),
111 SimGrid can provide high-quality performance predictions. For example,
112 we determined the speedup achieved by the Tibidabo ARM-based
113 cluster before its construction
114 (`paper <http://hal.inria.fr/hal-00919507>`_). Some
115 differences between the simulated and the real timings were observed, and
116 turned out to be due to
117 misconfigurations in the real platform! 
118 SimGrid can thus even be used to debug a real platform :)
119
120 SimGrid is also used to debug, improve, and tune several large
121 applications.
122 `BigDFT <http://bigdft.org>`_ (a massively parallel code
123 for computing the electronic structure of chemical elements developed by
124 the CEA), `StarPU <http://starpu.gforge.inria.fr/>`_ (a
125 Unified Runtime System for Heterogeneous Multicore Architectures
126 developed by Inria Bordeaux), and
127 `TomP2P <https://tomp2p.net/dev/simgrid/>`_ (a high-performance
128 key-value pair storage library developed at the University of Zurich).
129 Some of these applications enjoy large user communities themselves.
130
131 SimGrid Limits
132 --------------
133
134 SimGrid is by no means the holy grail that is able to solve every conceivable simulation problem.
135
136 **SimGrid's scope is limited to distributed systems.** Real-time
137 multi-threaded systems are out of this scope. You could probably use and/or
138 extend SimGrid for this purpose, but another framework that specifically
139 targets this use case would probably be more suitable.
140
141 **There is currently no support for 5G or LoRa networks**.
142 SimGrid could certainly be extended with models for these networks, but this
143 yet to be done.
144
145 **There is no perfect model, only models adapted to your purposes.** SimGrid's
146 models were designed to make it possible to run fast and accurate
147 simulations of large systems. As a result, the models abstract away many
148 parameters and phenomena that are often irrelevant for most use cases in the
149 field. This means that SimGrid cannot be used to study any phenomenon that our
150 model do not capture.  Here are some **phenomena that you currently cannot study with
151 SimGrid**:
152
153  - Studying the effect of L3 vs. L2 cache effects on your application;
154  - Comparing kernel schedulers and policies;
155  - Comparing variants of TCP;
156  - Exploring pathological cases where TCP breaks down, resulting in
157    abnormal executions;
158  - Studying security aspects of your application, in the presence of
159    malicious agents.
160
161
162 ..  LocalWords:  SimGrid