Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove a couple of ugly things from DT.c
[simgrid.git] / doc / doxygen / module-smpi.doc
index f747121..ca273a2 100644 (file)
@@ -1,5 +1,7 @@
-/** @addtogroup SMPI_API
-
+/** 
+@defgroup SMPI_API      SMPI: Semulate real MPI applications
+@brief Programming environment for the simulation of MPI applications
+    
 This programming environment enables the study of MPI application by
 emulating them on top of the SimGrid simulator. This is particularly
 interesting to study existing MPI applications within the comfort of
@@ -30,8 +32,8 @@ may want to turn to the other SimGrid interfaces such as the
 \section SMPI_what What can run within SMPI?
 
 You can run unmodified MPI applications (both C and Fortran) within
-SMPI, provided that (1) you only use MPI calls that we implemented in
-MPI and (2) you don't use any globals in your application.
+SMPI, provided that you only use MPI calls that we implemented in
+MPI. Global variables should be handled correctly on Linux systems.
 
 \subsection SMPI_what_coverage MPI coverage of SMPI
 
@@ -48,7 +50,7 @@ feature, please get in touch with us: we can guide you though the
 SimGrid code to help you implementing it, and we'd glad to integrate
 it in the main project afterward if you contribute them back.
 
-\subsection SMPI_what_globals Issues with the globals
+\subsection SMPI_what_globals Global variables
 
 Concerning the globals, the problem comes from the fact that usually,
 MPI processes run as real UNIX processes while they are all folded
@@ -67,13 +69,20 @@ available at http://charm.cs.illinois.edu/newPapers/11-23/paper.pdf
 (note that this article does not deal with SMPI but with a concurrent
 solution called AMPI that suffers of the same issue). 
 
-Currently, we have no solution to offer you, because all proposed solutions will
-modify the performance of your application (in the computational
-sections). Sacrificing realism for usability is not very satisfying, so we did
-not implement them yet. You will thus have to modify your application if it uses
-global variables. We are working on another solution, leveraging distributed
-simulation to keep each MPI process within a separate system process, but this
-is far from being ready at the moment.
+A method using dynamic switching of the .data and .bss segments of an
+ELF executable has been introduced in SimGrid 3.11. By using the <tt>smpi/
+privatize_global_variableles</tt> option to yes, SMPI will duplicate
+the segments containing the global variables and when needed, will map 
+the right one in memory. This needs ELF executables and mmap on the system
+(Linux and recent BSDs should be compatible). %As no copy is involved, 
+performance should not be altered (but memory occupation will be higher).
+
+This solution actually works really good for a good number of MPI 
+applications. Its main limitation is that if the application loads dynamic 
+libraries, their global variables won't be privatized. This can be avoided 
+by linking statically with these libraries (but NOT with libsimgrid, as we 
+need SimGrid's own global varibles).
+
 
 \section SMPI_compiling Compiling your code
 
@@ -495,7 +504,7 @@ Example: adding a "pair" version of the Alltoall collective.
 
  - 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.
 
- - 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 buildtools/cmake/AddTests.cmake . 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.
+ - 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.
 
  - Feel free to push this new algorithm to the SMPI repository using Git.