Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
completely rewrite the 'Getting Started' page
[simgrid.git] / doc / doxygen / getting_started.doc
1 /*! @page getting_started Getting Started: SimGrid Main Concepts
2
3 @tableofcontents
4
5 SimGrid is a simulator of distributed computer systems. It can be used
6 to either assess abstract algorithms, or to profile and debug real
7 distributed applications.  SimGrid enables studies in the domains of
8 (data-)Grids, Clusters, IaaS Clouds, High Performance Computing,
9 Volunteer Computing and Peer-to-Peer.
10
11 SimGrid is a feature rich framework, with many options and
12 possibilities. Hopefully its documentation will help you getting at
13 full gear. But nothing's perfect, and this documentation is really no
14 exception here. Please help us improving it by reporting the issues
15 that you see.
16
17 SimGrid is a Free Software distributed under the LGPL licence. It
18 means that you are welcome to use it as you wish, or even to modify
19 and distribute your version (as long as your version is as free as
20 ours). It also means that SimGrid is developed by a vivid community of
21 users and developers. We hope that you will join the community!
22
23 SimGrid beneficied of many fundings from various research instances,
24 including: the ANR, Inria, CNRS, University of Lorraine, University of
25 Hawai'i at Manoa, ENS Rennes and many others. Thanks to our generous
26 donators! SimGrid would not exist without the research that they funded.
27
28 @section starting_components Typical Study based on SimGrid
29
30 Any SimGrid study entails the following components:
31
32  - The studied **Application**. This can be either a distributed
33    algorithm described in our simple APIs, or a full featured real
34    parallel application using the MPI interface (or other).
35
36  - The **Virtual Platform**. This is a description of a given
37    distributed system (machines, links, disks, clusters, etc). Most of
38    the platform files are written in XML althrough a Lua interface is
39    under development.  SimGrid makes it easy to augment the Virtual
40    Platform with a Dynamic Scenario where for example the links are
41    slowed down (because of external usage), the machines fail. You
42    have even support to specify the applicative workload that you want
43    to feed to your application.
44
45  - The application's **Deployment Description**. In SimGrid terminology,
46    the application is an inert set of source files and binaries. To
47    make it run, you have to describe how your application should be
48    deployed on the virtual platform. Specify which process is located
49    on which host, along with its parameters.
50
51  - The **Platform Models**. They describe how the virtual platform
52    reacts to the actions of the application. For example, they compute
53    the time taken by a given communication on the virtual platform.
54    These models are already included in SimGrid, and you only need to
55    pick one and maybe tweak its configuration to get your results.
56
57 These components are put together to run a **simulation**, that is an
58 experiment or a probe. The result of one or many simulation provides
59 an **outcome** (logs, visualization, statistical analysis) that help
60 answering the **question** targeted by this study.
61
62 The questions that SimGrid can solve include the following:
63
64  - **Compare an Application to another**. This is the classical use
65    case for scientists, who use SimGrid to test how the solution that
66    they contribute compares to the existing solutions from the
67    literature.
68
69  - **Design the best Virtual Platform for a given Application.**
70    Tweaking the platform file is much easier than building a new real
71    platform for testing purpose. SimGrid also allows co-design of the
72    platform and the application by modifying both of them.
73
74  - **Debug Real Applications**. With real platforms, is sometimes
75    difficult to reproduce the exact run leading to the bug that you
76    are tracking. SimGrid gives you experimental reproducibility,
77    clairevoyance (you can explore every part of the system in no
78    [simulated] time without modifying it). It makes it very easy to
79    mock some parts of the real system that are not under study.
80
81 @section starting_gears SimGrid Execution Gears
82
83 Depending on the intended study, SimGrid can be run in several gears,
84 that are different execution modes.
85
86 ** **Simulation Gear**. This is the most common gear, where you want
87 to study how your application behaves on the virtual platform under
88 the experimental scenario.
89   
90 In this gear, SimGrid can provide information about the time taken by
91 your application, the amount of energy dissipated by the platform to
92 run your application and the detailed usage of each resource.
93    
94 ** **Model-Checking Gear**. This can be seen as a sort of exhaustive
95 testing gear, where every possible outcome of your application is
96 explored. In some sense, this gear tests your application for all
97 possible platforms that you could imagine (and more).
98   
99 You just provide the application and its deployment (amount of
100 processes and parameters), and the model-checker will literally
101 explore all possible outcomes by testing all possible message
102 interleaving: if at some point a given process can either receive the
103 message A first or the message B depending on the platform
104 characteristics, the model-checker will explore the scenario where A
105 arrives first, and then rewind to the same point to explore the
106 scenarion where B arrives first.
107
108 This is a very powerful gear, where you can evaluate the correction of
109 your application. It can verify either *safety properties* (asserts) 
110 or *liveless properties* stating for example that if a given event
111 occures, then another given event will occur in a finite amount of
112 steps. This gear is not only usable with the abstract algorithms
113 developed on top of the SimGrid APIs, but also with real MPI
114 applications (to some extend).
115
116 The main limit of Model Checking lays in the huge amount of scenarios
117 to explore. SimGrid tries to explore only non-redundent scenarios
118 thanks to classical reduction techniques (such as DPOR and statefull
119 exploration) but the exploration may well never finish if you don't
120 carefully adapt your application to this gear.
121
122 Another limit of this gear is that it does not use the performance
123 models of the simulation gear. Time becomes discrete: You can say for
124 example that the application took 42 steps to run, but there is no way
125 to know the amount of seconds that it took or the amount of watts that
126 it dissipated.
127
128 ** **Benchmark Recording Gear**. During debug sessions, continuous
129 integration testing and other similar use cases, you are often only
130 interested in the control flow. If your application apply filters to
131 huge images split in small blocks, the filtered image is probably not
132 what you are interested in. You are probably looking for a way to run
133 each computation kernel only once, save on disk the time it takes and
134 some other metadata. This code block can then be skipped in simulation
135 and replaced by a synthetic block using the cached information. The
136 virtual platform will take this block into account without requesting
137 the real hosting machine to benchmark it.
138
139 @section starting_successes SimGrid Success Stories
140
141 TBD
142
143 @section starting_limits SimGrid Limits
144
145 This framework is by no means the perfect holly grail able to solve
146 every problem on earth. 
147
148 ** **SimGrid scope is limited to distributed systems.** Real-time
149 multithreaded systems are not in the scope. You could probably tweak
150 SimGrid for such studies (or the framework could possibily be extended
151 in this direction), but another framework specifically targeting this
152 usecase would probably be more suited.
153
154 ** **There is no perfect model, only models adapted to your study.**
155 The SimGrid models target fast, large studies yet requesting a
156 realistic results. In particular, our models abstract away parameters
157 and phenomenon that are often irrelevant to the realism in our
158 context. 
159
160 SimGrid is simply not intended to any study that would mandate the
161 abstracted phenomenon. Here are some **studies that you should not do
162 with SimGrid**:
163
164  - Studying the effect of L3 vs L2 cache effects on your application
165  - Comparing variantes of TCP
166  - Exploring pathological cases where TCP breaks down, resulting in
167    abnormal executions.
168  - Studying security aspects of your application, in presence of
169    malicious agents.
170
171 @section starting_next Where to proceed next?
172
173 Now that you know about the basic concepts of SimGrid, you can give it
174 a try. If it's not done yet, first @ref install "install it". Then,
175 proceed to the section on @ref app "describing the application" that
176 you want to study.
177
178 */