Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
doc: Rework the intro pages
[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 applications targeting distributed platforms, which can in turn
16 be used to prototype, evaluate and compare relevant platform configurations, system designs, and algorithmic approaches.
17
18 Typical Study based on SimGrid
19 ------------------------------
20
21 Here are some questions on which SimGrid is particularly relevant:
22
23  - **Compare an Application to another**. This is a classical use case for scientists, who use SimGrid to test how their
24    contributed solution compares to the existing solutions from the literature.
25
26  - **Design the best [Simulated] Platform for a given Application.** Tweaking the platform file is much easier than building a
27    new real platform for testing purposes. SimGrid also allows for the co-design of the platform and the application by
28    modifying both of them.
29
30  - **Debug Real Applications**. With real systems, is sometimes difficult to reproduce the exact run leading to the bug that you
31    are tracking. With SimGrid, you are *clairvoyant* about your *reproducible experiments*: you can explore every part of the
32    system, and your probe will not change the simulated state. It also makes it easy to mock some parts of the real system that
33    are not under study.
34
35  - **Formally assess an algorithm**. Inspirated from model checking, this execution mode does not use the performance models to
36    determine the application outcome, but instead explore all causally possible outcomes of your application. This exhaustive
37    search is perfect to find bugs that are difficult to trigger otherwise, but it will probably not manage to completely cover
38    large applications.
39
40 Any SimGrid study entails the following components:
41
42  - The studied **application**. This can be either a distributed algorithm described in our simple API (either in C++, Python or
43    C) or a full-featured real parallel application using for example the MPI interface :ref:`(more info) <application>`.
44
45  - The **simulated platform**. This is a description (in either XML or C++) of a given distributed system (machines, links,
46    disks, clusters, etc). SimGrid makes it easy to augment the simulated platform with a dynamic scenario where for example the
47    links are slowed down (because of external usage) or the machines fail. You even have support to specify the applicative
48    workload that you want to feed to your application :ref:`(more info) <platform>`.
49
50  - The application's **deployment description**. To run your application, you have to describe how it should be deployed on the
51    simulated platform. You need to specify which process is mapped onto which machine, along with their parameters :ref:`(more
52    info) <scenario>`.
53
54  - The **platform models**. They describe how the simulated platform reacts to the activities of the application. For example,
55    the models compute the time taken by a given communication on the simulated platform. These models are already included in
56    SimGrid, and you only need to pick one and maybe adapt its configuration to get your results :ref:`(more info) <models>`.
57
58 These components are put together to run a **simulation**, that is an experiment or a probe. Simulations produce **outcomes**
59 (logs, visualization, or statistical analysis) that help to answer the **question** targeted by your study. It provides
60 information on the timing performance and the energy consumption of your application, taking network, CPU and disk resources
61 into account by default, and memory can also be modeled. SimGrid differs from many other tools by accurately modeling the contention
62 resulting from concurrent network usages.
63
64 We work hard to make SimGrid easy to use, but you should not blindly trust your results and always strive to double-check the
65 predictions. Questioning the realism of your results will lead you to better :ref:`calibrate the models <models_calibration>`,
66 which is the best way to ensure accurate predictions. Please also refer to the section :ref:`howto_science`.
67
68 Using SimGrid in practice
69 -------------------------
70
71 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
72 program using our API, along with one of the provided XML platform files as shown in the **first tutorial** on
73 :ref:`usecase_simalgo`. If your application is already written in MPI, then you are lucky because SimGrid comes with a very good
74 support of this communication interface, as explained in our **second tutorial** on :ref:`usecase_smpi`. The **third tutorial** is on
75 :ref:`usecase_modelchecking`. Docker images are provided to run these tutorials without installing anything.
76
77 SimGrid comes with an :ref:`extensive amount of examples <s4u_examples>`, so that you can quick-start your simulator by
78 assembling and modifying some of the provided examples (see :ref:`this section <setup_your_own>` on how to get your own project
79 to compile with SimGrid). An extensive documentation is available from the left menu bar. If you want to get an idea of how
80 SimGrid works to better use it, you can refer to the :ref:`framework design presentation <design>`.
81
82 SimGrid Success Stories
83 -----------------------
84
85 SimGrid was cited in over 3,000 scientific papers (according to Google
86 Scholar). Among them,
87 `over 500 publications <https://simgrid.org/usages.html>`_
88 (written by hundreds of individuals) use SimGrid as a scientific
89 instrument to conduct their experimental evaluation. These
90 numbers do not include the articles contributing to SimGrid.
91 This instrument was used in many research communities, such as
92 `High-Performance Computing <https://hal.inria.fr/inria-00580599/>`_,
93 `Cloud Computing <http://dx.doi.org/10.1109/CLOUD.2015.125>`_,
94 `Workflow Scheduling <http://dl.acm.org/citation.cfm?id=2310096.2310195>`_,
95 `Big Data <https://hal.inria.fr/hal-01199200/>`_ and
96 `MapReduce <http://dx.doi.org/10.1109/WSCAD-SSC.2012.18>`_,
97 `Data Grid <http://ieeexplore.ieee.org/document/7515695/>`_,
98 `Volunteer Computing <http://www.sciencedirect.com/science/article/pii/S1569190X17301028>`_,
99 `Peer-to-Peer Computing <https://hal.archives-ouvertes.fr/hal-01152469/>`_,
100 `Network Architecture <http://dx.doi.org/10.1109/TPDS.2016.2613043>`_,
101 `Fog Computing <http://ieeexplore.ieee.org/document/7946412/>`_, or
102 `Batch Scheduling <https://hal.archives-ouvertes.fr/hal-01333471>`_.
103
104 If your platform description is accurate enough (see
105 `here <http://hal.inria.fr/hal-00907887>`_ or
106 `there <https://hal.inria.fr/hal-01523608>`_),
107 SimGrid can provide high-quality performance predictions. For example,
108 we determined the speedup achieved by the Tibidabo ARM-based
109 cluster before its construction
110 (`paper <http://hal.inria.fr/hal-00919507>`_). In this case,
111 some differences between the prediction and the real timings were due to
112 misconfigurations with the real platform. To some extent,
113 SimGrid could even be used to debug the real platform :)
114
115 SimGrid is also used to debug, improve, and tune several large
116 applications.
117 `BigDFT <http://bigdft.org>`_ (a massively parallel code
118 computing the electronic structure of chemical elements developed by
119 the CEA), `StarPU <http://starpu.gforge.inria.fr/>`_ (a
120 Unified Runtime System for Heterogeneous Multicore Architectures
121 developed by Inria Bordeaux), and
122 `TomP2P <https://tomp2p.net/dev/simgrid/>`_ (a high-performance
123 key-value pair storage library developed at the University of Zurich).
124 Some of these applications enjoy large user communities themselves.
125
126 SimGrid Limits
127 --------------
128
129 This framework is by no means the holy grail, able to solve
130 every problem on Earth.
131
132 **SimGrid scope is limited to distributed systems.** Real-time
133 multi-threaded systems are out of this scope. You could probably tweak
134 SimGrid for such studies (or the framework could be extended
135 in this direction), but another framework specifically targeting such a
136 use case would probably be more suited.
137
138 **There is currently no support for 5G or LoRa networks**.
139 The framework could certainly be improved in this direction, but this
140 still has to be done.
141
142 **There is no perfect model, only models adapted to your study.** The SimGrid
143 models target fast and large studies, and yet they target realistic results. In
144 particular, our models abstract away parameters and phenomena that are often
145 irrelevant to reality in our context.
146
147 SimGrid is obviously not intended for a study of any phenomenon that our
148 abstraction removes. Here are some **studies that you should not do with
149 SimGrid**:
150
151  - Studying the effect of L3 vs. L2 cache effects on your application
152  - Comparing kernel schedulers and policies
153  - Comparing variants of TCP
154  - Exploring pathological cases where TCP breaks down, resulting in
155    abnormal executions.
156  - Studying security aspects of your application, in presence of
157    malicious agents.
158
159
160 ..  LocalWords:  SimGrid