Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ca273a2b9888bec9cb2c9343716a1344f074417e
[simgrid.git] / doc / doxygen / module-smpi.doc
1 /** 
2 @defgroup SMPI_API      SMPI: Semulate real MPI applications
3 @brief Programming environment for the simulation of MPI applications
4     
5 This programming environment enables the study of MPI application by
6 emulating them on top of the SimGrid simulator. This is particularly
7 interesting to study existing MPI applications within the comfort of
8 the simulator. The motivation for this work is detailed in the
9 reference article (available at http://hal.inria.fr/inria-00527150).
10
11 Our goal is to enable the study of *unmodified* MPI applications,
12 although we are not quite there yet (see @ref SMPI_what). In
13 addition, you can modify your code to speed up your studies or
14 otherwise increase their scalability (see @ref SMPI_adapting).
15
16 \section SMPI_who Who should use SMPI (and who shouldn't)
17
18 SMPI is now considered as stable and you can use it in production. You
19 may probably want to read the scientific publications that detail the
20 models used and their limits, but this should not be absolutely
21 necessary. If you already fluently write and use MPI applications,
22 SMPI should sound very familiar to you. Use smpicc instead of mpicc,
23 and smpirun instead of mpirun (see below for more details).
24
25 Of course, if you don't know what MPI is, the documentation of SMPI
26 will seem a bit terse to you. You should pick up a good MPI tutorial
27 on the Internet (or a course in your favorite university) and come
28 back to SMPI once you know a bit more about MPI. Alternatively, you
29 may want to turn to the other SimGrid interfaces such as the 
30 \ref MSG_API environment, or the \ref SD_API one.
31
32 \section SMPI_what What can run within SMPI?
33
34 You can run unmodified MPI applications (both C and Fortran) within
35 SMPI, provided that you only use MPI calls that we implemented in
36 MPI. Global variables should be handled correctly on Linux systems.
37
38 \subsection SMPI_what_coverage MPI coverage of SMPI
39
40 Our coverage of the interface is very decent, but still incomplete;
41 Given the size of the MPI standard, it may well be that we never
42 implement absolutely all existing primitives. One sided communications
43 and I/O primitives are not targeted for now. Our current state is
44 still very decent: we pass most of the MPICH coverage tests.
45
46 The full list of not yet implemented functions is documented in the
47 file <tt>include/smpi/smpi.h</tt> of the archive, between two lines
48 containing the <tt>FIXME</tt> marker. If you really need a missing
49 feature, please get in touch with us: we can guide you though the
50 SimGrid code to help you implementing it, and we'd glad to integrate
51 it in the main project afterward if you contribute them back.
52
53 \subsection SMPI_what_globals Global variables
54
55 Concerning the globals, the problem comes from the fact that usually,
56 MPI processes run as real UNIX processes while they are all folded
57 into threads of a unique system process in SMPI. Global variables are
58 usually private to each MPI process while they become shared between
59 the processes in SMPI. This point is rather problematic, and currently
60 forces to modify your application to privatize the global variables.
61
62 We tried several techniques to work this around. We used to have a
63 script that privatized automatically the globals through static
64 analysis of the source code, but it was not robust enough to be used
65 in production. This issue, as well as several potential solutions, is
66 discussed in this article: "Automatic Handling of Global Variables for
67 Multi-threaded MPI Programs",
68 available at http://charm.cs.illinois.edu/newPapers/11-23/paper.pdf
69 (note that this article does not deal with SMPI but with a concurrent
70 solution called AMPI that suffers of the same issue). 
71
72 A method using dynamic switching of the .data and .bss segments of an
73 ELF executable has been introduced in SimGrid 3.11. By using the <tt>smpi/
74 privatize_global_variableles</tt> option to yes, SMPI will duplicate
75 the segments containing the global variables and when needed, will map 
76 the right one in memory. This needs ELF executables and mmap on the system
77 (Linux and recent BSDs should be compatible). %As no copy is involved, 
78 performance should not be altered (but memory occupation will be higher).
79
80 This solution actually works really good for a good number of MPI 
81 applications. Its main limitation is that if the application loads dynamic 
82 libraries, their global variables won't be privatized. This can be avoided 
83 by linking statically with these libraries (but NOT with libsimgrid, as we 
84 need SimGrid's own global varibles).
85
86
87 \section SMPI_compiling Compiling your code
88
89 This is very simply done with the <tt>smpicc</tt> script. If you
90 already compiled any MPI code before, you already know how to use it.
91 If not, you should try to get your MPI code running on top of MPI
92 before giving SMPI a spin. Actually, that's very simple even if it's
93 the first time you use MPI code: just use smpicc as a compiler (in
94 replacement of gcc or your usual compiler), and you're set.
95
96 \section SMPI_executing Executing your code on top of the simulator
97
98 This is done though the <tt>smpirun</tt> script as follows.
99 <tt>my_hostfile.txt</tt> is a classical MPI hostfile (that is, this
100 file lists the machines on which the processes must be dispatched, one
101 per line)  <tt>my_platform.xml</tt> is a classical SimGrid platform
102 file. Of course, the hosts of the hostfile must exist in the provided
103 platform. <tt>./program</tt> is the MPI program that you want to
104 simulate (must be compiled by <tt>smpicc</tt>) while <tt>-arg</tt> is
105 a command-line parameter passed to this program.
106
107 \verbatim
108 smpirun -hostfile my_hostfile.txt -platform my_platform.xml ./program -arg
109 \endverbatim
110
111 smpirun accepts other parameters, such as <tt>-np</tt> if you don't
112 want to use all the hosts defined in the hostfile, <tt>-map</tt> to
113 display on which host each rank gets mapped of <tt>-trace</tt> to
114 activate the tracing during the simulation. You can get the full list
115 by running
116 \verbatim
117 smpirun -help
118 \endverbatim
119
120 \section SMPI_adapting Adapting your MPI code to the use of SMPI
121
122 As detailed in the reference article (available at
123 http://hal.inria.fr/inria-00527150), you may want to adapt your code
124 to improve the simulation performance. But these tricks may seriously
125 hinder the result quality (or even prevent the app to run) if used
126 wrongly. We assume that if you want to simulate an HPC application,
127 you know what you are doing. Don't prove us wrong!
128
129 \section SMPI_adapting_size Reducing your memory footprint
130
131 If you get short on memory (the whole app is executed on a single node when
132 simulated), you should have a look at the SMPI_SHARED_MALLOC and
133 SMPI_SHARED_FREE macros. It allows to share memory areas between processes: The
134 purpose of these macro is that the same line malloc on each process will point
135 to the exact same memory area. So if you have a malloc of 2M and you have 16
136 processes, this macro will change your memory consumption from 2M*16 to 2M
137 only. Only one block for all processes.
138
139 If your program is ok with a block containing garbage value because all
140 processes write and read to the same place without any kind of coordination,
141 then this macro can dramatically shrink your memory consumption. For example,
142 that will be very beneficial to a matrix multiplication code, as all blocks will
143 be stored on the same area. Of course, the resulting computations will useless,
144 but you can still study the application behavior this way. 
145
146 Naturally, this won't work if your code is data-dependent. For example, a Jacobi
147 iterative computation depends on the result computed by the code to detect
148 convergence conditions, so turning them into garbage by sharing the same memory
149 area between processes does not seem very wise. You cannot use the
150 SMPI_SHARED_MALLOC macro in this case, sorry.
151
152 This feature is demoed by the example file
153 <tt>examples/smpi/NAS/DT-folding/dt.c</tt>
154
155 \section SMPI_adapting_speed Toward faster simulations
156
157 If your application is too slow, try using SMPI_SAMPLE_LOCAL,
158 SMPI_SAMPLE_GLOBAL and friends to indicate which computation loops can
159 be sampled. Some of the loop iterations will be executed to measure
160 their duration, and this duration will be used for the subsequent
161 iterations. These samples are done per processor with
162 SMPI_SAMPLE_LOCAL, and shared between all processors with
163 SMPI_SAMPLE_GLOBAL. Of course, none of this will work if the execution
164 time of your loop iteration are not stable.
165
166 This feature is demoed by the example file 
167 <tt>examples/smpi/NAS/EP-sampling/ep.c</tt>
168
169
170 \section SMPI_collective_algorithms Simulating collective operations
171
172 MPI collective operations can be implemented very differently from one library 
173 to another. Actually, all existing libraries implement several algorithms 
174 for each collective operation, and by default select at runtime which one 
175 should be used for the current operation, depending on the sizes sent, the number
176  of nodes, the communicator, or the communication library being used. These 
177 decisions are based on empirical results and theoretical complexity estimation, 
178 but they can sometimes be suboptimal. Manual selection is possible in these cases, 
179 to allow the user to tune the library and use the better collective if the 
180 default one is not good enough.
181
182 SMPI tries to apply the same logic, regrouping algorithms from OpenMPI, MPICH 
183 libraries, StarMPI (<a href="http://star-mpi.sourceforge.net/">STAR-MPI</a>), and MVAPICH2 libraries.
184 This collection of more than 115 algorithms allows a simple and effective
185  comparison of their behavior and performance, making SMPI a tool of choice for the
186 development of such algorithms.
187
188 \subsection Tracing_internals Tracing of internal communications
189
190 For each collective, default tracing only outputs global data. 
191 Internal communication operations are not traced to avoid outputting too much data
192 to the trace. To debug and compare algorithm, this can be changed with the item 
193 \b tracing/smpi/internals , which has 0 for default value.
194 Here are examples of two alltoall collective algorithms runs on 16 nodes, 
195 the first one with a ring algorithm, the second with a pairwise one :
196
197 \htmlonly
198 <a href="smpi_simgrid_alltoall_ring_16.png" border=0><img src="smpi_simgrid_alltoall_ring_16.png" width="30%" border=0 align="center"></a>
199 <a href="smpi_simgrid_alltoall_pair_16.png" border=0><img src="smpi_simgrid_alltoall_pair_16.png" width="30%" border=0 align="center"></a>
200 <br/>
201 \endhtmlonly
202
203 \subsection Selectors
204
205 The default selection logic implemented by default in OpenMPI (version 1.7) 
206 and MPICH (version 3.0.4) has been replicated and can be used by setting the
207 \b smpi/coll_selector item to either ompi or mpich. A selector based on the selection logic of MVAPICH2 (version 1.9) tuned on the Stampede cluster as also been implemented, as well as a preliminary version of an Intel MPI selector (version 4.1.3, also tuned for the Stampede cluster). Due the closed source nature of Intel MPI, some of the algorithms described in the documentation are not available, and are replaced by mvapich ones.
208
209 Values for option \b smpi/coll_selector are :
210  - ompi
211  - mpich
212  - mvapich2
213  - impi
214  - default
215
216 The code and details for each 
217 selector can be found in the <tt>src/smpi/colls/smpi_(openmpi/mpich/mvapich2/impi)_selector.c</tt> file.
218 As this is still in development, we do not insure that all algorithms are correctly
219  replicated and that they will behave exactly as the real ones. If you notice a difference,
220 please contact <a href="http://lists.gforge.inria.fr/mailman/listinfo/simgrid-devel">SimGrid developers mailing list</a>
221
222 The default selector uses the legacy algorithms used in versions of SimGrid
223  previous to the 3.10. they should not be used to perform performance study and 
224 may be removed in the future, a different selector being used by default.
225
226 \subsection algos Available algorithms
227
228 For each one of the listed algorithms, several versions are available,
229  either coming from STAR-MPI, MPICH or OpenMPI implementations. Details can be
230  found in the code or in <a href="http://www.cs.arizona.edu/~dkl/research/papers/ics06.pdf">STAR-MPI</a> for STAR-MPI algorithms.
231
232 Each collective can be selected using the corresponding configuration item. For example, to use the pairwise alltoall algorithm, one should add \b --cfg=smpi/alltoall:pair to the line. This will override the selector (for this algorithm only) if provided, allowing better flexibility.
233
234 Warning: Some collective may require specific conditions to be executed correctly (for instance having a communicator with a power of two number of nodes only), which are currently not enforced by Simgrid. Some crashes can be expected while trying these algorithms with unusual sizes/parameters
235
236 \subsubsection MPI_Alltoall
237
238 Most of these are best described in <a href="http://www.cs.arizona.edu/~dkl/research/papers/ics06.pdf">STAR-MPI</a>
239
240  - default : naive one, by default
241  - ompi : use openmpi selector for the alltoall operations
242  - mpich : use mpich selector for the alltoall operations
243  - mvapich2 : use mvapich2 selector for the alltoall operations
244  - impi : use intel mpi selector for the alltoall operations
245  - automatic (experimental) : use an automatic self-benchmarking algorithm 
246  - 2dmesh : organizes the nodes as a two dimensional mesh, and perform allgather 
247 along the dimensions
248  - 3dmesh : adds a third dimension to the previous algorithm
249  - rdb : recursive doubling : extends the mesh to a nth dimension, each one 
250 containing two nodes
251  - pair : pairwise exchange, only works for power of 2 procs, size-1 steps,
252 each process sends and receives from the same process at each step
253  - pair_light_barrier : same, with small barriers between steps to avoid contention
254  - pair_mpi_barrier : same, with MPI_Barrier used
255  - pair_one_barrier : only one barrier at the beginning
256  - ring : size-1 steps, at each step a process send to process (n+i)%size, and receives from (n-i)%size
257  - ring_light_barrier : same, with small barriers between some phases to avoid contention
258  - ring_mpi_barrier : same, with MPI_Barrier used
259  - ring_one_barrier : only one barrier at the beginning
260  - basic_linear : posts all receives and all sends,
261 starts the communications, and waits for all communication to finish
262  - mvapich2_scatter_dest : isend/irecv with scattered destinations, posting only a few messages at the same time
263
264 \subsubsection MPI_Alltoallv
265
266  - default : naive one, by default
267  - ompi : use openmpi selector for the alltoallv operations
268  - mpich : use mpich selector for the alltoallv operations
269  - mvapich2 : use mvapich2 selector for the alltoallv operations
270  - impi : use intel mpi selector for the alltoallv operations
271  - automatic (experimental) : use an automatic self-benchmarking algorithm 
272  - bruck : same as alltoall
273  - pair : same as alltoall
274  - pair_light_barrier : same as alltoall
275  - pair_mpi_barrier : same as alltoall
276  - pair_one_barrier : same as alltoall
277  - ring : same as alltoall
278  - ring_light_barrier : same as alltoall
279  - ring_mpi_barrier : same as alltoall
280  - ring_one_barrier : same as alltoall
281  - ompi_basic_linear : same as alltoall
282
283
284 \subsubsection MPI_Gather
285
286  - default : naive one, by default
287  - ompi : use openmpi selector for the gather operations
288  - mpich : use mpich selector for the gather operations
289  - mvapich2 : use mvapich2 selector for the gather operations
290  - impi : use intel mpi selector for the gather operations
291  - automatic (experimental) : use an automatic self-benchmarking algorithm 
292 which will iterate over all implemented versions and output the best
293  - ompi_basic_linear : basic linear algorithm from openmpi, each process sends to the root
294  - ompi_binomial : binomial tree algorithm
295  - ompi_linear_sync : same as basic linear, but with a synchronization at the
296  beginning and message cut into two segments.
297  - mvapich2_two_level : SMP-aware version from MVAPICH. Gather first intra-node (defaults to mpich's gather), and then exchange with only one process/node. Use mvapich2 selector to change these to tuned algorithms for Stampede cluster.
298
299 \subsubsection MPI_Barrier
300  - default : naive one, by default
301  - ompi : use openmpi selector for the barrier operations
302  - mpich : use mpich selector for the barrier operations
303  - mvapich2 : use mvapich2 selector for the barrier operations
304  - impi : use intel mpi selector for the barrier operations
305  - automatic (experimental) : use an automatic self-benchmarking algorithm 
306  - ompi_basic_linear : all processes send to root
307  - ompi_two_procs : special case for two processes
308  - ompi_bruck : nsteps = sqrt(size), at each step, exchange data with rank-2^k and rank+2^k
309  - ompi_recursivedoubling : recursive doubling algorithm
310  - ompi_tree : recursive doubling type algorithm, with tree structure
311  - ompi_doublering : double ring algorithm
312  - mvapich2_pair : pairwise algorithm
313
314
315 \subsubsection MPI_Scatter
316  - default : naive one, by default
317  - ompi : use openmpi selector for the scatter operations
318  - mpich : use mpich selector for the scatter operations
319  - mvapich2 : use mvapich2 selector for the scatter operations
320  - impi : use intel mpi selector for the scatter operations
321  - automatic (experimental) : use an automatic self-benchmarking algorithm 
322  - ompi_basic_linear : basic linear scatter 
323  - ompi_binomial : binomial tree scatter
324  - mvapich2_two_level_direct : SMP aware algorithm, with an intra-node stage (default set to mpich selector), and then a basic linear inter node stage. Use mvapich2 selector to change these to tuned algorithms for Stampede cluster. 
325  - mvapich2_two_level_binomial : SMP aware algorithm, with an intra-node stage (default set to mpich selector), and then a binomial phase. Use mvapich2 selector to change these to tuned algorithms for Stampede cluster.
326
327
328
329 \subsubsection MPI_Reduce
330  - default : naive one, by default
331  - ompi : use openmpi selector for the reduce operations
332  - mpich : use mpich selector for the reduce operations
333  - mvapich2 : use mvapich2 selector for the reduce operations
334  - impi : use intel mpi selector for the reduce operations
335  - automatic (experimental) : use an automatic self-benchmarking algorithm 
336  - arrival_pattern_aware : root exchanges with the first process to arrive
337  - binomial : uses a binomial tree
338  - flat_tree : uses a flat tree
339  - NTSL : Non-topology-specific pipelined linear-bcast function 
340    0->1, 1->2 ,2->3, ....., ->last node : in a pipeline fashion, with segments
341  of 8192 bytes
342  - scatter_gather : scatter then gather
343  - ompi_chain : openmpi reduce algorithms are built on the same basis, but the
344  topology is generated differently for each flavor
345 chain = chain with spacing of size/2, and segment size of 64KB 
346  - ompi_pipeline : same with pipeline (chain with spacing of 1), segment size 
347 depends on the communicator size and the message size
348  - ompi_binary : same with binary tree, segment size of 32KB
349  - ompi_in_order_binary : same with binary tree, enforcing order on the 
350 operations
351  - ompi_binomial : same with binomial algo (redundant with default binomial 
352 one in most cases)
353  - ompi_basic_linear : basic algorithm, each process sends to root
354  - mvapich2_knomial : k-nomial algorithm. Default factor is 4 (mvapich2 selector adapts it through tuning)
355  - mvapich2_two_level : SMP-aware reduce, with default set to mpich both for intra and inter communicators. Use mvapich2 selector to change these to tuned algorithms for Stampede cluster.
356  - rab : <a href="https://fs.hlrs.de/projects/par/mpi//myreduce.html">Rabenseifner</a>'s reduce algorithm 
357
358 \subsubsection MPI_Allreduce
359  - default : naive one, by default
360  - ompi : use openmpi selector for the allreduce operations
361  - mpich : use mpich selector for the allreduce operations
362  - mvapich2 : use mvapich2 selector for the allreduce operations
363  - impi : use intel mpi selector for the allreduce operations
364  - automatic (experimental) : use an automatic self-benchmarking algorithm 
365  - lr : logical ring reduce-scatter then logical ring allgather
366  - rab1 : variations of the  <a href="https://fs.hlrs.de/projects/par/mpi//myreduce.html">Rabenseifner</a> algorithm : reduce_scatter then allgather
367  - rab2 : variations of the  <a href="https://fs.hlrs.de/projects/par/mpi//myreduce.html">Rabenseifner</a> algorithm : alltoall then allgather
368  - rab_rsag : variation of the  <a href="https://fs.hlrs.de/projects/par/mpi//myreduce.html">Rabenseifner</a> algorithm : recursive doubling 
369 reduce_scatter then recursive doubling allgather 
370  - rdb : recursive doubling
371  - smp_binomial : binomial tree with smp : binomial intra 
372 SMP reduce, inter reduce, inter broadcast then intra broadcast
373  - smp_binomial_pipeline : same with segment size = 4096 bytes
374  - smp_rdb : intra : binomial allreduce, inter : Recursive 
375 doubling allreduce, intra : binomial broadcast
376  - smp_rsag : intra : binomial allreduce, inter : reduce-scatter, 
377 inter:allgather, intra : binomial broadcast
378  - smp_rsag_lr : intra : binomial allreduce, inter : logical ring 
379 reduce-scatter, logical ring inter:allgather, intra : binomial broadcast
380  - smp_rsag_rab : intra : binomial allreduce, inter : rab
381 reduce-scatter, rab inter:allgather, intra : binomial broadcast
382  - redbcast : reduce then broadcast, using default or tuned algorithms if specified
383  - ompi_ring_segmented : ring algorithm used by OpenMPI
384  - mvapich2_rs : rdb for small messages, reduce-scatter then allgather else
385  - mvapich2_two_level : SMP-aware algorithm, with mpich as intra algoritm, and rdb as inter (Change this behavior by using mvapich2 selector to use tuned values)
386  - rab : default <a href="https://fs.hlrs.de/projects/par/mpi//myreduce.html">Rabenseifner</a> implementation
387
388 \subsubsection MPI_Reduce_scatter
389  - default : naive one, by default
390  - ompi : use openmpi selector for the reduce_scatter operations
391  - mpich : use mpich selector for the reduce_scatter operations
392  - mvapich2 : use mvapich2 selector for the reduce_scatter operations
393  - impi : use intel mpi selector for the reduce_scatter operations
394  - automatic (experimental) : use an automatic self-benchmarking algorithm 
395  - ompi_basic_recursivehalving : recursive halving version from OpenMPI
396  - ompi_ring : ring version from OpenMPI
397  - mpich_pair : pairwise exchange version from MPICH
398  - mpich_rdb : recursive doubling version from MPICH
399  - mpich_noncomm : only works for power of 2 procs, recursive doubling for noncommutative ops
400
401
402 \subsubsection MPI_Allgather
403
404  - default : naive one, by default
405  - ompi : use openmpi selector for the allgather operations
406  - mpich : use mpich selector for the allgather operations
407  - mvapich2 : use mvapich2 selector for the allgather operations
408  - impi : use intel mpi selector for the allgather operations
409  - automatic (experimental) : use an automatic self-benchmarking algorithm 
410  - 2dmesh : see alltoall
411  - 3dmesh : see alltoall
412  - bruck : Described by Bruck et.al. in <a href="http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=642949">
413 Efficient algorithms for all-to-all communications in multiport message-passing systems</a> 
414  - GB : Gather - Broadcast (uses tuned version if specified)
415  - loosely_lr : Logical Ring with grouping by core (hardcoded, default 
416 processes/node: 4)
417  - NTSLR : Non Topology Specific Logical Ring
418  - NTSLR_NB : Non Topology Specific Logical Ring, Non Blocking operations
419  - pair : see alltoall
420  - rdb : see alltoall
421  - rhv : only power of 2 number of processes
422  - ring : see alltoall
423  - SMP_NTS : gather to root of each SMP, then every root of each SMP node 
424 post INTER-SMP Sendrecv, then do INTRA-SMP Bcast for each receiving message, 
425 using logical ring algorithm (hardcoded, default processes/SMP: 8)
426  - smp_simple : gather to root of each SMP, then every root of each SMP node 
427 post INTER-SMP Sendrecv, then do INTRA-SMP Bcast for each receiving message, 
428 using simple algorithm (hardcoded, default processes/SMP: 8)
429  - spreading_simple : from node i, order of communications is i -> i + 1, i ->
430  i + 2, ..., i -> (i + p -1) % P
431  - ompi_neighborexchange : Neighbor Exchange algorithm for allgather. 
432 Described by Chen et.al. in  <a href="http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=1592302">Performance Evaluation of Allgather Algorithms on Terascale Linux Cluster with Fast Ethernet</a>
433  - mvapich2_smp : SMP aware algorithm, performing intra-node gather, inter-node allgather with one process/node, and bcast intra-node
434
435
436 \subsubsection MPI_Allgatherv
437  - default : naive one, by default
438  - ompi : use openmpi selector for the allgatherv operations
439  - mpich : use mpich selector for the allgatherv operations
440  - mvapich2 : use mvapich2 selector for the allgatherv operations
441  - impi : use intel mpi selector for the allgatherv operations
442  - automatic (experimental) : use an automatic self-benchmarking algorithm 
443  - GB : Gatherv - Broadcast (uses tuned version if specified, but only for 
444 Bcast, gatherv is not tuned)
445  - pair : see alltoall
446  - ring : see alltoall
447  - ompi_neighborexchange : see allgather
448  - ompi_bruck : see allgather
449  - mpich_rdb : recursive doubling algorithm from MPICH
450  - mpich_ring : ring algorithm from MPICh - performs differently from the 
451 one from STAR-MPI
452
453 \subsubsection MPI_Bcast
454  - default : naive one, by default
455  - ompi : use openmpi selector for the bcast operations
456  - mpich : use mpich selector for the bcast operations
457  - mvapich2 : use mvapich2 selector for the bcast operations
458  - impi : use intel mpi selector for the bcast operations
459  - automatic (experimental) : use an automatic self-benchmarking algorithm 
460  - arrival_pattern_aware : root exchanges with the first process to arrive
461  - arrival_pattern_aware_wait : same with slight variation
462  - binomial_tree : binomial tree exchange
463  - flattree : flat tree exchange
464  - flattree_pipeline : flat tree exchange, message split into 8192 bytes pieces
465  - NTSB : Non-topology-specific pipelined binary tree with 8192 bytes pieces
466  - NTSL : Non-topology-specific pipelined linear with 8192 bytes pieces
467  - NTSL_Isend : Non-topology-specific pipelined linear with 8192 bytes pieces, asynchronous communications
468  - scatter_LR_allgather : scatter followed by logical ring allgather
469  - scatter_rdb_allgather : scatter followed by recursive doubling allgather
470  - arrival_scatter : arrival pattern aware scatter-allgather
471  - SMP_binary : binary tree algorithm with 8 cores/SMP
472  - SMP_binomial : binomial tree algorithm with 8 cores/SMP
473  - SMP_linear : linear algorithm with 8 cores/SMP
474  - ompi_split_bintree : binary tree algorithm from OpenMPI, with message split in 8192 bytes pieces
475  - ompi_pipeline : pipeline algorithm from OpenMPI, with message split in 128KB pieces
476  - mvapich2_inter_node : Inter node default mvapich worker 
477  - mvapich2_intra_node : Intra node default mvapich worker
478  - mvapich2_knomial_intra_node :  k-nomial intra node default mvapich worker. default factor is 4.
479
480 \subsection auto Automatic evaluation 
481
482 (Warning : This is experimental and may be removed or crash easily)
483
484 An automatic version is available for each collective (or even as a selector). This specific 
485 version will loop over all other implemented algorithm for this particular collective, and apply 
486 them while benchmarking the time taken for each process. It will then output the quickest for 
487 each process, and the global quickest. This is still unstable, and a few algorithms which need 
488 specific number of nodes may crash.
489
490
491 \subsection add Add an algorithm
492
493 To add a new algorithm, one should check in the src/smpi/colls folder how other algorithms 
494 are coded. Using plain MPI code inside Simgrid can't be done, so algorithms have to be 
495 changed to use smpi version of the calls instead (MPI_Send will become smpi_mpi_send). Some functions may have different signatures than their MPI counterpart, please check the other algorithms or contact us using <a href="http://lists.gforge.inria.fr/mailman/listinfo/simgrid-devel">SimGrid developers mailing list</a>.
496
497 Example: adding a "pair" version of the Alltoall collective.
498
499  - Implement it in a file called alltoall-pair.c in the src/smpi/colls folder. This file should include colls_private.h.
500
501  - The name of the new algorithm function should be smpi_coll_tuned_alltoall_pair, with the same signature as MPI_Alltoall.
502
503  - Once the adaptation to SMPI code is done, add a reference to the file ("src/smpi/colls/alltoall-pair.c") in the SMPI_SRC part of the DefinePackages.cmake file inside buildtools/cmake, to allow the file to be built and distributed.
504
505  - To register the new version of the algorithm, simply add a line to the corresponding macro in src/smpi/colls/cools.h ( add a "COLL_APPLY(action, COLL_ALLTOALL_SIG, pair)" to the COLL_ALLTOALLS macro ). The algorithm should now be compiled and be selected when using --cfg=smpi/alltoall:pair at runtime.
506
507  - To add a test for the algorithm inside Simgrid's test suite, juste add the new algorithm name in the ALLTOALL_COLL list found inside teshsuite/smpi/CMakeLists.txt . When running ctest, a test for the new algorithm should be generated and executed. If it does not pass, please check your code or contact us.
508
509  - Feel free to push this new algorithm to the SMPI repository using Git.
510
511
512
513
514 */