Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove doc items about gras.
[simgrid.git] / doc / ref_guide / doxygen / modules.doc
1
2 /** \defgroup XBT_API      XBT
3     \brief The core toolbox of SimGrid, containing usefull datatypes,
4            portability support and so on.
5
6 */
7
8 /** \defgroup MSG_API      MSG
9     \brief Simple programming environment
10
11       MSG was the first distributed programming environment provided within
12       SimGrid. While almost realistic, it remains quite simple (simplistic?).
13
14       \section MSG_who Who should use this (and who shouldn't)
15
16       You should use this module if you want to study some heuristics for a
17       given problem you don't really want to implement.
18       If you want to use DAGs, have a look at the \ref SD_API programming
19       environment.
20       If you want to study an existing MPI program,
21       have a look at the \ref SMPI_API one. If none of those programming
22       environments fits your needs, you may consider implementing your own
23       directly on top of \ref SURF_API (but you probably want to contact us
24       before).
25 */
26
27
28 /** \defgroup SIMIX_API      SIMIX
29     \brief POSIX-like interface for building simulation
30
31     This is a developer-level interface that should be useful only if you
32     plan to design a new interface for SimGrid.
33 */
34
35
36 /** \defgroup SMPI_API      SMPI
37     \brief Programming environment for the simulation of MPI applications
38
39 This programming environment permits to study existing MPI application
40 by emulating them on top of the SimGrid simulator. In other words, it
41 will constitute an emulation solution for parallel codes. You don't
42 even have to modify your code for that, although that may help, as
43 detailed below.
44
45 \section SMPI_who Who should use SMPI (and who shouldn't)
46
47 You should use this programming environment of the SimGrid suite if
48 you want to study existing MPI applications.  If you want to study
49 some heuristics for a given problem (and if your goal is to produce
50 theorems and publications, not code), have a look at the \ref MSG_API
51 environment, or the \ref SD_API one if you need to use DAGs. If none
52 of those programming environments fits your needs, you may consider
53 implementing your own directly on top of \ref SURF_API (but you
54 probably want to contact us before).
55
56 \section SMPI_what What can run within SMPI?
57
58 You can run unmodified MPI applications (both C and Fortran) within
59 SMPI, provided you only use MPI calls that we implemented in MPI. Our
60 coverage of the interface is not bad, but will probably never be
61 complete. One sided communications and I/O primitives are not targeted
62 for now. The full list of not yet implemented functions is available
63 in file <tt>include/smpi/smpi.h</tt> of the archive, between two lines
64 containing the <tt>FIXME</tt> marker. If you really need a missing
65 feature, please get in touch with us: we can guide you though the
66 SimGrid code to help you implementing it, and we'd glad to integrate
67 it in the main project afterward if you contribute them back.
68
69 \section SMPI_adapting Adapting your MPI code to the use of SMPI
70
71 As detailed in the reference article (available at
72 http://hal.inria.fr/inria-00527150), you may want to adapt your code
73 to improve the simulation performance. But these tricks may seriously
74 hinder the result qualtity (or even prevent the app to run) if used
75 wrongly. We assume that if you want to simulate an HPC application,
76 you know what you are doing. Don't prove us wrong!
77
78 If you get short on memory (the whole app is executed on a single node
79 when simulated), you should have a look at the SMPI_SHARED_MALLOC and
80 SMPI_SHARED_FREE macros. It allows to share memory areas between
81 processes. For example, matrix multiplication code may want to store
82 the blocks on the same area. Of course, the resulting computations
83 will useless, but you can still study the application behavior this
84 way. Of course, if your code is data-dependent, this won't work.
85
86 If your application is too slow, try using SMPI_SAMPLE_LOCAL,
87 SMPI_SAMPLE_GLOBAL and friends to indicate which computation loops can
88 be sampled. Some of the loop iterations will be executed to measure
89 their duration, and this duration will be used for the subsequent
90 iterations. These samples are done per processor with
91 SMPI_SAMPLE_LOCAL, and shared between all processors with
92 SMPI_SAMPLE_GLOBAL. Of course, none of this will work if the execution
93 time of your loop iteration are not stable.
94
95 Yes, that's right, these macros are not documented yet, but we'll fix
96 it as soon as time permits. Sorry about that -- patch welcomed!
97 Meanwhile, grep for them on the examples for more information.
98
99 \section SMPI_compiling Compiling your code
100
101 This is very simply done with the <tt>smpicc</tt> script. If you
102 already compiled any MPI code before, you already know how to use it.
103 If not, you should try to get your MPI code running on top of MPI
104 before giving SMPI a spin. Actually, that's very simple even if it's
105 the first time you use MPI code: just use smpicc as a compiler (in
106 replacement of gcc or your usual compiler), and you're set.
107
108 \section SMPI_executing Executing your code on top of the simulator
109
110 This is done though the <tt>smpirun</tt> script as follows.
111 <tt>my_hostfile.txt</tt> is a classical MPI hostfile (that is, this
112 file lists the machines on which the processes must be dispatched, one
113 per line)  <tt>my_platform.xml</tt> is a classical SimGrid platform
114 file. Of course, the hosts of the hostfile must exist in the provided
115 platform. <tt>./program</tt> is the MPI program that you want to
116 simulate (must be compiled by <tt>smpicc</tt>) while <tt>-arg</tt> is
117 a command-line parameter passed to this program.
118
119 \verbatim
120 smpirun -hostfile my_hostfile.txt -platform my_platform.xml ./program -arg
121 \endverbatim
122
123 smpirun accepts other parameters, such as <tt>-np</tt> if you don't
124 want to use all the hosts defined in the hostfile, <tt>-map</tt> to
125 display on which host each rank gets mapped of <tt>-trace</tt> to
126 activate the tracing during the simulation. You can get the full list
127 by running
128 \verbatim
129 smpirun -help
130 \endverbatim
131
132
133 */
134
135
136 /** \defgroup SD_API      SimDag
137     \brief Programming environment for DAG applications
138
139     SimDag provides some functionnalities to simulate parallel task scheduling
140     with DAGs models (Direct Acyclic Graphs).
141     The old versions of SimGrid were based on DAGs. But the DAG part (named SG)
142     was removed in SimGrid 3 because the new kernel (\ref SURF_API) was implemented. \ref SURF_API
143     was much faster and more flexible than SG and did not use DAGs.
144     SimDag is a new implementation of DAGs handling and it is built on top of \ref SURF_API.
145
146     \section SD_who Who should use this (and who shouldn't)
147
148     You should use this programming environment of the SimGrid suite if you want
149     to study algorithms and heuristics with DAGs of parallel tasks.
150     If you don't need to use DAGs for your simulation, have a look at the
151     \ref MSG_API programming environment.
152     If you want to study an existing MPI program, have a look at the
153     \ref SMPI_API one.
154     If none of those programming environments fits your needs, you may
155     consider implementing your own directly on top of \ref SURF_API (but you
156     probably want to contact us before).
157
158 */
159
160 /**
161 @defgroup SURF_API SURF
162 @brief Internal kernel of all the simulators used in SimGrid, and associated models.
163
164 SURF provides the core functionnalities to simulate a virtual
165 platform. It is very low-level and is not intended to be used by end
166 users, but rather to serve as a basis for higher-level simulators. Its
167 interface are not frozen (and will probably never be), and the
168 structure emphasis on performance over ease of use. This module
169 contains the platform models. If you need a model that is not encoded
170 yet, please come to the devel mailing list so that we can discuss on
171 the feasibility of your idea.
172
173 Please note that as it is not really intended for public use, this
174 module is only partially documented.
175 */
176
177
178 /**
179 @defgroup TRACE_API TRACE
180 @brief Tracing mechanism and its functions.
181
182 SimGrid can trace the resource (of hosts and links) utilization using
183 any of its programming interfaces (MSG, SimDAG and SMPI). This means
184 that the tracing will register how much power is used for each host
185 and how much bandwidth is used for each link of the platform.
186
187 The idea of the tracing facilities is to give SimGrid users to
188 possibility to classify MSG and SimDAG tasks by category, tracing the
189 platform utilization (hosts and links) for each of the categories.
190 The API enables the declaration of categories and a function to
191 associate them to the tasks (MSG and SD). The tasks that are not
192 classified according to a category are not traced. If no categories
193 are specified, simulations can still be traced using a special
194 parameter in the command line (see \ref tracing for details).
195 */
196