Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 23 Sep 2018 23:38:59 +0000 (01:38 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 23 Sep 2018 23:38:59 +0000 (01:38 +0200)
16 files changed:
.gitignore
doc/doxygen/install.doc [deleted file]
doc/doxygen/install_yours.doc [deleted file]
doc/doxygen/options.doc [deleted file]
doc/doxygen/platform.doc
docs/source/app_smpi.rst [moved from doc/doxygen/module-smpi.doc with 66% similarity]
docs/source/application.rst
docs/source/conf.py
docs/source/img/smpi_simgrid_alltoall_pair_16.png [moved from doc/webcruft/smpi_simgrid_alltoall_pair_16.png with 100% similarity]
docs/source/img/smpi_simgrid_alltoall_ring_16.png [moved from doc/webcruft/smpi_simgrid_alltoall_ring_16.png with 100% similarity]
docs/source/intro_install.rst
docs/source/intro_yours.rst
docs/source/scenar_config.rst
docs/source/scenario.rst
docs/source/tuto_smpi.rst
tools/cmake/DefinePackages.cmake

index 7c407b5..d201609 100644 (file)
@@ -158,6 +158,7 @@ examples/s4u/app-masterworkers/s4u-app-masterworkers-class
 examples/s4u/app-masterworkers/s4u-app-masterworkers-fun
 examples/s4u/app-pingpong/s4u-app-pingpong
 examples/s4u/app-token-ring/s4u-app-token-ring
+examples/s4u/async-ready/s4u-async-ready
 examples/s4u/async-wait/s4u-async-wait
 examples/s4u/async-waitall/s4u-async-waitall
 examples/s4u/async-waitany/s4u-async-waitany
diff --git a/doc/doxygen/install.doc b/doc/doxygen/install.doc
deleted file mode 100644 (file)
index 8b474c7..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-/*! @page install Installing Simgrid
-
-@tableofcontents
-
-SimGrid should work out of the box on Linux, Mac OSX, FreeBSD, and Windows (under windows, only the Java interfaces are
-available at the moment).
-
-The easiest way to install SimGrid is to go for a @ref install_binary "binary package". Under Debian or Ubuntu, this is 
-very easy as SimGrid is directly integrated to the official repositories. For other Linux variants, you probably want 
-to go for a @ref install_src "source install". Please contact us if you want to contribute the build scripts for your 
-preferred distribution. If you just want to use @ref install_binary_java "Java", simply copy the jar file on your disk 
-and you're set.
-
-@section install_binary Pre-compiled Packages
-
-@subsection install_binary_linux Binaries for Linux
-
-Most of us use a Debian or Ubuntu system, so the packages for these
-systems are well integrated and up-to-date. To get these packages, simply type:
-
-@verbatim
-apt-get install simgrid
-@endverbatim
-
-@subsection install_binary_java Stable Java Package 
-
-For the SimGrid Java bindings, grab the jar file from the [download
-page](https://gforge.inria.fr/frs/?group_id=12) and copy it in your
-classpath (typically, your source code root directory). This
-self-contained version even includes the SimGrid native components for
-the following architectures: Linux (Amd64, x86, Arm), Mac OS X 64
-bits, Windows 64 bits, FreeBSD (64 bits).
-
-@subsection install_binary_java_builder Nightly built Java Package
-
-For Windows, head to [AppVeyor](https://ci.appveyor.com/project/simgrid/simgrid).
-Click on the artefact link on the right, and grab your file. If the latest build failed, there will be no artefact. Then
-you will need to first click on "History" on the top and search for the last successful build.
-
-For non-Windows systems (Linux, Mac or FreeBSD), head to [Jenkins](https://ci.inria.fr/simgrid/job/SimGrid).
-In the build history, pick the last green (or at least yellow) build that is not blinking (i.e., not currently under 
-build). In the list, pick a system that is close to yours, and click on the ball in the Debug row. The build artefact 
-will appear on the top of the resulting page.
-
-@subsection install_binary_java_troubleshooting Binary Java Troubleshooting
-
- - **Your architecture is not supported by this jarfile**. \n
-   If your system is in the list of the supported architectures (see
-   @ref install_binary_java "above"), then this is probably a bug that 
-   @ref contributing_bugs "you should report".\n
-   If your system is actually not supported, you should compile your
-   own jarfile @ref install_src "by compiling SimGrid" on your
-   machine. If you feel so, @ref community_contact "contact us" so that we add
-   your architecture to the list.
-
- - **Library not found: boost-context**.\n 
-   You should obviously install the @c boost-context library on your
-   machine, for example with @c apt-get.
-
-@section install_src Source Installs
-
-@subsection install_src_deps Getting the Dependencies
-
-Recompiling an official archive is not much more complex. SimGrid only uses very standard tools:
-  - C compiler, C++ compiler, make and friends. SimGrid is rather
-    demanding on the compiler. We use the C++11 standard, and older
-    compilers tend to fail on us. It seems that g++ 5.0 or higher is
-    required nowadays (because of boost). 
-    SimGrid compiles well with `clang` too.
-  - perl (but you may try to go without it)
-  - We use cmake to configure our compilation
-      ([download page](http://www.cmake.org/cmake/resources/software.html)).
-      You need cmake version 2.8.8 or higher. 
-      `ccmake` provides a nicer graphical interface compared to `cmake`.
-      Press `t` in `ccmake` if you need to see absolutely all
-      configuration options (e.g., if your python installation is not standard).
-  - boost:
-    - Debian / Ubuntu: `apt-get install libboost-dev libboost-context-dev`
-    - Max OS X: with [fink](http://www.finkproject.org/): `fink install boost1.53.nopython`,
-      or with homebrew: `brew install boost`
-  - Java (if you want to build the Java bindings): 
-    - Debian / Ubuntu: `apt-get install default-jdk libgcj17-dev` (any
-      version of libgcj will do it; you can use libgcj16-dev or libgcj18-dev
-      instead, depending on your version of Debian/Ubuntu)
-    - Mac OS X or Windows: Grab a [full JDK](http://www.oracle.com/technetwork/java/javase/downloads)
-  - Lua (if you want to build with lua enabled): Your version of Lua
-    must be 5.3. SimGrid won't work with Lua 5.2 nor with 5.1, and
-    probably not with Lua 5.4 either.
-    - Debian / Ubuntu: `apt-get install liblua5.3-dev lua5.3`
-    - Windows: choco install lua53
-    - From the source: you need to patch the sources to build dynamic libraries 
-      - [Download lua 5.3](http://www.lua.org/download.html). SimGrid
-        won't work with lua 5.2 as lua breaks the compatibility.
-      - Open the archive: `tar xvfz lua-5.3.*.tar.gz`
-      - Enter the directory: `cd lua-5.3*`
-      - Patch the sources: `patch -p1 < /path/to/simgrid/...../tools/lualib.patch`
-      - Build and install lua: `make linux && sudo make install`
-
-For platform-specific details, please see  @ref install_cmake_mac,
-@ref install_cmake_windows, @ref install_java and @ref install_src_32bits
-
-@subsection install_src_fetch Getting the Sources
-
-You can download the *@SimGridRelease.tar.gz* archive from the 
-[download page](https://gforge.inria.fr/frs/?group_id=12).
-Then, recompiling the archive should be done in a few lines:
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.sh}
-tar xf @SimGridRelease.tar.gz
-cd @SimGridRelease
-cmake -DCMAKE_INSTALL_PREFIX=/opt/simgrid .
-make
-make install
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-If you want to stay on the bleeding edge, you should get the latest git version, and recompile it as you would do for 
-an official archive. Depending on the files you change in the source tree, some extra tools may be needed.
-
-@verbatim
-git clone git://scm.gforge.inria.fr/simgrid/simgrid.git simgrid
-@endverbatim
-
-@subsection install_src_config Build Configuration
-
-This section is about *compile-time options*, that are very different
-from @ref options "run-time options". Compile-time options fall into
-two categories. @ref install_cmake_list "SimGrid-specific options"
-define which part of the framework to compile while 
-@ref install_cmake_howto "generic options" are provided by cmake
-itself. 
-
-@subsubsection install_cmake_howto Generic build-time options
-
-These options specify for example the path to various system elements
-(Python path, compiler to use, etc). In most case, cmake automatically
-discovers the right value for these ones, but you can set them
-manually on need.  Notable such variables include @c CC and @c CXX,
-defining respectively the C and C++ compiler executables, @c CFLAGS
-and @c CXXFLAGS respectively specifying extra options to pass to the C
-and C++ compilers, or @c PYTHON_EXECUTABLE specifying the path to the
-python executable.  The best way to discover the exact name of the
-option that you need to change is to press 't' in the ccmake graphical
-interface, as all options are shown (and documented) in the advanced
-mode.
-
-Once you know their name, there is several ways to change the value of
-build-time options. You can naturally use the ccmake graphical
-interface for that, or you can use environment variables, or you can
-prefer the @c -D flag of @c cmake.
-
-For example, you can change the compilers with environment variables
-by issuing these commands before launching cmake:
-
-@verbatim
-export CC=gcc-5.1
-export CXX=g++-5.1
-@endverbatim
-
-The same can be done by passing @c -D parameters to cmake, as follows.
-Note that the ending dot is mandatory (see @ref install_cmake_outsrc).
-
-@verbatim
-cmake -DCC=clang -DCXX=clang++ .
-@endverbatim
-
-@subsubsection install_cmake_list SimGrid compilation options
-
-Here is the list of SimGrid-specific @ref install_src_config
-"build-time options".
-
-  @li <b>CMAKE_INSTALL_PREFIX</b> (path): Where to install SimGrid (/opt/simgrid, /usr/local, or elsewhere).
-
-  @li <b>enable_compile_optimizations</b> (ON/OFF) to request the compiler to produce efficient code. You want to 
-      activate it, unless you plan to debug SimGrid itself. Indeed, efficient code may be appear mangled to debuggers.
-
-  @li <b>enable_compile_warnings</b> (ON/OFF) to request the compiler to issue error messages whenever the source code
-      is not perfectly clean. If you are a SimGrid developer, you have to activate this option to enforce the code 
-      quality. As a regular user, this option will bring you nothing.
-
-  @li <b>enable_debug</b> (ON/OFF). Disable this option toto discard
-      all log messages of gravity debug or below at compile time (see
-      @ref XBT_log). The resulting code is faster than if you
-      discarding these messages at runtime. However, it obviously
-      becomes impossible to get any debug info from SimGrid if
-      something goes wrong.
-
-  @li <b>enable_documentation</b> (ON/OFF) to generate the documentation pages.
-
-  @li <b>enable_java</b> (ON/OFF) to enjoy the java bindings of SimGrid.
-
-  @li <b>enable_jedule</b> (ON/OFF) to get SimDag producing execution traces that can then be visualized with the 
-      Jedule external tool.
-
-  @li <b>enable_lua</b> (ON/OFF) to enjoy the lua bindings to the
-      SimGrid internals (this require the liblua5.3-dev and lua-5.3 packages or equivalent).
-
-  @li <b>enable_lib_in_jar</b> (ON/OFF) to make sure that the native
-      java bindings are bundled in the jar file.
-
-  @li <b>enable_lto</b> (ON/OFF) to enable the Link Time Optimization
-      of the C compiler. This feature really speeds up the produced
-      code, but it is fragile with some versions of GCC.
-
-  @li <b>enable_maintainer_mode</b> (ON/OFF) is only needed if you plan to modify very specific parts of SimGrid
-      (e.g., the XML parsers and other related elements). Moreover, this adds an extra dependency on flex and flexml.
-
-  @li <b>enable_mallocators</b> (ON/OFF) has to be disabled when tracking memory issues within SimGrid, 
-      or our internal memory caching mechanism will fool the debuggers.
-
-  @li <b>enable_model-checking</b> (ON/OFF) This execution gear
-      is very usable now, but enabling this option at compile time
-      will **hinder simulation speed** even when the model-checker is
-      not activated at run time.
-
-  @li <b>enable_ns3</b> (ON/OFF) if you want to use ns-3. See section @ref pls_ns3.
-
-  @li <b>enable_smpi</b> (ON/OFF) to run MPI code on top of SimGrid.
-
-  @li <b>enable_smpi_ISP_testsuite</b> (ON/OFF) to add many extra
-      tests for the model-checker module.
-
-  @li <b>enable_smpi_MPICH3_testsuite</b> (ON/OFF) to add many extra
-      tests for the MPI module.
-
-@subsubsection install_cmake_reset Reset the build configuration
-
-To empty the cmake cache (either when you add a new library or when
-things go seriously wrong), simply delete your @c CMakeCache.txt. You
-may also want to directly edit this file in some circumstances.
-
-@subsubsection install_cmake_outsrc Out of Tree Compilation
-
-By default, the files produced during the compilation are placed in
-the source directory. It is however often better to put them all in a
-separate directory: cleaning the tree becomes as easy as removing this
-directory, and you can have several such directories to test several
-parameter sets or architectures.
-
-For that, go to the directory where the files should be produced, and
-invoke cmake (or ccmake) with the full path to the SimGrid source as
-last argument.
-
-@verbatim
-mkdir build
-cd build
-cmake [options] ..
-make
-@endverbatim
-
-@subsubsection install_cmake_mac Mac OS X Builds
-
-SimGrid compiles like a charm with clang (version 3.0 or higher) on Mac OS X:
-
-@verbatim
-cmake -DCMAKE_C_COMPILER=/path/to/clang -DCMAKE_CXX_COMPILER=/path/to/clang++ .
-make
-@endverbatim
-
-With the XCode version of clang 4.1, you may get the following error message:
-@verbatim
-CMake Error: Parse error in cache file build_dir/CMakeCache.txt. Offending entry: /SDKs/MacOSX10.8.sdk
-@endverbatim
-
-In that case, edit the CMakeCache.txt file directly, so that the
-CMAKE_OSX_SYSROOT is similar to the following. Don't worry about the
-warning that the "-pthread" argument is not used, if it appears.
-@verbatim
-CMAKE_OSX_SYSROOT:PATH=/Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
-@endverbatim
-
-In the El Capitan version of Max OS X, Apple decided that users don't
-need no /usr/include directory anymore. If you are hit by this pure
-madness, just run the following command to restore that classical
-UNIX directory: `xcode-select -install`
-
-@subsubsection install_cmake_windows Windows Builds
-
-Building SimGrid on Windows may be something of an adventure:
-We only manage to  do so ourselves with MinGW-64, <a
-href="http://www.activestate.com/activeperl/downloads">ActiveState</a>
-Perl and <a href="http://msysgit.googlecode.com/files/Git-1.7.4-preview20110204.exe">msys</a>
-git). Have a look at out configuration scripts in @c appveyor.yml, but
-don't expect too much  from us: we are really not fluent with Windows.
-Actually your help is welcome.
-
-The drawback of MinGW-64 is that the produced DLL are not compatible
-with MS Visual C. <a href="http://clang.llvm.org/docs/MSVCCompatibility.html">clang-cl</a>
-sounds promising to fix this. If you get something working, please
-@ref community_contact "tell us".
-
-@subsubsection install_java Build the Java bindings
-
-Once you have the [full JDK](http://www.oracle.com/technetwork/java/javase/downloads) installed
-(on Debian/Ubuntu, grab the package ```default-jdk``` for that), things should be as simple as:
-
-~~~~{.sh}
-cmake -Denable_java=ON .
-make 
-~~~~
-
-After the compilation, the file ```simgrid.jar``` is produced in the
-root directory. If you only want to build the jarfile and its
-dependencies, type ```make simgrid-java_jar```. It will save you the
-time of building every C examples and other things that you don't need
-for Java.
-
-** **Error: jni could not be found**. Sometimes, the build system fails
-to find the JNI headers. In this case, you need to first locate them as follows:
-
-~~~~{.sh}
-$ locate jni.h
-/usr/lib/jvm/java-7-openjdk-amd64/include/jni.h
-/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h
-~~~~
-
-Then, set the JAVA_INCLUDE_PATH environment variable to the right
-path, and relaunch cmake. If you have several version of jni installed
-(as above), use the right one (check the java version you use with
-```javac -version```).
-
-~~~~{.sh}
-export JAVA_INCLUDE_PATH=/usr/lib/jvm/java-8-openjdk-amd64/include/
-cmake -Denable_java=ON .
-make
-~~~~
-
-Note that the filename ```jni.h``` was removed from the path.
-
-@subsubsection install_src_32bits 32 bits Builds on Multi-arch Linux
-
-On a multiarch x86_64 Linux, it should be possible to compile a 32 bit
-version of SimGrid with something like:
-
-@verbatim
-CFLAGS=-m32 \
-CXXFLAGS=-m32 \
-PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig/ \
-cmake . \
--DCMAKE_SYSTEM_PROCESSOR=i386 \
--DCMAKE_Fortran_COMPILER=/some/path/to/i686-linux-gnu-gfortran \
--DGFORTRAN_EXE=/some/path/to/i686-linux-gnu-gfortran \
--DCMAKE_Fortran_FLAGS=-m32
-@endverbatim
-
-If needed, implement @c i686-linux-gnu-gfortran as a script:
-
-@verbatim
-#!/usr/bin/env sh
-exec gfortran -m32 "$@"
-@endverbatim
-
-@subsection install_src_compil Existing Compilation Targets
-
-In most cases, compiling and installing SimGrid is enough:
-
-@verbatim
-make
-make install # try "sudo make install" if you don't have the permission to write
-@endverbatim
-
-In addition, several compilation targets are provided in SimGrid. If
-your system is well configured, the full list of targets is available
-for completion when using the Tab key. Note that some of the existing
-targets are not really for public consumption so don't worry if some
-stuff doesn't work for you.
-
-@verbatim
-make simgrid                   Build only the SimGrid library and not any example
-make app-masterworker          Build only this example (works for any example)
-make clean                     Clean the results of a previous compilation
-make install                   Install the project (doc/ bin/ lib/ include/)
-make uninstall                 Uninstall the project (doc/ bin/ lib/ include/)
-make dist                      Build a distribution archive (tgz)
-make distcheck                 Check the dist (make + make dist + tests on the distribution)
-make documentation             Create SimGrid documentation
-@endverbatim
-
-If you want to see what is really happening, try adding VERBOSE=1 to
-your compilation requests:
-
-@verbatim
-make VERBOSE=1
-@endverbatim
-
-@subsection install_src_test Testing your build
-
-Once everything is built, you may want to test the result. SimGrid
-comes with an extensive set of regression tests (as described in the
-@ref inside_tests "insider manual"). The tests are run with @c ctest, that comes with CMake.
-We run them every commit and the results are on [our
-Jenkins](https://ci.inria.fr/simgrid/).
-
-@verbatim
-ctest                    # Launch all tests
-ctest -R msg              # Launch only the tests which name match the string "msg"
-ctest -j4                 # Launch all tests in parallel, at most 4 at the same time
-ctest --verbose           # Display all details on what's going on
-ctest --output-on-failure # Only get verbose for the tests that fail
-
-ctest -R msg- -j5 --output-on-failure # You changed MSG and want to check that you didn't break anything, huh?
-                                      # That's fine, I do so all the time myself.
-@endverbatim
-
-*/
diff --git a/doc/doxygen/install_yours.doc b/doc/doxygen/install_yours.doc
deleted file mode 100644 (file)
index 1046f52..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/*! @page install_yours Setup your own project
-
-@tableofcontents
-
-It is not advised to modify the simgrid source code directly, as it
-will make it difficult to upgrade to the next version of SimGrid.
-Instead, you should create your own working directory somewhere on
-your disk (say `/home/joe/MyFirstScheduler/`), and write your code in
-there. 
-
-Then, you should find a solution to get your code compiled and linked
-to the SimGrid library as needed. This page helps you to do so with
-several tools: 
-@ref install_yours_cmake "CMake" and
-@ref install_yours_makefile "Makefile."
-If you configure your project with a tool that is not listed here,
-we'd be glad to hear how you've done that to extend this
-documentation.
-
-@section install_yours_cmake Building your project with CMake
-
-Here is a `CMakeLists.txt` that you can use as a starting point for
-your project. It builds two simulators from a given set of source files.
-
-@verbatim
-project(MyFirstScheduler)
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
-find_package(SimGrid REQUIRED)
-include_directories(${SimGrid_INCLUDE_DIR})
-
-set(SIMULATOR_SOURCES main.c other.c util.c)
-add_executable(my_simulator ${SIMULATOR_SOURCES})
-target_link_libraries(my_simulator ${SimGrid_LIBRARY})
-
-set(OTHER_SOURCES blah.c bar.c foo.h)
-add_executable(other_xp ${OTHER_SOURCES})
-target_link_libraries(other_xp ${SimGrid_LIBRARY})
-@endverbatim
-
-For that, you need <a href="https://github.com/simgrid/simgrid/blob/master/FindSimGrid.cmake">FindSimGrid.cmake</a>,
-that is located at the root of the SimGrid tree. You can either copy
-this file into the `cmake/Modules` directory of your project, or use
-the version installed on the disk. Both solutions present advantages
-and drawback: if you copy the file, you have to keep it in sync
-manually but your project will produce relevant error messages when
-trying to compile on a machine where SimGrid is not installed. Please
-also refer to the file header for more information.
-
-@section install_yours_makefile Building your project with Makefile
-
-Here is a Makefile that will work if your project is composed of three
-C files named @c util.h, @c util.c and @c mysimulator.c. You should
-take it as a starting point, and adapt it to your code. There is a
-plenty of documentation and tutorial on Makefile if the file's
-comments are not enough for you.
-
-@verbatim
-# The first rule of a Makefile is the default target. It will be built when make is called with no parameter
-# Here, we want to build the binary 'mysimulator'
-all: mysimulator
-
-# This second rule lists the dependencies of the mysimulator binary
-# How this dependencies are linked is described in an implicit rule below
-mysimulator: mysimulator.o util.o
-
-# These third give the dependencies of the each source file
-mysimulator.o: mysimulator.c util.h # list every .h that you use
-util.o: util.c util.h
-
-# Some configuration
-SIMGRID_INSTALL_PATH = /opt/simgrid # Where you installed simgrid
-CC = gcc                            # Your compiler
-WARNING = -Wshadow -Wcast-align -Waggregate-return -Wmissing-prototypes \
-          -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes \
-          -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls \
-          -Wnested-externs -Wpointer-arith -Wwrite-strings -finline-functions
-
-# CFLAGS = -g -O0 $(WARNINGS) # Use this line to make debugging easier
-CFLAGS = -g -O2 $(WARNINGS) # Use this line to get better performance
-
-# No change should be mandated past that line
-#############################################
-# The following are implicit rules, used by default to actually build
-# the targets for which you listed the dependencies above.
-
-# The blanks before the $(CC) must be a Tab char, not spaces
-%: %.o
-       $(CC) -L$(SIMGRID_INSTALL_PATH)/lib/    $(CFLAGS) $^ -lsimgrid -o $@
-%.o: %.c
-       $(CC) -I$(SIMGRID_INSTALL_PATH)/include $(CFLAGS) -c -o $@ $<
-
-clean:
-       rm -f *.o *~
-.PHONY: clean
-@endverbatim
-
-@section install_yours_cppeclipsedevenv Develop in C++ with SimGrid with Eclipse
-
-If you wish to develop your plugin or modify SimGrid using Eclipse. You have to run cmake and import it as a Makefile project. 
-
-Next you have to activate C++11 in your build settings, add -std=c++11 in the CDT GCC Built-in compiler settings.
-
-![Eclipse preference page.](eclipseScreenShot.png)
-
-@section install_yours_javaexample  Building the Java examples in Eclipse
-
-If you want to build our Java examples in Eclipse, get the whole
-source code and open the archive on your disk. In Eclipse, select
-the menu "File / Import", and then in the wizard "General / Existing
-Project into Workspace". On the Next page, select the directory
-"examples/java" that you can find in the SimGrid source tree as a root
-directory and finish the creation.
-
-The file \c simgrid.jar must be in the root directory of the SimGrid
-tree. That's where it is built by default, but if you don't want to
-compile it yourself, just grab that file from the SimGrid website and
-copy it in here.
-
-Please note that once you better understand SimGrid, you should not
-modify the examples directly but instead create your own project in
-eclipse. This will make it easier to upgrade to another version of
-SimGrid.
-
-@section install_yours_trouble Troubleshooting your project setup
-
-@subsection install_yours_trouble_libpath error while loading shared libraries: libsimgrid.so
-
-Sometimes, the following error message (or similar) will be produced:
-@verbatim
-./masterworker1: error while loading shared libraries: libsimgrid.so:
-cannot open shared object file: No such file or directory
-@endverbatim
-
-The same problem can make the execution of your programs spit pages
-and pages of errors similar to the following. If there is only a few
-undefined references, then you want to read the next section.
-@verbatim
-masterworker.c:209: undefined reference to `sg_version_check'
-masterworker.c:209: undefined reference to `MSG_init_nocheck'
-(and many other undefined references)
-@endverbatim
-
-In both cases, it means that the system does not manage to find the
-simgrid library when it tries to execute your programs. Under Linux,
-specify where to search with the <tt>LD_LIBRARY_PATH</tt> variable.
-Try running the following command before executing your code. If it
-helps, you should add this line to your ~/.bashrc so that it gets
-executed each time you log into your computer.
-
-@verbatim
-export LD_LIBRARY_PATH=/opt/simgrid/lib
-@endverbatim
-
-@subsection install_yours_trouble_oldlib Only a few undefined references
-
-Sometimes, the compilation only spits very few "undefined reference"
-errors. A possible cause is that the system selected an old version of
-the SimGrid library somewhere on your disk. 
-
-Under Linux, you can find which version was used with the following
-command that will display the full path to every used dynamic library.
-Once you've found the obsolete copy of SimGrid, just erase it, and
-recompile and relaunch your program.
-@verbatim ldd yoursimulator
-@endverbatim
-
-
-*/
diff --git a/doc/doxygen/options.doc b/doc/doxygen/options.doc
deleted file mode 100644 (file)
index 34bec89..0000000
+++ /dev/null
@@ -1,1342 +0,0 @@
-/*! @page options Configure SimGrid
-
-@htmlonly
-<div align="center">
-@endhtmlonly
-@htmlinclude graphical-toc.svg
-@htmlonly
-</div>
-<script>
-document.getElementById("Config").style="opacity:0.93999999;fill:#ff0000;fill-opacity:0.1;stroke:#000000;stroke-width:0.35277778;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1";
-</script>
-@endhtmlonly
-
-A number of options can be given at runtime to change the default
-SimGrid behavior. For a complete list of all configuration options
-accepted by the SimGrid version used in your simulator, simply pass
-the --help configuration flag to your program. If some of the options
-are not documented on this page, this is a bug that you should please
-report so that we can fix it. Note that some of the options presented
-here may not be available in your simulators, depending on the
-@ref install_src_config "compile-time options" that you used.
-
-@tableofcontents
-
-@section options_using Passing configuration options to the simulators
-
-There is several way to pass configuration options to the simulators.
-The most common way is to use the @c --cfg command line argument. For
-example, to set the item @c Item to the value @c Value, simply
-type the following: @verbatim
-my_simulator --cfg=Item:Value (other arguments)
-@endverbatim
-
-Several @c `--cfg` command line arguments can naturally be used. If you
-need to include spaces in the argument, don't forget to quote the
-argument. You can even escape the included quotes (write @' for ' if
-you have your argument between ').
-
-Another solution is to use the @c @<config@> tag in the platform file. The
-only restriction is that this tag must occure before the first
-platform element (be it @c @<AS@>, @c @<cluster@>, @c @<peer@> or whatever).
-The @c @<config@> tag takes an @c id attribute, but it is currently
-ignored so you don't really need to pass it. The important par is that
-within that tag, you can pass one or several @c @<prop@> tags to specify
-the configuration to use. For example, setting @c Item to @c Value
-can be done by adding the following to the beginning of your platform
-file:
-@verbatim
-<config>
-  <prop id="Item" value="Value"/>
-</config>
-@endverbatim
-
-A last solution is to pass your configuration directly using the C
-interface. If you happen to use the MSG interface, this is very easy
-with the simgrid::s4u::Engine::setConfig() or MSG_config() functions. If you do not use MSG, that's a bit
-more complex, as you have to mess with the internal configuration set
-directly as follows. Check the @ref XBT_config "relevant page" for
-details on all the functions you can use in this context, @c
-_sg_cfg_set being the only configuration set currently used in
-SimGrid.
-
-@code
-#include <xbt/config.h>
-
-int main(int argc, char *argv[]) {
-     SD_init(&argc, argv);
-
-     /* Prefer MSG_config() if you use MSG!! */
-     xbt_cfg_set_parse("Item:Value");
-
-     // Rest of your code
-}
-@endcode
-
-@section options_index Index of all existing configuration options
-
-@note
-  The full list can be retrieved by passing "--help" and
-     "--help-cfg" to an executable that uses SimGrid.
-
-- @c clean-atexit: @ref options_generic_clean_atexit
-
-- @c contexts/factory: @ref options_virt_factory
-- @c contexts/guard-size: @ref options_virt_guard_size
-- @c contexts/nthreads: @ref options_virt_parallel
-- @c contexts/parallel-threshold: @ref options_virt_parallel
-- @c contexts/stack-size: @ref options_virt_stacksize
-- @c contexts/synchro: @ref options_virt_parallel
-
-- @c cpu/maxmin-selective-update: @ref options_model_optim
-- @c cpu/model: @ref options_model_select
-- @c cpu/optim: @ref options_model_optim
-
-- @c exception/cutpath: @ref options_exception_cutpath
-
-- @c host/model: @ref options_model_select
-
-- @c maxmin/precision: @ref options_model_precision
-- @c maxmin/concurrency-limit: @ref options_concurrency_limit
-
-- @c msg/debug-multiple-use: @ref options_msg_debug_multiple_use
-
-- @c model-check: @ref options_modelchecking
-- @c model-check/checkpoint: @ref options_modelchecking_steps
-- @c model-check/communications-determinism: @ref options_modelchecking_comm_determinism
-- @c model-check/dot-output: @ref options_modelchecking_dot_output
-- @c model-check/hash: @ref options_modelchecking_hash
-- @c model-check/property: @ref options_modelchecking_liveness
-- @c model-check/max-depth: @ref options_modelchecking_max_depth
-- @c model-check/record: @ref options_modelchecking_recordreplay
-- @c model-check/reduction: @ref options_modelchecking_reduction
-- @c model-check/replay: @ref options_modelchecking_recordreplay
-- @c model-check/send-determinism: @ref options_modelchecking_comm_determinism
-- @c model-check/sparse-checkpoint: @ref options_modelchecking_sparse_checkpoint
-- @c model-check/termination: @ref options_modelchecking_termination
-- @c model-check/timeout: @ref options_modelchecking_timeout
-- @c model-check/visited: @ref options_modelchecking_visited
-
-- @c network/bandwidth-factor: @ref options_model_network_coefs
-- @c network/crosstraffic: @ref options_model_network_crosstraffic
-- @c network/latency-factor: @ref options_model_network_coefs
-- @c network/maxmin-selective-update: @ref options_model_optim
-- @c network/model: @ref options_model_select
-- @c network/optim: @ref options_model_optim
-- @c network/TCP-gamma: @ref options_model_network_gamma
-- @c network/weight-S: @ref options_model_network_coefs
-
-- @c ns3/TcpModel: @ref options_pls
-- @c path: @ref options_generic_path
-- @c plugin: @ref options_generic_plugin
-
-- @c simix/breakpoint: @ref options_generic_breakpoint
-
-- @c storage/max_file_descriptors: @ref option_model_storage_maxfd
-
-- @c surf/precision: @ref options_model_precision
-
-- <b>For collective operations of SMPI, please refer to Section @ref options_index_smpi_coll</b>
-- @c smpi/async-small-thresh: @ref options_model_network_asyncsend
-- @c smpi/bw-factor: @ref options_model_smpi_bw_factor
-- @c smpi/coll-selector: @ref options_model_smpi_collectives
-- @c smpi/comp-adjustment-file: @ref options_model_smpi_adj_file
-- @c smpi/cpu-threshold: @ref options_smpi_bench
-- @c smpi/display-timing: @ref options_smpi_timing
-- @c smpi/grow-injected-times: @ref options_model_smpi_test
-- @c smpi/host-speed: @ref options_smpi_bench
-- @c smpi/IB-penalty-factors: @ref options_model_network_coefs
-- @c smpi/iprobe: @ref options_model_smpi_iprobe
-- @c smpi/iprobe-cpu-usage: @ref options_model_smpi_iprobe_cpu_usage
-- @c smpi/init: @ref options_model_smpi_init
-- @c smpi/keep-temps: @ref options_smpi_temps
-- @c smpi/lat-factor: @ref options_model_smpi_lat_factor
-- @c smpi/ois: @ref options_model_smpi_ois
-- @c smpi/or: @ref options_model_smpi_or
-- @c smpi/os: @ref options_model_smpi_os
-- @c smpi/papi-events: @ref options_smpi_papi_events
-- @c smpi/privatization: @ref options_smpi_privatization
-- @c smpi/privatize-libs: @ref options_smpi_privatize_libs
-- @c smpi/send-is-detached-thresh: @ref options_model_smpi_detached
-- @c smpi/shared-malloc: @ref options_model_smpi_shared_malloc
-- @c smpi/shared-malloc-hugepage: @ref options_model_smpi_shared_malloc
-- @c smpi/simulate-computation: @ref options_smpi_bench
-- @c smpi/test: @ref options_model_smpi_test
-- @c smpi/wtime: @ref options_model_smpi_wtime
-
-- <b>Tracing configuration options can be found in Section @ref tracing_tracing_options</b>.
-
-- @c storage/model: @ref options_storage_model
-- @c verbose-exit: @ref options_generic_exit
-
-- @c vm/model: @ref options_vm_model
-
-@subsection options_index_smpi_coll Index of SMPI collective algorithms options
-
-TODO: All available collective algorithms will be made available via the ``smpirun --help-coll`` command.
-
-@section options_model Configuring the platform models
-
-@anchor options_storage_model
-@anchor options_vm_model
-@subsection options_model_select Selecting the platform models
-
-SimGrid comes with several network, CPU and storage models built in, and you
-can change the used model at runtime by changing the passed
-configuration. The three main configuration items are given below.
-For each of these items, passing the special @c help value gives
-you a short description of all possible values. Also, @c --help-models
-should provide information about all models for all existing resources.
-   - @b network/model: specify the used network model
-   - @b cpu/model: specify the used CPU model
-   - @b host/model: specify the used host model
-   - @b storage/model: specify the used storage model (there is currently only one such model - this option is hence only useful for future releases)
-   - @b vm/model: specify the model for virtual machines (there is currently only one such model - this option is hence only useful for future releases)
-
-As of writing, the following network models are accepted. Over
-the time new models can be added, and some experimental models can be
-removed; check the values on your simulators for an uptodate
-information. Note that the CM02 model is described in the research report
-<a href="ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR2002/RR2002-40.ps.gz">A
-Network Model for Simulation of Grid Application</a> while LV08 is
-described in
-<a href="http://mescal.imag.fr/membres/arnaud.legrand/articles/simutools09.pdf">Accuracy Study and Improvement of Network Simulation in the SimGrid Framework</a>.
-
-  - @b LV08 (default one): Realistic network analytic model
-    (slow-start modeled by multiplying latency by 13.01, bandwidth by
-    .97; bottleneck sharing uses a payload of S=20537 for evaluating RTT)
-  - @anchor options_model_select_network_constant @b Constant: Simplistic network model where all communication
-    take a constant time (one second). This model provides the lowest
-    realism, but is (marginally) faster.
-  - @b SMPI: Realistic network model specifically tailored for HPC
-    settings (accurate modeling of slow start with correction factors on
-    three intervals: < 1KiB, < 64 KiB, >= 64 KiB). See also @ref
-    options_model_network_coefs "this section" for more info.
-  - @b IB: Realistic network model specifically tailored for HPC
-    settings with InfiniBand networks (accurate modeling contention
-    behavior, based on the model explained in
-    http://mescal.imag.fr/membres/jean-marc.vincent/index.html/PhD/Vienne.pdf).
-    See also @ref options_model_network_coefs "this section" for more info.
-  - @b CM02: Legacy network analytic model (Very similar to LV08, but
-    without corrective factors. The timings of small messages are thus
-    poorly modeled)
-  - @b Reno: Model from Steven H. Low using lagrange_solve instead of
-    lmm_solve (experts only; check the code for more info).
-  - @b Reno2: Model from Steven H. Low using lagrange_solve instead of
-    lmm_solve (experts only; check the code for more info).
-  - @b Vegas: Model from Steven H. Low using lagrange_solve instead of
-    lmm_solve (experts only; check the code for more info).
-
-If you compiled SimGrid accordingly, you can use packet-level network
-simulators as network models (see @ref pls_ns3). In that case, you have
-two extra models, described below, and some 
-@ref options_pls "specific additional configuration flags".
-  - @b NS3: Network pseudo-model using the NS3 tcp model
-
-Concerning the CPU, we have only one model for now:
-  - @b Cas01: Simplistic CPU model (time=size/power)
-
-The host concept is the aggregation of a CPU with a network
-card. Three models exists, but actually, only 2 of them are
-interesting. The "compound" one is simply due to the way our internal
-code is organized, and can easily be ignored. So at the end, you have
-two host models: The default one allows to aggregate an
-existing CPU model with an existing network model, but does not allow
-parallel tasks because these beasts need some collaboration between
-the network and CPU model. That is why, ptask_07 is used by default
-when using SimDag.
-  - @b default: Default host model. Currently, CPU:Cas01 and
-    network:LV08 (with cross traffic enabled)
-  - @b compound: Host model that is automatically chosen if
-    you change the network and CPU models
-  - @b ptask_L07: Host model somehow similar to Cas01+CM02 but
-    allowing "parallel tasks", that are intended to model the moldable
-    tasks of the grid scheduling literature.
-
-@subsection options_generic_plugin Plugins
-
-SimGrid plugins allow to extend the framework without changing its
-source code directly. Read the source code of the existing plugins to
-learn how to do so (in ``src/plugins``), and ask your questions to the
-usual channels (Stack Overflow, Mailing list, IRC). The basic idea is
-that plugins usually register callbacks to some signals of interest.
-If they need to store some information about a given object (Link, CPU
-or Actor), they do so through the use of a dedicated object extension.
-
-Some of the existing plugins can be activated from the command line,
-meaning that you can activate them from the command line without any
-modification to your simulation code. For example, you can activate
-the host energy plugin by adding the following to your command line:
-
-@verbatim
-    --cfg=plugin:host_energy
-@endverbatim
-
-Here is the full list of plugins that can be activated this way:
-
- - @b host_energy: keeps track of the energy dissipated by
-   computations. More details in @ref plugin_energy.
- - @b link_energy: keeps track of the energy dissipated by
-   communications. More details in @ref SURF_plugin_energy.
- - @b host_load: keeps track of the computational load. 
-   More details in @ref plugin_load.
-
-@subsection options_model_optim Optimization level of the platform models
-
-The network and CPU models that are based on lmm_solve (that
-is, all our analytical models) accept specific optimization
-configurations.
-  - items @b network/optim and @b cpu/optim (both default to 'Lazy'):
-    - @b Lazy: Lazy action management (partial invalidation in lmm +
-      heap in action remaining).
-    - @b TI: Trace integration. Highly optimized mode when using
-      availability traces (only available for the Cas01 CPU model for
-      now).
-    - @b Full: Full update of remaining and variables. Slow but may be
-      useful when debugging.
-  - items @b network/maxmin-selective-update and
-    @b cpu/maxmin-selective-update: configure whether the underlying
-    should be lazily updated or not. It should have no impact on the
-    computed timings, but should speed up the computation.
-
-It is still possible to disable the @c maxmin-selective-update feature
-because it can reveal counter-productive in very specific scenarios
-where the interaction level is high. In particular, if all your
-communication share a given backbone link, you should disable it:
-without @c maxmin-selective-update, every communications are updated
-at each step through a simple loop over them. With that feature
-enabled, every communications will still get updated in this case
-(because of the dependency induced by the backbone), but through a
-complicated pattern aiming at following the actual dependencies.
-
-@subsection options_model_precision Numerical precision of the platform models
-
-The analytical models handle a lot of floating point values. It is
-possible to change the epsilon used to update and compare them through
-the @b maxmin/precision item (default value: 0.00001). Changing it
-may speedup the simulation by discarding very small actions, at the
-price of a reduced numerical precision.
-
-@subsection options_concurrency_limit Concurrency limit
-
-The maximum number of variables per resource can be tuned through
-the @b maxmin/concurrency-limit item. The default value is -1, meaning that
-there is no such limitation. You can have as many simultaneous actions per
-resources as you want. If your simulation presents a very high level of
-concurrency, it may help to use e.g. 100 as a value here. It means that at
-most 100 actions can consume a resource at a given time. The extraneous actions
-are queued and wait until the amount of concurrency of the considered resource
-lowers under the given boundary.
-
-Such limitations help both to the simulation speed and simulation accuracy
-on highly constrained scenarios, but the simulation speed suffers of this
-setting on regular (less constrained) scenarios so it is off by default.
-
-@subsection options_model_network Configuring the Network model
-
-@subsubsection options_model_network_gamma Maximal TCP window size
-
-The analytical models need to know the maximal TCP window size to take
-the TCP congestion mechanism into account. This is set to 4194304 by
-default, but can be changed using the @b network/TCP-gamma item.
-
-On linux, this value can be retrieved using the following
-commands. Both give a set of values, and you should use the last one,
-which is the maximal size.@verbatim
-cat /proc/sys/net/ipv4/tcp_rmem # gives the sender window
-cat /proc/sys/net/ipv4/tcp_wmem # gives the receiver window
-@endverbatim
-
-@subsubsection options_model_network_coefs Correcting important network parameters
-
-SimGrid can take network irregularities such as a slow startup or
-changing behavior depending on the message size into account.
-You should not change these values unless you really know what you're doing.
-
-The corresponding values were computed through data fitting one the
-timings of packet-level simulators.
-
-See
-<a href="http://mescal.imag.fr/membres/arnaud.legrand/articles/simutools09.pdf">Accuracy Study and Improvement of Network Simulation in the SimGrid Framework</a>
-for more information about these parameters.
-
-If you are using the SMPI model, these correction coefficients are
-themselves corrected by constant values depending on the size of the
-exchange. Again, only hardcore experts should bother about this fact.
-
-InfiniBand network behavior can be modeled through 3 parameters, as explained in
-<a href="http://mescal.imag.fr/membres/jean-marc.vincent/index.html/PhD/Vienne.pdf">this PhD thesis</a>.
-These factors can be changed through the following option:
-
-@verbatim
-smpi/IB-penalty-factors:"βe;βs;γs"
-@endverbatim
-
-By default SMPI uses factors computed on the Stampede Supercomputer at TACC, with optimal
-deployment of processes on nodes.
-
-@subsubsection options_model_network_crosstraffic Simulating cross-traffic
-
-As of SimGrid v3.7, cross-traffic effects can be taken into account in
-analytical simulations. It means that ongoing and incoming
-communication flows are treated independently. In addition, the LV08
-model adds 0.05 of usage on the opposite direction for each new
-created flow. This can be useful to simulate some important TCP
-phenomena such as ack compression.
-
-For that to work, your platform must have two links for each
-pair of interconnected hosts. An example of usable platform is
-available in <tt>examples/platforms/crosstraffic.xml</tt>.
-
-This is activated through the @b network/crosstraffic item, that
-can be set to 0 (disable this feature) or 1 (enable it).
-
-Note that with the default host model this option is activated by default.
-
-@subsubsection options_model_network_asyncsend Simulating asyncronous send
-
-(this configuration item is experimental and may change or disapear)
-
-It is possible to specify that messages below a certain size will be sent
-as soon as the call to MPI_Send is issued, without waiting for the
-correspondant receive. This threshold can be configured through the
-@b smpi/async-small-thresh item. The default value is 0. This behavior can also be
-manually set for MSG mailboxes, by setting the receiving mode of the mailbox
-with a call to @ref MSG_mailbox_set_async . For MSG, all messages sent to this
-mailbox will have this behavior, so consider using two mailboxes if needed.
-
-This value needs to be smaller than or equals to the threshold set at
-@ref options_model_smpi_detached , because asynchronous messages are
-meant to be detached as well.
-
-@subsubsection options_pls Configuring packet-level pseudo-models
-
-When using the packet-level pseudo-models, several specific
-configuration flags are provided to configure the associated tools.
-There is by far not enough such SimGrid flags to cover every aspects
-of the associated tools, since we only added the items that we
-needed ourselves. Feel free to request more items (or even better:
-provide patches adding more items).
-
-When using NS3, the only existing item is @b ns3/TcpModel,
-corresponding to the ns3::TcpL4Protocol::SocketType configuration item
-in NS3. The only valid values (enforced on the SimGrid side) are
-'NewReno' or 'Reno' or 'Tahoe'.
-
-@subsection options_model_storage Configuring the Storage model
-
-@subsubsection option_model_storage_maxfd Maximum amount of file descriptors per host
-
-Each host maintains a fixed-size array of its file descriptors. You
-can change its size (1024 by default) through the @b
-storage/max_file_descriptors item to either enlarge it if your
-application requires it or to reduce it to save memory space.
-
-@section options_modelchecking Configuring the Model-Checking
-
-To enable the SimGrid model-checking support the program should
-be executed using the simgrid-mc wrapper:
-@verbatim
-simgrid-mc ./my_program
-@endverbatim
-
-Safety properties are expressed as assertions using the function
-@verbatim
-void MC_assert(int prop);
-@endverbatim
-
-@subsection options_modelchecking_liveness Specifying a liveness property
-
-If you want to specify liveness properties (beware, that's
-experimental), you have to pass them on the command line, specifying
-the name of the file containing the property, as formatted by the
-ltl2ba program.
-
-@verbatim
---cfg=model-check/property:<filename>
-@endverbatim
-
-@subsection options_modelchecking_steps Going for stateful verification
-
-By default, the system is backtracked to its initial state to explore
-another path instead of backtracking to the exact step before the fork
-that we want to explore (this is called stateless verification). This
-is done this way because saving intermediate states can rapidly
-exhaust the available memory. If you want, you can change the value of
-the <tt>model-check/checkpoint</tt> variable. For example, the
-following configuration will ask to take a checkpoint every step.
-Beware, this will certainly explode your memory. Larger values are
-probably better, make sure to experiment a bit to find the right
-setting for your specific system.
-
-@verbatim
---cfg=model-check/checkpoint:1
-@endverbatim
-
-@subsection options_modelchecking_reduction Specifying the kind of reduction
-
-The main issue when using the model-checking is the state space
-explosion. To counter that problem, several exploration reduction
-techniques can be used. There is unfortunately no silver bullet here,
-and the most efficient reduction techniques cannot be applied to any
-properties. In particular, the DPOR method cannot be applied on
-liveness properties since it may break some cycles in the exploration
-that are important to the property validity.
-
-@verbatim
---cfg=model-check/reduction:<technique>
-@endverbatim
-
-For now, this configuration variable can take 2 values:
- * none: Do not apply any kind of reduction (mandatory for now for
-   liveness properties)
- * dpor: Apply Dynamic Partial Ordering Reduction. Only valid if you
-   verify local safety properties (default value for safety checks).
-
-@subsection options_modelchecking_visited model-check/visited, Cycle detection
-
-In order to detect cycles, the model-checker needs to check if a new explored
-state is in fact the same state than a previous one. For that,
-the model-checker can take a snapshot of each visited state: this snapshot is
-then used to compare it with subsequent states in the exploration graph.
-
-The @b model-check/visited option is the maximum number of states which are stored in
-memory. If the maximum number of snapshotted state is reached, some states will
-be removed from the memory and some cycles might be missed. Small
-values can lead to incorrect verifications, but large value can
-exhaust your memory, so choose carefully.
-
-By default, no state is snapshotted and cycles cannot be detected.
-
-@subsection options_modelchecking_termination model-check/termination, Non termination detection
-
-The @b model-check/termination configuration item can be used to report if a
-non-termination execution path has been found. This is a path with a cycle
-which means that the program might never terminate.
-
-This only works in safety mode.
-
-This options is disabled by default.
-
-@subsection options_modelchecking_dot_output model-check/dot-output, Dot output
-
-If set, the @b model-check/dot-output configuration item is the name of a file
-in which to write a dot file of the path leading the found property (safety or
-liveness violation) as well as the cycle for liveness properties. This dot file
-can then fed to the graphviz dot tool to generate an corresponding graphical
-representation.
-
-@subsection options_modelchecking_max_depth model-check/max-depth, Depth limit
-
-The @b model-checker/max-depth can set the maximum depth of the exploration
-graph of the model-checker. If this limit is reached, a logging message is
-sent and the results might not be exact.
-
-By default, there is not depth limit.
-
-@subsection options_modelchecking_timeout Handling of timeout
-
-By default, the model-checker does not handle timeout conditions: the `wait`
-operations never time out. With the @b model-check/timeout configuration item
-set to @b yes, the model-checker will explore timeouts of `wait` operations.
-
-@subsection options_modelchecking_comm_determinism Communication determinism
-
-The @b model-check/communications-determinism and
-@b model-check/send-determinism items can be used to select the communication
-determinism mode of the model-checker which checks determinism properties of
-the communications of an application.
-
-@subsection options_modelchecking_sparse_checkpoint Per page checkpoints
-
-When the model-checker is configured to take a snapshot of each explored state
-(with the @b model-checker/visited item), the memory consumption can rapidly
-reach GiB ou Tib of memory. However, for many workloads, the memory does not
-change much between different snapshots and taking a complete copy of each
-snapshot is a waste of memory.
-
-The @b model-check/sparse-checkpoint option item can be set to @b yes in order
-to avoid making a complete copy of each snapshot: instead, each snapshot will be
-decomposed in blocks which will be stored separately.
-If multiple snapshots share the same block (or if the same block
-is used in the same snapshot), the same copy of the block will be shared leading
-to a reduction of the memory footprint.
-
-For many applications, this option considerably reduces the memory consumption.
-In somes cases, the model-checker might be slightly slower because of the time
-taken to manage the metadata about the blocks. In other cases however, this
-snapshotting strategy will be much faster by reducing the cache consumption.
-When the memory consumption is important, by avoiding to hit the swap or
-reducing the swap usage, this option might be much faster than the basic
-snapshotting strategy.
-
-This option is currently disabled by default.
-
-@subsection options_mc_perf Performance considerations for the model checker
-
-The size of the stacks can have a huge impact on the memory
-consumption when using model-checking. By default, each snapshot will
-save a copy of the whole stacks and not only of the part which is
-really meaningful: you should expect the contribution of the memory
-consumption of the snapshots to be @f$ @mbox{number of processes}
-@times @mbox{stack size} @times @mbox{number of states} @f$.
-
-The @b model-check/sparse-checkpoint can be used to reduce the memory
-consumption by trying to share memory between the different snapshots.
-
-When compiled against the model checker, the stacks are not
-protected with guards: if the stack size is too small for your
-application, the stack will silently overflow on other parts of the
-memory (see @ref options_virt_guard_size).
-
-@subsection options_modelchecking_hash Hashing of the state (experimental)
-
-Usually most of the time of the model-checker is spent comparing states. This
-process is complicated and consumes a lot of bandwidth and cache.
-In order to speedup the state comparison, the experimental @b model-checker/hash
-configuration item enables the computation of a hash summarizing as much
-information of the state as possible into a single value. This hash can be used
-to avoid most of the comparisons: the costly comparison is then only used when
-the hashes are identical.
-
-Currently most of the state is not included in the hash because the
-implementation was found to be buggy and this options is not as useful as
-it could be. For this reason, it is currently disabled by default.
-
-@subsection options_modelchecking_recordreplay Record/replay (experimental)
-
-As the model-checker keeps jumping at different places in the execution graph,
-it is difficult to understand what happens when trying to debug an application
-under the model-checker. Event the output of the program is difficult to
-interpret. Moreover, the model-checker does not behave nicely with advanced
-debugging tools such as valgrind. For those reason, to identify a trajectory
-in the execution graph with the model-checker and replay this trajcetory and
-without the model-checker black-magic but with more standard tools
-(such as a debugger, valgrind, etc.). For this reason, Simgrid implements an
-experimental record/replay functionnality in order to record a trajectory with
-the model-checker and replay it without the model-checker.
-
-When the model-checker finds an interesting path in the application execution
-graph (where a safety or liveness property is violated), it can generate an
-identifier for this path. In order to enable this behavious the
-@b model-check/record must be set to @b yes. By default, this behaviour is not
-enabled.
-
-This is an example of output:
-
-<pre>
-[  0.000000] (0:@) Check a safety property
-[  0.000000] (0:@) **************************
-[  0.000000] (0:@) *** PROPERTY NOT VALID ***
-[  0.000000] (0:@) **************************
-[  0.000000] (0:@) Counter-example execution trace:
-[  0.000000] (0:@) Path = 1/3;1/4
-[  0.000000] (0:@) [(1)Tremblay (app)] MC_RANDOM(3)
-[  0.000000] (0:@) [(1)Tremblay (app)] MC_RANDOM(4)
-[  0.000000] (0:@) Expanded states = 27
-[  0.000000] (0:@) Visited states = 68
-[  0.000000] (0:@) Executed transitions = 46
-</pre>
-
-This path can then be replayed outside of the model-checker (and even in
-non-MC build of simgrid) by setting the @b model-check/replay item to the given
-path. The other options should be the same (but the model-checker should
-be disabled).
-
-The format and meaning of the path may change between different releases so
-the same release of Simgrid should be used for the record phase and the replay
-phase.
-
-@section options_virt Configuring the User Process Virtualization
-
-@subsection options_virt_factory Selecting the virtualization factory
-
-In SimGrid, the user code is virtualized in a specific mechanism
-that allows the simulation kernel to control its execution: when a user
-process requires a blocking action (such as sending a message), it is
-interrupted, and only gets released when the simulated clock reaches
-the point where the blocking operation is done. This is explained
-graphically in the [relevant tutorial, available online](http://simgrid.gforge.inria.fr/tutorials/simgrid-simix-101.pdf).
-
-In SimGrid, the containers in which user processes are virtualized are
-called contexts. Several context factory are provided, and you can
-select the one you want to use with the @b contexts/factory
-configuration item. Some of the following may not exist on your
-machine because of portability issues. In any case, the default one
-should be the most effcient one (please report bugs if the
-auto-detection fails for you). They are approximately sorted here from
-the slowest to the most efficient:
-
- - @b thread: very slow factory using full featured threads (either
-   pthreads or windows native threads). They are slow but very
-   standard. Some debuggers or profilers only work with this factory.
- - @b java: Java applications are virtualized onto java threads (that
-   are regular pthreads registered to the JVM)
- - @b ucontext: fast factory using System V contexts (Linux and FreeBSD only)
- - @b boost: This uses the [context implementation](http://www.boost.org/doc/libs/1_59_0/libs/context/doc/html/index.html)
-   of the boost library for a performance that is comparable to our
-   raw implementation.@n Install the relevant library (e.g. with the
-   libboost-contexts-dev package on Debian/Ubuntu) and recompile
-   SimGrid. Note that our implementation is not compatible with recent
-   implementations of the library, and it will be hard to fix this since
-   the library's author decided to hide an API that we were using.
- - @b raw: amazingly fast factory using a context switching mechanism
-   of our own, directly implemented in assembly (only available for x86
-   and amd64 platforms for now) and without any unneeded system call.
-
-The main reason to change this setting is when the debugging tools get
-fooled by the optimized context factories. Threads are the most
-debugging-friendly contextes, as they allow to set breakpoints
-anywhere with gdb and visualize backtraces for all processes, in order
-to debug concurrency issues. Valgrind is also more comfortable with
-threads, but it should be usable with all factories (but the callgrind
-tool that really don't like raw and ucontext factories).
-
-@subsection options_virt_stacksize Adapting the used stack size
-
-Each virtualized used process is executed using a specific system
-stack. The size of this stack has a huge impact on the simulation
-scalability, but its default value is rather large. This is because
-the error messages that you get when the stack size is too small are
-rather disturbing: this leads to stack overflow (overwriting other
-stacks), leading to segfaults with corrupted stack traces.
-
-If you want to push the scalability limits of your code, you might
-want to reduce the @b contexts/stack-size item. Its default value
-is 8192 (in KiB), while our Chord simulation works with stacks as small
-as 16 KiB, for example. For the thread factory, the default value
-is the one of the system but you can still change it with this parameter.
-
-The operating system should only allocate memory for the pages of the
-stack which are actually used and you might not need to use this in
-most cases. However, this setting is very important when using the
-model checker (see @ref options_mc_perf).
-
-@subsection options_virt_guard_size Disabling stack guard pages
-
-A stack guard page is usually used which prevents the stack of a given
-actor from overflowing on another stack. But the performance impact
-may become prohibitive when the amount of actors increases.  The
-option @b contexts:guard-size is the number of stack guard pages used.
-By setting it to 0, no guard pages will be used: in this case, you
-should avoid using small stacks (@b stack-size) as the stack will
-silently overflow on other parts of the memory.
-
-When no stack guard page is created, stacks may then silently overflow
-on other parts of the memory if their size is too small for the
-application. This happens:
-
-- on Windows systems;
-- when the model checker is enabled;
-- and of course when guard pages are explicitely disabled (with @b contexts:guard-size=0).
-
-@subsection options_virt_parallel Running user code in parallel
-
-Parallel execution of the user code is only considered stable in
-SimGrid v3.7 and higher, and mostly for MSG simulations. SMPI
-simulations may well fail in parallel mode. It is described in
-<a href="http://hal.inria.fr/inria-00602216/">INRIA RR-7653</a>.
-
-If you are using the @c ucontext or @c raw context factories, you can
-request to execute the user code in parallel. Several threads are
-launched, each of them handling as much user contexts at each run. To
-actiave this, set the @b contexts/nthreads item to the amount of
-cores that you have in your computer (or lower than 1 to have
-the amount of cores auto-detected).
-
-Even if you asked several worker threads using the previous option,
-you can request to start the parallel execution (and pay the
-associated synchronization costs) only if the potential parallelism is
-large enough. For that, set the @b contexts/parallel-threshold
-item to the minimal amount of user contexts needed to start the
-parallel execution. In any given simulation round, if that amount is
-not reached, the contexts will be run sequentially directly by the
-main thread (thus saving the synchronization costs). Note that this
-option is mainly useful when the grain of the user code is very fine,
-because our synchronization is now very efficient.
-
-When parallel execution is activated, you can choose the
-synchronization schema used with the @b contexts/synchro item,
-which value is either:
- - @b futex: ultra optimized synchronisation schema, based on futexes
-   (fast user-mode mutexes), and thus only available on Linux systems.
-   This is the default mode when available.
- - @b posix: slow but portable synchronisation using only POSIX
-   primitives.
- - @b busy_wait: not really a synchronisation: the worker threads
-   constantly request new contexts to execute. It should be the most
-   efficient synchronisation schema, but it loads all the cores of your
-   machine for no good reason. You probably prefer the other less
-   eager schemas.
-
-@section options_tracing Configuring the tracing subsystem
-
-The @ref outcomes_vizu "tracing subsystem" can be configured in several
-different ways depending on the nature of the simulator (MSG, SimDag,
-SMPI) and the kind of traces that need to be obtained. See the @ref
-tracing_tracing_options "Tracing Configuration Options subsection" to
-get a detailed description of each configuration option.
-
-We detail here a simple way to get the traces working for you, even if
-you never used the tracing API.
-
-
-- Any SimGrid-based simulator (MSG, SimDag, SMPI, ...) and raw traces:
-@verbatim
---cfg=tracing:yes --cfg=tracing/uncategorized:yes --cfg=triva/uncategorized:uncat.plist
-@endverbatim
-    The first parameter activates the tracing subsystem, the second
-    tells it to trace host and link utilization (without any
-    categorization) and the third creates a graph configuration file
-    to configure Triva when analysing the resulting trace file.
-
-- MSG or SimDag-based simulator and categorized traces (you need to declare categories and classify your tasks according to them)
-@verbatim
---cfg=tracing:yes --cfg=tracing/categorized:yes --cfg=triva/categorized:cat.plist
-@endverbatim
-    The first parameter activates the tracing subsystem, the second
-    tells it to trace host and link categorized utilization and the
-    third creates a graph configuration file to configure Triva when
-    analysing the resulting trace file.
-
-- SMPI simulator and traces for a space/time view:
-@verbatim
-smpirun -trace ...
-@endverbatim
-    The <i>-trace</i> parameter for the smpirun script runs the
-simulation with --cfg=tracing:yes and --cfg=tracing/smpi:yes. Check the
-smpirun's <i>-help</i> parameter for additional tracing options.
-
-Sometimes you might want to put additional information on the trace to
-correctly identify them later, or to provide data that can be used to
-reproduce an experiment. You have two ways to do that:
-
-- Add a string on top of the trace file as comment:
-@verbatim
---cfg=tracing/comment:my_simulation_identifier
-@endverbatim
-
-- Add the contents of a textual file on top of the trace file as comment:
-@verbatim
---cfg=tracing/comment-file:my_file_with_additional_information.txt
-@endverbatim
-
-Please, use these two parameters (for comments) to make reproducible
-simulations. For additional details about this and all tracing
-options, check See the @ref tracing_tracing_options.
-
-@section options_msg Configuring MSG
-
-@subsection options_msg_debug_multiple_use Debugging MSG
-
-Sometimes your application may try to send a task that is still being
-executed somewhere else, making it impossible to send this task. However,
-for debugging purposes, one may want to know what the other host is/was
-doing. This option shows a backtrace of the other process.
-
-Enable this option by adding
-
-@verbatim
---cfg=msg/debug-multiple-use:on
-@endverbatim
-
-@section options_smpi Configuring SMPI
-
-The SMPI interface provides several specific configuration items.
-These are uneasy to see since the code is usually launched through the
-@c smiprun script directly.
-
-@subsection options_smpi_bench smpi/bench: Automatic benchmarking of SMPI code
-
-In SMPI, the sequential code is automatically benchmarked, and these
-computations are automatically reported to the simulator. That is to
-say that if you have a large computation between a @c MPI_Recv() and a
-@c MPI_Send(), SMPI will automatically benchmark the duration of this
-code, and create an execution task within the simulator to take this
-into account. For that, the actual duration is measured on the host
-machine and then scaled to the power of the corresponding simulated
-machine. The variable @b smpi/host-speed allows to specify the
-computational speed of the host machine (in flop/s) to use when
-scaling the execution times. It defaults to 20000, but you really want
-to update it to get accurate simulation results.
-
-When the code is constituted of numerous consecutive MPI calls, the
-previous mechanism feeds the simulation kernel with numerous tiny
-computations. The @b smpi/cpu-threshold item becomes handy when this
-impacts badly the simulation performance. It specifies a threshold (in
-seconds) below which the execution chunks are not reported to the
-simulation kernel (default value: 1e-6).
-
-@note
-    The option smpi/cpu-threshold ignores any computation time spent
-    below this threshold. SMPI does not consider the @a amount of these
-    computations; there is no offset for this. Hence, by using a
-    value that is too low, you may end up with unreliable simulation
-    results.
-
-In some cases, however, one may wish to disable simulation of
-application computation. This is the case when SMPI is used not to
-simulate an MPI applications, but instead an MPI code that performs
-"live replay" of another MPI app (e.g., ScalaTrace's replay tool,
-various on-line simulators that run an app at scale). In this case the
-computation of the replay/simulation logic should not be simulated by
-SMPI. Instead, the replay tool or on-line simulator will issue
-"computation events", which correspond to the actual MPI simulation
-being replayed/simulated. At the moment, these computation events can
-be simulated using SMPI by calling internal smpi_execute*() functions.
-
-To disable the benchmarking/simulation of computation in the simulated
-application, the variable @b smpi/simulate-computation should be set to no.
-
-@note
-    This option just ignores the timings in your simulation; it still executes
-    the computations itself. If you want to stop SMPI from doing that,
-    you should check the SMPI_SAMPLE macros, documented in the section
-    @ref SMPI_adapting_speed.
-
-Solution                           | Computations actually executed? | Computations simulated ?
----------------------------------- | ------------------------------- | ------------------------
---cfg=smpi/simulate-computation:no | Yes                             | No, never
---cfg=smpi/cpu-threshold:42        | Yes, in all cases               | Only if it lasts more than 42 seconds
-SMPI_SAMPLE() macro                | Only once per loop nest (see @ref SMPI_adapting_speed "documentation") | Always
-
-@subsection options_model_smpi_adj_file smpi/comp-adjustment-file: Slow-down or speed-up parts of your code.
-
-This option allows you to pass a file that contains two columns: The first column
-defines the section that will be subject to a speedup; the second column is the speedup.
-
-For instance:
-
-@verbatim
-"start:stop","ratio"
-"exchange_1.f:30:exchange_1.f:130",1.18244559422142
-@endverbatim
-
-The first line is the header - you must include it.
-The following line means that the code between two consecutive MPI calls on
-line 30 in exchange_1.f and line 130 in exchange_1.f should receive a speedup
-of 1.18244559422142. The value for the second column is therefore a speedup, if it is
-larger than 1 and a slow-down if it is smaller than 1. Nothing will be changed if it is
-equal to 1.
-
-Of course, you can set any arbitrary filenames you want (so the start and end don't have to be
-in the same file), but be aware that this mechanism only supports @em consecutive calls!
-
-@note
-    Please note that you must pass the @b -trace-call-location flag to smpicc
-    or smpiff, respectively! This flag activates some macro definitions in our
-    mpi.h / mpi.f files that help with obtaining the call location.
-
-@subsection options_model_smpi_bw_factor smpi/bw-factor: Bandwidth factors
-
-The possible throughput of network links is often dependent on the
-message sizes, as protocols may adapt to different message sizes. With
-this option, a series of message sizes and factors are given, helping
-the simulation to be more realistic. For instance, the current
-default value is
-
-@verbatim
-65472:0.940694;15424:0.697866;9376:0.58729;5776:1.08739;3484:0.77493;1426:0.608902;732:0.341987;257:0.338112;0:0.812084
-@endverbatim
-
-So, messages with size 65472 and more will get a total of MAX_BANDWIDTH*0.940694,
-messages of size 15424 to 65471 will get MAX_BANDWIDTH*0.697866 and so on.
-Here, MAX_BANDWIDTH denotes the bandwidth of the link.
-
-@note
-    The SimGrid-Team has developed a script to help you determine these
-    values. You can find more information and the download here:
-    1. http://simgrid.gforge.inria.fr/contrib/smpi-calibration-doc.html
-    2. http://simgrid.gforge.inria.fr/contrib/smpi-saturation-doc.html
-
-@subsection options_smpi_timing smpi/display-timing: Reporting simulation time
-
-@b Default: 0 (false)
-
-Most of the time, you run MPI code with SMPI to compute the time it
-would take to run it on a platform. But since the
-code is run through the @c smpirun script, you don't have any control
-on the launcher code, making it difficult to report the simulated time
-when the simulation ends. If you set the @b smpi/display-timing item
-to 1, @c smpirun will display this information when the simulation ends. @verbatim
-Simulation time: 1e3 seconds.
-@endverbatim
-
-@subsection options_smpi_temps smpi/keep-temps: not cleaning up after simulation
-
-@b Default: 0 (false)
-
-Under some conditions, SMPI generates a lot of temporary files.  They
-usually get cleaned, but you may use this option to not erase these
-files. This is for example useful when debugging or profiling
-executions using the dlopen privatization schema, as missing binary
-files tend to fool the debuggers.
-
-@subsection options_model_smpi_lat_factor smpi/lat-factor: Latency factors
-
-The motivation and syntax for this option is identical to the motivation/syntax
-of smpi/bw-factor, see @ref options_model_smpi_bw_factor for details.
-
-There is an important difference, though: While smpi/bw-factor @a reduces the
-actual bandwidth (i.e., values between 0 and 1 are valid), latency factors
-increase the latency, i.e., values larger than or equal to 1 are valid here.
-
-This is the default value:
-
-@verbatim
-65472:11.6436;15424:3.48845;9376:2.59299;5776:2.18796;3484:1.88101;1426:1.61075;732:1.9503;257:1.95341;0:2.01467
-@endverbatim
-
-@note
-    The SimGrid-Team has developed a script to help you determine these
-    values. You can find more information and the download here:
-    1. http://simgrid.gforge.inria.fr/contrib/smpi-calibration-doc.html
-    2. http://simgrid.gforge.inria.fr/contrib/smpi-saturation-doc.html
-
-@subsection options_smpi_papi_events smpi/papi-events: Trace hardware counters with PAPI
-
-@warning 
-    This option is experimental and will be subject to change.
-    This feature currently requires superuser privileges, as registers are queried.
-    Only use this feature with code you trust! Call smpirun for instance via
-        smpirun -wrapper "sudo " <your-parameters>
-    or run sudo sh -c "echo 0 > /proc/sys/kernel/perf_event_paranoid"
-    In the later case, sudo will not be required.
-
-@note
-    This option is only available when SimGrid was compiled with PAPI support.
-
-This option takes the names of PAPI counters and adds their respective values
-to the trace files. (See Section @ref tracing_tracing_options.)
-
-It is planned to make this feature available on a per-process (or per-thread?) basis.
-The first draft, however, just implements a "global" (i.e., for all processes) set
-of counters, the "default" set.
-
-@verbatim
---cfg=smpi/papi-events:"default:PAPI_L3_LDM:PAPI_L2_LDM"
-@endverbatim
-
-@subsection options_smpi_privatization smpi/privatization: Automatic privatization of global variables
-
-MPI executables are usually meant to be executed in separated
-processes, but SMPI is executed in only one process. Global variables
-from executables will be placed in the same memory zone and shared
-between processes, causing intricate bugs.  Several options are
-possible to avoid this, as described in the main
-<a href="https://hal.inria.fr/hal-01415484">SMPI publication</a> and in
-the @ref SMPI_what_globals "SMPI documentation". SimGrid provides two
-ways of automatically privatizing the globals, and this option allows
-to choose between them.
-
-  - <b>no</b> (default when not using smpirun): Do not automatically privatize variables.
-    Pass @c -no-privatize to smpirun to disable this feature.
-  - <b>dlopen</b> or <b>yes</b> (default when using smpirun): Link multiple times against the binary.
-  - <b>mmap</b> (slower, but maybe somewhat more stable):
-    Runtime automatic switching of the data segments.
-
-@warning
-  This configuration option cannot be set in your platform file. You can only
-  pass it as an argument to smpirun.
-  
-@subsection options_smpi_privatize_libs smpi/privatize-libs: Automatic privatization of
- global variables inside external libraries
-
-Linux/BSD only: When using dlopen (default) privatization, privatize specific 
-shared libraries with internal global variables, if they can't be linked statically. 
-For example libgfortran is usually used for Fortran I/O and indexes in files 
-can be mixed up.
-
-@warning
-  This configuration option can only use either full paths to libraries, or full names.
-  Check with ldd the name of the library you want to use.
-  Example:
-  ldd allpairf90 
-    libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007fbb4d91b000)
-  Then you can use --cfg=smpi/privatize-libs:"libgfortran.so.3" or --cfg=smpi/privatize-libs:"/usr/lib/x86_64-linux-gnu/libgfortran.so.3", but not "libgfortran" or "libgfortran.so".
-  Multiple libraries can be given, semicolon separated.
-
-
-@subsection options_model_smpi_detached Simulating MPI detached send
-
-This threshold specifies the size in bytes under which the send will return
-immediately. This is different from the threshold detailed in  @ref options_model_network_asyncsend
-because the message is not effectively sent when the send is posted. SMPI still waits for the
-correspondant receive to be posted to perform the communication operation. This threshold can be set
-by changing the @b smpi/send-is-detached-thresh item. The default value is 65536.
-
-@subsection options_model_smpi_collectives Simulating MPI collective algorithms
-
-SMPI implements more than 100 different algorithms for MPI collective communication, to accurately
-simulate the behavior of most of the existing MPI libraries. The @b smpi/coll-selector item can be used
- to use the decision logic of either OpenMPI or MPICH libraries (values: ompi or mpich, by default SMPI
-uses naive version of collective operations). Each collective operation can be manually selected with a
-@b smpi/collective_name:algo_name. Available algorithms are listed in @ref SMPI_use_colls .
-
-@subsection options_model_smpi_iprobe smpi/iprobe: Inject constant times for calls to MPI_Iprobe
-
-@b Default value: 0.0001
-
-The behavior and motivation for this configuration option is identical with @a smpi/test, see
-Section @ref options_model_smpi_test for details.
-
-@subsection options_model_smpi_iprobe_cpu_usage smpi/iprobe-cpu-usage: Reduce speed for iprobe calls
-
-@b Default value: 1 (no change from default behavior)
-
-MPI_Iprobe calls can be heavily used in applications. To account correctly for the energy
-cores spend probing, it is necessary to reduce the load that these calls cause inside
-SimGrid.
-
-For instance, we measured a max power consumption of 220 W for a particular application but 
-only 180 W while this application was probing. Hence, the correct factor that should
-be passed to this option would be 180/220 = 0.81.
-
-@subsection options_model_smpi_init smpi/init: Inject constant times for calls to MPI_Init
-
-@b Default value: 0
-
-The behavior for this configuration option is identical with @a smpi/test, see
-Section @ref options_model_smpi_test for details.
-
-@subsection options_model_smpi_ois smpi/ois: Inject constant times for asynchronous send operations
-
-This configuration option works exactly as @a smpi/os, see Section @ref options_model_smpi_os.
-Of course, @a smpi/ois is used to account for MPI_Isend instead of MPI_Send.
-
-@subsection options_model_smpi_os smpi/os: Inject constant times for send operations
-
-In several network models such as LogP, send (MPI_Send, MPI_Isend) and receive (MPI_Recv)
-operations incur costs (i.e., they consume CPU time). SMPI can factor these costs in as well, but the
-user has to configure SMPI accordingly as these values may vary by machine.
-This can be done by using smpi/os for MPI_Send operations; for MPI_Isend and
-MPI_Recv, use @a smpi/ois and @a smpi/or, respectively. These work exactly as
-@a smpi/ois.
-
-@a smpi/os can consist of multiple sections; each section takes three values, for example:
-
-@verbatim
-    1:3:2;10:5:1
-@endverbatim
-
-Here, the sections are divided by ";" (that is, this example contains two sections).
-Furthermore, each section consists of three values.
-
-1. The first value denotes the minimum size for this section to take effect;
-   read it as "if message size is greater than this value (and other section has a larger
-   first value that is also smaller than the message size), use this".
-   In the first section above, this value is "1".
-
-2. The second value is the startup time; this is a constant value that will always
-   be charged, no matter what the size of the message. In the first section above,
-   this value is "3".
-
-3. The third value is the @a per-byte cost. That is, it is charged for every
-   byte of the message (incurring cost messageSize*cost_per_byte)
-   and hence accounts also for larger messages. In the first
-   section of the example above, this value is "2".
-
-Now, SMPI always checks which section it should take for a given message; that is,
-if a message of size 11 is sent with the configuration of the example above, only
-the second section will be used, not the first, as the first value of the second
-section is closer to the message size. Hence, a message of size 11 incurs the
-following cost inside MPI_Send:
-
-@verbatim
-    5+11*1
-@endverbatim
-
-As 5 is the startup cost and 1 is the cost per byte.
-
-@note
-    The order of sections can be arbitrary; they will be ordered internally.
-
-@subsection options_model_smpi_or smpi/or: Inject constant times for receive operations
-
-This configuration option works exactly as @a smpi/os, see Section @ref options_model_smpi_os.
-Of course, @a smpi/or is used to account for MPI_Recv instead of MPI_Send.
-
-@subsection options_model_smpi_test smpi/test: Inject constant times for calls to MPI_Test
-
-@b Default value: 0.0001
-
-By setting this option, you can control the amount of time a process sleeps
-when MPI_Test() is called; this is important, because SimGrid normally only
-advances the time while communication is happening and thus,
-MPI_Test will not add to the time, resulting in a deadlock if used as a
-break-condition.
-
-Here is an example:
-
-@code{.unparsed}
-    while(!flag) {
-        MPI_Test(request, flag, status);
-        ...
-    }
-@endcode
-
-@note
-    Internally, in order to speed up execution, we use a counter to keep track
-    on how often we already checked if the handle is now valid or not. Hence, we
-    actually use counter*SLEEP_TIME, that is, the time MPI_Test() causes the process
-    to sleep increases linearly with the number of previously failed tests. This 
-    behavior can be disabled by setting smpi/grow-injected-times to no. This will
-    also disable this behavior for MPI_Iprobe.
-
-
-@subsection options_model_smpi_shared_malloc smpi/shared-malloc: Factorize malloc()s
-
-@b Default: global
-
-If your simulation consumes too much memory, you may want to modify
-your code so that the working areas are shared by all MPI ranks. For
-example, in a bloc-cyclic matrix multiplication, you will only
-allocate one set of blocs, and every processes will share them.
-Naturally, this will lead to very wrong results, but this will save a
-lot of memory so this is still desirable for some studies. For more on
-the motivation for that feature, please refer to the 
-<a href="https://simgrid.github.io/SMPI_CourseWare/topic_understanding_performance/matrixmultiplication/">relevant
-section</a> of the SMPI CourseWare (see Activity #2.2 of the pointed
-assignment). In practice, change the call to malloc() and free() into
-SMPI_SHARED_MALLOC() and SMPI_SHARED_FREE().
-
-SMPI provides 2 algorithms for this feature. The first one, called @c
-local, allocates one bloc per call to SMPI_SHARED_MALLOC() in your
-code (each call location gets its own bloc) and this bloc is shared
-amongst all MPI ranks.  This is implemented with the shm_* functions
-to create a new POSIX shared memory object (kept in RAM, in /dev/shm)
-for each shared bloc.
-
-With the @c global algorithm, each call to SMPI_SHARED_MALLOC()
-returns a new adress, but it only points to a shadow bloc: its memory
-area is mapped on a 1MiB file on disk. If the returned bloc is of size
-N MiB, then the same file is mapped N times to cover the whole bloc. 
-At the end, no matter how many SMPI_SHARED_MALLOC you do, this will
-only consume 1 MiB in memory. 
-
-You can disable this behavior and come back to regular mallocs (for
-example for debugging purposes) using @c "no" as a value.
-
-If you want to keep private some parts of the buffer, for instance if these
-parts are used by the application logic and should not be corrupted, you
-can use SMPI_PARTIAL_SHARED_MALLOC(size, offsets, offsets_count).
-
-As an example,
-
-@code{.C}
-    mem = SMPI_PARTIAL_SHARED_MALLOC(500, {27,42 , 100,200}, 2);
-@endcode
-
-will allocate 500 bytes to mem, such that mem[27..41] and mem[100..199]
-are shared and other area remain private.
-
-Then, it can be deallocated by calling SMPI_SHARED_FREE(mem).
-
-When smpi/shared-malloc:global is used, the memory consumption problem
-is solved, but it may induce too much load on the kernel's pages table. 
-In this case, you should use huge pages so that we create only one
-entry per Mb of malloced data instead of one entry per 4k.
-To activate this, you must mount a hugetlbfs on your system and allocate
-at least one huge page:
-
-@code{.sh}
-    mkdir /home/huge
-    sudo mount none /home/huge -t hugetlbfs -o rw,mode=0777
-    sudo sh -c 'echo 1 > /proc/sys/vm/nr_hugepages' # echo more if you need more
-@endcode
-
-Then, you can pass the option --cfg=smpi/shared-malloc-hugepage:/home/huge
-to smpirun to actually activate the huge page support in shared mallocs.
-
-@subsection options_model_smpi_wtime smpi/wtime: Inject constant times for calls to MPI_Wtime, gettimeofday and clock_gettime
-
-@b Default value: 10 ns
-
-This option controls the amount of (simulated) time spent in calls to
-MPI_Wtime(), gettimeofday() and clock_gettime(). If you set this value
-to 0, the simulated clock is not advanced in these calls, which leads
-to issue if your application contains such a loop:
-
-@code{.unparsed}
-    while(MPI_Wtime() < some_time_bound) {
-        /* some tests, with no communication nor computation */
-    }
-@endcode
-
-When the option smpi/wtime is set to 0, the time advances only on
-communications and computations, so the previous code results in an
-infinite loop: the current [simulated] time will never reach @c
-some_time_bound.  This infinite loop is avoided when that option is
-set to a small amount, as it is by default since SimGrid v3.21.
-
-Note that if your application does not contain any loop depending on
-the current time only, then setting this option to a non-zero value
-will slow down your simulations by a tiny bit: the simulation loop has
-to be broken and reset each time your code ask for the current time.
-If the simulation speed really matters to you, you can avoid this
-extra delay by setting smpi/wtime to 0.
-
-@section options_generic Configuring other aspects of SimGrid
-
-@subsection options_generic_clean_atexit Cleanup before termination
-
-The C / C++ standard contains a function called @b [atexit](http://www.cplusplus.com/reference/cstdlib/atexit/).
-atexit registers callbacks, which are called just before the program terminates.
-
-By setting the configuration option clean-atexit to 1 (true), a callback
-is registered and will clean up some variables and terminate/cleanup the tracing.
-
-TODO: Add when this should be used.
-
-@subsection options_generic_path Profile files' search path
-
-It is possible to specify a list of directories to search into for the
-trace files (see @ref pf_trace) by using the @b path configuration
-item. To add several directory to the path, set the configuration
-item several times, as in @verbatim
---cfg=path:toto --cfg=path:tutu
-@endverbatim
-
-@subsection options_generic_breakpoint Set a breakpoint
-
-@verbatim
---cfg=simix/breakpoint:3.1416
-@endverbatim
-
-This configuration option sets a breakpoint: when the simulated clock reaches
-the given time, a SIGTRAP is raised.  This can be used to stop the execution and
-get a backtrace with a debugger.
-
-It is also possible to set the breakpoint from inside the debugger, by writing
-in global variable simgrid::simix::breakpoint. For example, with gdb:
-
-@verbatim
-set variable simgrid::simix::breakpoint = 3.1416
-@endverbatim
-
-@subsection options_generic_exit Behavior on Ctrl-C
-
-By default, when Ctrl-C is pressed, the status of all existing
-simulated processes is displayed before exiting the simulation. This is very useful to debug your
-code, but it can reveal troublesome in some cases (such as when the
-amount of processes becomes really big). This behavior is disabled
-when @b verbose-exit is set to 0 (it is to 1 by default).
-
-@subsection options_exception_cutpath Truncate local path from exception backtrace
-
-@verbatim
---cfg=exception/cutpath:1
-@endverbatim
-
-This configuration option is used to remove the path from the
-backtrace shown when an exception is thrown. This is mainly useful for
-the tests: the full file path makes the tests not reproducible, and
-thus failing as we are currently comparing output. Clearly, the path
-used on different machines are almost guaranteed to be different and
-hence, the output would mismatch, causing the test to fail.
-
-@section options_log Logging Configuration
-
-It can be done by using XBT. Go to @ref XBT_log for more details.
-
-*/
index c4e0ea4..318db98 100644 (file)
@@ -427,7 +427,7 @@ to latency.
 Attribute name  | Mandatory | Values | Description
 --------------- | --------- | ------ | -----------
 id              | yes       | string | The identifier of the link to be used when referring to it.
-bandwidth       | yes       | int    | Maximum bandwidth for this link, given in bytes/s
+bandwidth       | yes       | string | Maximum bandwidth for this link, along with its unit.
 latency         | no        | double (default: 0.0) | Latency for this link.
 sharing_policy  | no        | @ref sharing_policy_shared "SHARED"@|@ref pf_sharing_policy_fatpipe "FATPIPE"@|@ref pf_sharing_policy_splitduplex "SPLITDUPLEX" (default: SHARED) | Sharing policy for the link.
 bandwidth_file  | no        | string | Allows you to use a file as input for bandwidth.
similarity index 66%
rename from doc/doxygen/module-smpi.doc
rename to docs/source/app_smpi.rst
index cdaa5f2..bd04aa0 100644 (file)
-/** 
-@defgroup SMPI_API      SMPI: Simulate real MPI applications
-@brief Programming environment for the simulation of MPI applications
+.. _SMPI_doc:
 
-@tableofcontents
+===============================
+SMPI: Simulate MPI Applications
+===============================
+
+.. raw:: html
+
+   <object id="TOC" data="graphical-toc.svg" width="100%" type="image/svg+xml"></object>
+   <script>
+   window.onload=function() { // Wait for the SVG to be loaded before changing it
+     var elem=document.querySelector("#TOC").contentDocument.getElementById("SMPIBox")
+     elem.style="opacity:0.93999999;fill:#ff0000;fill-opacity:0.1";
+   }
+   </script>
+   <br/>
+   <br/>
 
 SMPI 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 the simulator. The
-SMPI reference article is available at
-https://hal.inria.fr/hal-01415484. You should also read the 
-<a href="http://simgrid.org/tutorials/simgrid-smpi-101.pdf">SMPI
-introductory slides</a>.
+existing MPI applications within the comfort of the simulator.
+
+To get started with SMPI, you should head to `the SMPI tutorial
+<usecase_smpi>`_. You may also want to read the `SMPI reference
+article <https://hal.inria.fr/hal-01415484>`_ or these `introductory
+slides <http://simgrid.org/tutorials/simgrid-smpi-101.pdf>`_.  If you
+are new to MPI, you should first take our online `SMPI CourseWare
+<https://simgrid.github.io/SMPI_CourseWare/>`_. It consists in several
+projects that progressively introduce the MPI concepts. It proposes to
+use SimGrid and SMPI to run the experiments, but the learning
+objectives are centered on MPI itself.
 
 Our goal is to enable the study of **unmodified MPI applications**.
 Some constructs and features are still missing, but we can probably
 add them on demand.  If you already used MPI before, SMPI should sound
 very familiar to you: Use smpicc instead of mpicc, and smpirun instead
-of mpirun. The main difference is that smpirun takes a virtual
-platform as extra parameter (see @ref platform).
-
-If you are new to MPI, you should first take our online [SMPI
-CourseWare](https://simgrid.github.io/SMPI_CourseWare/). It consists
-in several projects that progressively introduce the MPI concepts. It
-proposes to use SimGrid and SMPI to run the experiments, but the
-learning objectives are centered on MPI itself. 
+of mpirun. The main difference is that smpirun takes a :ref:`virtual
+platform <platform>` as an extra parameter.
 
 For **further scalability**, you may modify your code to speed up your
 studies or save memory space.  Maximal **simulation accuracy**
 requires some specific care from you.
 
- - @ref SMPI_use
-   - @ref SMPI_use_compile
-   - @ref SMPI_use_exec
-   - @ref SMPI_use_debug
-   - @ref SMPI_use_colls
-     - @ref SMPI_use_colls_algos
-     - @ref SMPI_use_colls_tracing
- - @ref SMPI_what
-   - @ref SMPI_what_coverage
-   - @ref SMPI_what_globals
- - @ref SMPI_adapting
-   - @ref SMPI_adapting_size
-   - @ref SMPI_adapting_speed
- - @ref SMPI_accuracy
- - @ref SMPI_troubleshooting
-   - @ref SMPI_trouble_configure_refuses_smpicc
-   - @ref SMPI_trouble_configure_dont_find_smpicc
-   - @ref SMPI_trouble_useconds_t
-
-
-@section SMPI_use Using SMPI
-
-@subsection SMPI_use_compile Compiling your code
-
-If your application is in C, then simply use <tt>smpicc</tt> as a
+----------
+Using SMPI
+----------
+
+...................
+Compiling your Code
+...................
+
+If your application is in C, then simply use ``smpicc`` as a
 compiler just like you use mpicc with other MPI implementations. This
 script still calls your default compiler (gcc, clang, ...) and adds
 the right compilation flags along the way. If your application is in
-C++, Fortran 77 or Fortran 90, use respectively <tt>smpicxx</tt>,
-<tt>smpiff</tt> or <tt>smpif90</tt>.
+C++, Fortran 77 or Fortran 90, use respectively ``smpicxx``,
+``smpiff`` or ``smpif90``.
 
-@subsection SMPI_use_exec Executing your code on the simulator
+....................
+Simulating your Code
+....................
 
-Use the <tt>smpirun</tt> script as follows for that:
+Use the ``smpirun`` script as follows:
 
-@verbatim
-smpirun -hostfile my_hostfile.txt -platform my_platform.xml ./program -blah
-@endverbatim
+.. code-block:: shell
 
- - <tt>my_hostfile.txt</tt> is a classical MPI hostfile (that is, this
-   file lists the machines on which the processes must be dispatched, one
-   per line)
- - <tt>my_platform.xml</tt> is a classical SimGrid platform file. Of
-   course, the hosts of the hostfile must exist in the provided
-   platform.
- - <tt>./program</tt> is the MPI program to simulate, that you
-   compiled with <tt>smpicc</tt>
- - <tt>-blah</tt> is a command-line parameter passed to this program.
+   smpirun -hostfile my_hostfile.txt -platform my_platform.xml ./program -blah
 
-<tt>smpirun</tt> accepts other parameters, such as <tt>-np</tt> if you
-don't want to use all the hosts defined in the hostfile, <tt>-map</tt>
-to display on which host each rank gets mapped of <tt>-trace</tt> to
-activate the tracing during the simulation. You can get the full list
-by running
+- ``my_hostfile.txt`` is a classical MPI hostfile (that is, this file
+  lists the machines on which the processes must be dispatched, one
+  per line)
+- ``my_platform.xml`` is a classical SimGrid platform file. Of course,
+  the hosts of the hostfile must exist in the provided platform.
+- ``./program`` is the MPI program to simulate, that you compiled with ``smpicc``
+- ``-blah`` is a command-line parameter passed to this program.
 
-@verbatim
-smpirun -help
-@endverbatim
+``smpirun`` accepts other parameters, such as ``-np`` if you don't
+want to use all the hosts defined in the hostfile, ``-map`` to display
+on which host each rank gets mapped of ``-trace`` to activate the
+tracing during the simulation. You can get the full list by running
+``smpirun -help``
 
-@subsection SMPI_use_debug Debugging your code on top of SMPI
+...............................
+Debugging your Code within SMPI
+...............................
 
 If you want to explore the automatic platform and deployment files
-that are generated by @c smpirun, add @c -keep-temps to the command
+that are generated by ``smpirun``, add ``-keep-temps`` to the command
 line.
 
 You can also run your simulation within valgrind or gdb using the
 following commands. Once in GDB, each MPI ranks will be represented as
 a regular thread, and you can explore the state of each of them as
 usual.
-@verbatim
-smpirun -wrapper valgrind ...other args...
-smpirun -wrapper "gdb --args" --cfg=contexts/factory:thread ...other args...
-@endverbatim
 
-@subsection SMPI_use_colls Simulating collective operations
+.. code-block:: shell
+
+   smpirun -wrapper valgrind ...other args...
+   smpirun -wrapper "gdb --args" --cfg=contexts/factory:thread ...other args...
+
+................................   
+Simulating Collective Operations
+................................
 
 MPI collective operations are crucial to the performance of MPI
 applications and must be carefully optimized according to many
@@ -117,44 +114,47 @@ most cases, the users can also manually tune the algorithm used for
 each collective operation.
 
 SMPI can simulate the behavior of several MPI implementations:
-OpenMPI, MPICH,
-<a href="http://star-mpi.sourceforge.net/">STAR-MPI</a>, and
+OpenMPI, MPICH, `STAR-MPI <http://star-mpi.sourceforge.net/>`_, and
 MVAPICH2. For that, it provides 115 collective algorithms and several
 selector algorithms, that were collected directly in the source code
 of the targeted MPI implementations.
 
 You can switch the automatic selector through the
-\c smpi/coll-selector configuration item. Possible values:
+``smpi/coll-selector`` configuration item. Possible values:
 
- - <b>ompi</b>: default selection logic of OpenMPI (version 3.1.2)
- - <b>mpich</b>: default selection logic of MPICH (version 3.3b)
- - <b>mvapich2</b>: selection logic of MVAPICH2 (version 1.9) tuned
+ - **ompi:** default selection logic of OpenMPI (version 3.1.2)
+ - **mpich**: default selection logic of MPICH (version 3.3b)
+ - **mvapich2**: selection logic of MVAPICH2 (version 1.9) tuned
    on the Stampede cluster   
- - <b>impi</b>: preliminary version of an Intel MPI selector (version
+ - **impi**: 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.   
- - <b>default</b>: legacy algorithms used in the earlier days of
+ - **default**: legacy algorithms used in the earlier days of
    SimGrid. Do not use for serious perform performance studies.
 
+.. todo:: default should not even exist.   
 
-@subsubsection SMPI_use_colls_algos Available algorithms
+....................
+Available Algorithms
+....................
 
 You can also pick the algorithm used for each collective with the
 corresponding configuration item. For example, to use the pairwise
-alltoall algorithm, one should add \c --cfg=smpi/alltoall:pair to the
-line. This will override the selector (if any) for this algorithm.
-It means that the selected algorithm will be used 
+alltoall algorithm, one should add ``--cfg=smpi/alltoall:pair`` to the
+line. This will override the selector (if any) for this algorithm.  It
+means that the selected algorithm will be used
 
-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
+.. 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
 
-#### MPI_Alltoall
+MPI_Alltoall
+^^^^^^^^^^^^
 
-Most of these are best described in <a href="http://www.cs.arizona.edu/~dkl/research/papers/ics06.pdf">STAR-MPI</a>
+Most of these are best described in `STAR-MPI <http://www.cs.arizona.edu/~dkl/research/papers/ics06.pdf>`_.
 
  - default: naive one, by default
  - ompi: use openmpi selector for the alltoall operations
@@ -179,11 +179,11 @@ Most of these are best described in <a href="http://www.cs.arizona.edu/~dkl/rese
  - ring_mpi_barrier: same, with MPI_Barrier used
  - ring_one_barrier: only one barrier at the beginning
  - basic_linear: posts all receives and all sends,
-starts the communications, and waits for all communication to finish
+   starts the communications, and waits for all communication to finish
  - mvapich2_scatter_dest: isend/irecv with scattered destinations, posting only a few messages at the same time
 
-#### MPI_Alltoallv
-
+MPI_Alltoallv
+^^^^^^^^^^^^^
  - default: naive one, by default
  - ompi: use openmpi selector for the alltoallv operations
  - mpich: use mpich selector for the alltoallv operations
@@ -201,22 +201,23 @@ starts the communications, and waits for all communication to finish
  - ring_one_barrier: same as alltoall
  - ompi_basic_linear: same as alltoall
 
-#### MPI_Gather
+MPI_Gather
+^^^^^^^^^^
 
  - default: naive one, by default
  - ompi: use openmpi selector for the gather operations
  - mpich: use mpich selector for the gather operations
  - mvapich2: use mvapich2 selector for the gather operations
  - impi: use intel mpi selector for the gather operations
- - automatic (experimental): use an automatic self-benchmarking algorithm 
-which will iterate over all implemented versions and output the best
+ - automatic (experimental): use an automatic self-benchmarking algorithm which will iterate over all implemented versions and output the best
  - ompi_basic_linear: basic linear algorithm from openmpi, each process sends to the root
  - ompi_binomial: binomial tree algorithm
  - ompi_linear_sync: same as basic linear, but with a synchronization at the
- beginning and message cut into two segments.
  beginning and message cut into two segments.
  - 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.
 
-#### MPI_Barrier
+MPI_Barrier
+^^^^^^^^^^^
 
  - default: naive one, by default
  - ompi: use openmpi selector for the barrier operations
@@ -233,7 +234,8 @@ which will iterate over all implemented versions and output the best
  - mvapich2_pair: pairwise algorithm
  - mpich_smp: barrier intra-node, then inter-node
 
-#### MPI_Scatter
+MPI_Scatter
+^^^^^^^^^^^
 
  - default: naive one, by default
  - ompi: use openmpi selector for the scatter operations
@@ -246,7 +248,8 @@ which will iterate over all implemented versions and output the best
  - 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. 
  - 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.
 
-#### MPI_Reduce
+MPI_Reduce
+^^^^^^^^^^
 
  - default: naive one, by default
  - ompi: use openmpi selector for the reduce operations
@@ -259,24 +262,25 @@ which will iterate over all implemented versions and output the best
  - flat_tree: uses a flat tree
  - NTSL: Non-topology-specific pipelined linear-bcast function 
    0->1, 1->2 ,2->3, ....., ->last node: in a pipeline fashion, with segments
- of 8192 bytes
  of 8192 bytes
  - scatter_gather: scatter then gather
  - ompi_chain: openmpi reduce algorithms are built on the same basis, but the
- topology is generated differently for each flavor
-chain = chain with spacing of size/2, and segment size of 64KB 
  topology is generated differently for each flavor
+   chain = chain with spacing of size/2, and segment size of 64KB 
  - ompi_pipeline: same with pipeline (chain with spacing of 1), segment size 
-depends on the communicator size and the message size
+   depends on the communicator size and the message size
  - ompi_binary: same with binary tree, segment size of 32KB
  - ompi_in_order_binary: same with binary tree, enforcing order on the 
-operations
+   operations
  - ompi_binomial: same with binomial algo (redundant with default binomial 
-one in most cases)
+   one in most cases)
  - ompi_basic_linear: basic algorithm, each process sends to root
  - mvapich2_knomial: k-nomial algorithm. Default factor is 4 (mvapich2 selector adapts it through tuning)
  - 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.
- - rab: <a href="https://fs.hlrs.de/projects/par/mpi//myreduce.html">Rabenseifner</a>'s reduce algorithm 
+ - rab: `Rabenseifner <https://fs.hlrs.de/projects/par/mpi//myreduce.html>`_'s reduce algorithm 
 
-#### MPI_Allreduce
+MPI_Allreduce
+^^^^^^^^^^^^^
 
  - default: naive one, by default
  - ompi: use openmpi selector for the allreduce operations
@@ -288,26 +292,27 @@ one in most cases)
  - rab1: variations of the  <a href="https://fs.hlrs.de/projects/par/mpi//myreduce.html">Rabenseifner</a> algorithm: reduce_scatter then allgather
  - rab2: variations of the  <a href="https://fs.hlrs.de/projects/par/mpi//myreduce.html">Rabenseifner</a> algorithm: alltoall then allgather
  - rab_rsag: variation of the  <a href="https://fs.hlrs.de/projects/par/mpi//myreduce.html">Rabenseifner</a> algorithm: recursive doubling 
-reduce_scatter then recursive doubling allgather 
+   reduce_scatter then recursive doubling allgather 
  - rdb: recursive doubling
  - smp_binomial: binomial tree with smp: binomial intra 
-SMP reduce, inter reduce, inter broadcast then intra broadcast
+   SMP reduce, inter reduce, inter broadcast then intra broadcast
  - smp_binomial_pipeline: same with segment size = 4096 bytes
  - smp_rdb: intra: binomial allreduce, inter: Recursive 
-doubling allreduce, intra: binomial broadcast
+   doubling allreduce, intra: binomial broadcast
  - smp_rsag: intra: binomial allreduce, inter: reduce-scatter, 
-inter:allgather, intra: binomial broadcast
+   inter:allgather, intra: binomial broadcast
  - smp_rsag_lr: intra: binomial allreduce, inter: logical ring 
-reduce-scatter, logical ring inter:allgather, intra: binomial broadcast
+   reduce-scatter, logical ring inter:allgather, intra: binomial broadcast
  - smp_rsag_rab: intra: binomial allreduce, inter: rab
-reduce-scatter, rab inter:allgather, intra: binomial broadcast
+   reduce-scatter, rab inter:allgather, intra: binomial broadcast
  - redbcast: reduce then broadcast, using default or tuned algorithms if specified
  - ompi_ring_segmented: ring algorithm used by OpenMPI
  - mvapich2_rs: rdb for small messages, reduce-scatter then allgather else
  - 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)
- - rab: default <a href="https://fs.hlrs.de/projects/par/mpi//myreduce.html">Rabenseifner</a> implementation
+ - rab: default `Rabenseifner <https://fs.hlrs.de/projects/par/mpi//myreduce.html>`_ implementation
 
-#### MPI_Reduce_scatter
+MPI_Reduce_scatter
+^^^^^^^^^^^^^^^^^^
 
  - default: naive one, by default
  - ompi: use openmpi selector for the reduce_scatter operations
@@ -322,7 +327,8 @@ reduce-scatter, rab inter:allgather, intra: binomial broadcast
  - mpich_noncomm: only works for power of 2 procs, recursive doubling for noncommutative ops
 
 
-#### MPI_Allgather
+MPI_Allgather
+^^^^^^^^^^^^^
 
  - default: naive one, by default
  - ompi: use openmpi selector for the allgather operations
@@ -333,10 +339,10 @@ reduce-scatter, rab inter:allgather, intra: binomial broadcast
  - 2dmesh: see alltoall
  - 3dmesh: see alltoall
  - bruck: Described by Bruck et.al. in <a href="http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=642949">
-Efficient algorithms for all-to-all communications in multiport message-passing systems</a> 
+   Efficient algorithms for all-to-all communications in multiport message-passing systems</a> 
  - GB: Gather - Broadcast (uses tuned version if specified)
  - loosely_lr: Logical Ring with grouping by core (hardcoded, default 
-processes/node: 4)
+   processes/node: 4)
  - NTSLR: Non Topology Specific Logical Ring
  - NTSLR_NB: Non Topology Specific Logical Ring, Non Blocking operations
  - pair: see alltoall
@@ -344,19 +350,20 @@ processes/node: 4)
  - rhv: only power of 2 number of processes
  - ring: see alltoall
  - SMP_NTS: gather to root of each SMP, then every root of each SMP node 
-post INTER-SMP Sendrecv, then do INTRA-SMP Bcast for each receiving message, 
-using logical ring algorithm (hardcoded, default processes/SMP: 8)
+   post INTER-SMP Sendrecv, then do INTRA-SMP Bcast for each receiving message, 
+   using logical ring algorithm (hardcoded, default processes/SMP: 8)
  - smp_simple: gather to root of each SMP, then every root of each SMP node 
-post INTER-SMP Sendrecv, then do INTRA-SMP Bcast for each receiving message, 
-using simple algorithm (hardcoded, default processes/SMP: 8)
+   post INTER-SMP Sendrecv, then do INTRA-SMP Bcast for each receiving message, 
+   using simple algorithm (hardcoded, default processes/SMP: 8)
  - spreading_simple: from node i, order of communications is i -> i + 1, i ->
- i + 2, ..., i -> (i + p -1) % P
  i + 2, ..., i -> (i + p -1) % P
  - ompi_neighborexchange: Neighbor Exchange algorithm for allgather. 
-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>
+   Described by Chen et.al. in  `Performance Evaluation of Allgather
+   Algorithms on Terascale Linux Cluster with Fast Ethernet <http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=1592302>`_
  - mvapich2_smp: SMP aware algorithm, performing intra-node gather, inter-node allgather with one process/node, and bcast intra-node
 
-
-#### MPI_Allgatherv
+MPI_Allgatherv
+^^^^^^^^^^^^^^
 
  - default: naive one, by default
  - ompi: use openmpi selector for the allgatherv operations
@@ -364,8 +371,7 @@ Described by Chen et.al. in  <a href="http://ieeexplore.ieee.org/xpl/articleDeta
  - mvapich2: use mvapich2 selector for the allgatherv operations
  - impi: use intel mpi selector for the allgatherv operations
  - automatic (experimental): use an automatic self-benchmarking algorithm 
- - GB: Gatherv - Broadcast (uses tuned version if specified, but only for 
-Bcast, gatherv is not tuned)
+ - GB: Gatherv - Broadcast (uses tuned version if specified, but only for Bcast, gatherv is not tuned)
  - pair: see alltoall
  - ring: see alltoall
  - ompi_neighborexchange: see allgather
@@ -373,7 +379,8 @@ Bcast, gatherv is not tuned)
  - mpich_rdb: recursive doubling algorithm from MPICH
  - mpich_ring: ring algorithm from MPICh - performs differently from the  one from STAR-MPI
 
-#### MPI_Bcast
+MPI_Bcast
+^^^^^^^^^
 
  - default: naive one, by default
  - ompi: use openmpi selector for the bcast operations
@@ -401,9 +408,10 @@ Bcast, gatherv is not tuned)
  - mvapich2_intra_node: Intra node default mvapich worker
  - mvapich2_knomial_intra_node:  k-nomial intra node default mvapich worker. default factor is 4.
 
-#### Automatic evaluation 
+Automatic Evaluation
+^^^^^^^^^^^^^^^^^^^^
 
-(Warning: This is still very experimental)
+.. warning:: This is still very experimental.
 
 An automatic version is available for each collective (or even as a selector). This specific 
 version will loop over all other implemented algorithm for this particular collective, and apply 
@@ -411,11 +419,16 @@ them while benchmarking the time taken for each process. It will then output the
 each process, and the global quickest. This is still unstable, and a few algorithms which need 
 specific number of nodes may crash.
 
-#### Adding an algorithm
+Adding an algorithm
+^^^^^^^^^^^^^^^^^^^
 
-To add a new algorithm, one should check in the src/smpi/colls folder how other algorithms 
-are coded. Using plain MPI code inside Simgrid can't be done, so algorithms have to be 
-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>.
+To add a new algorithm, one should check in the src/smpi/colls folder
+how other algorithms are coded. Using plain MPI code inside Simgrid
+can't be done, so algorithms have to be 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 the `>SimGrid
+developers mailing list <http://lists.gforge.inria.fr/mailman/listinfo/simgrid-devel>`_.
 
 Example: adding a "pair" version of the Alltoall collective.
 
@@ -431,30 +444,40 @@ Example: adding a "pair" version of the Alltoall collective.
 
  - Please submit your patch for inclusion in SMPI, for example through a pull request on GitHub or directly per email.
 
-@subsubsection SMPI_use_colls_tracing Tracing of internal communications
+
+Tracing of Internal Communications
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 By default, the collective operations are traced as a unique operation
 because tracing all point-to-point communications composing them could
 result in overloaded, hard to interpret traces. If you want to debug
 and compare collective algorithms, you should set the
-\c tracing/smpi/internals configuration item to 1 instead of 0.
+``tracing/smpi/internals`` configuration item to 1 instead of 0.
 
 Here are examples of two alltoall collective algorithms runs on 16 nodes, 
-the first one with a ring algorithm, the second with a pairwise one:
+the first one with a ring algorithm, the second with a pairwise one.
+
+.. image:: /img/smpi_simgrid_alltoall_ring_16.png
+   :align: center
+          
+Alltoall on 16 Nodes with the Ring Algorithm.
 
-@htmlonly
-<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>
-<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>
-<br/>
-@endhtmlonly
+.. image:: /img/smpi_simgrid_alltoall_pair_16.png
+   :align: center
+          
+Alltoall on 16 Nodes with the Pairwise Algorithm.
 
-@section SMPI_what What can run within SMPI?
+-------------------------
+What can run within SMPI?
+-------------------------
 
 You can run unmodified MPI applications (both C/C++ and Fortran) within
 SMPI, provided that you only use MPI calls that we implemented. Global
 variables should be handled correctly on Linux systems.
 
-@subsection SMPI_what_coverage MPI coverage of SMPI
+....................
+MPI coverage of SMPI
+....................
 
 Our coverage of the interface is very decent, but still incomplete;
 Given the size of the MPI standard, we may well never manage to 
@@ -463,24 +486,27 @@ almost no support for I/O primitives, but we still pass a very large
 amount of the MPICH coverage tests.
 
 The full list of not yet implemented functions is documented in the
-file @ref include/smpi/smpi.h, between two lines containing the
-<tt>FIXME</tt> marker. If you really miss a 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 your contribution to the
-main project afterward.
+file `include/smpi/smpi.h
+<https://framagit.org/simgrid/simgrid/tree/master/include/smpi/smpi.h>`_
+in your version of SimGrid, between two lines containing the ``FIXME``
+marker. If you really miss a feature, please get in touch with us: we
+can guide you though the SimGrid code to help you implementing it, and
+we'd be glad to integrate your contribution to the main project.
 
-@subsection SMPI_what_globals Privatization of global variables
+.................................
+Privatization of 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
 into threads of a unique system process in SMPI. Global variables are
 usually private to each MPI process while they become shared between
 the processes in SMPI.  The problem and some potential solutions are
-discussed in this article: "Automatic Handling of Global Variables for
-Multi-threaded MPI Programs", available at
-http://charm.cs.illinois.edu/newPapers/11-23/paper.pdf (note that this
-article does not deal with SMPI but with a competing solution called
-AMPI that suffers of the same issue).  This point used to be
+discussed in this article: `Automatic Handling of Global Variables for
+Multi-threaded MPI Programs
+<http://charm.cs.illinois.edu/newPapers/11-23/paper.pdf>` (note that
+this article does not deal with SMPI but with a competing solution
+called AMPI that suffers of the same issue).  This point used to be
 problematic in SimGrid, but the problem should now be handled
 automatically on Linux.
 
@@ -488,22 +514,22 @@ Older versions of SimGrid came with a script that automatically
 privatized the globals through static analysis of the source code. But
 our implementation was not robust enough to be used in production, so
 it was removed at some point. Currently, SMPI comes with two
-privatization mechanisms that you can @ref options_smpi_privatization
-"select at runtime". At the time of writing (v3.18), the dlopen
-approach is considered to be very fast (it's used by default) while
-the mmap approach is considered to be rather slow but very robust.
-
-With the <b>mmap approach</b>, SMPI duplicates and dynamically switch
-the \c .data and \c .bss segments of the ELF process when switching
-the MPI ranks. This allows each ranks to have its own copy of the
-global variables.  No copy actually occures as this mechanism uses \c
-mmap for efficiency. This mechanism is considered to be very robust on
-all systems supporting \c mmap (Linux and most BSDs). Its performance
+privatization mechanisms that you can :ref:`select at runtime
+<options_smpi_privatization>`_.  The dlopen approach is used by
+default as it is much faster and still very robust.  The mmap approach
+is an older approach that proves to be slower.
+
+With the **mmap approach**, SMPI duplicates and dynamically switch the
+``.data`` and ``.bss`` segments of the ELF process when switching the
+MPI ranks. This allows each ranks to have its own copy of the global
+variables.  No copy actually occures as this mechanism uses ``mmap()``
+for efficiency. This mechanism is considered to be very robust on all
+systems supporting ``mmap()`` (Linux and most BSDs). Its performance
 is questionable since each context switch between MPI ranks induces
-several syscalls to change the \c mmap that redirects the \c .data and
-\c .bss segments to the copies of the new rank. The code will also be
-copied several times in memory, inducing a slight increase of memory
-occupation.
+several syscalls to change the ``mmap`` that redirects the ``.data``
+and ``.bss`` segments to the copies of the new rank. The code will
+also be copied several times in memory, inducing a slight increase of
+memory occupation.
 
 Another limitation is that SMPI only accounts for global variables
 defined in the executable. If the processes use external global
@@ -513,9 +539,9 @@ the library with these globals. This way, each MPI rank will get its
 own copy of these libraries. Of course you should never statically
 link against the SimGrid library itself.
 
-With the <b>dlopen approach</b>, SMPI loads several copies of the same
+With the **dlopen approach**, SMPI loads several copies of the same
 executable in memory as if it were a library, so that the global
-variables get naturally duplicated. It first requires the executable
+variables get naturally dupplicated. It first requires the executable
 to be compiled as a relocatable binary, which is less common for
 programs than for libraries. But most distributions are now compiled
 this way for security reason as it allows to randomize the address
@@ -525,25 +551,25 @@ the exact same file several times, be it a library or a relocatable
 executable. It makes perfectly sense in the general case, but we need
 to circumvent this rule of thumb in our case. To that extend, the
 binary is copied in a temporary file before being re-linked against.
-`dlmopen()` cannot be used as it only allows 256 contextes, and as it
+``dlmopen()`` cannot be used as it only allows 256 contextes, and as it
 would also dupplicate simgrid itself.
 
 This approach greatly speeds up the context switching, down to about
 40 CPU cycles with our raw contextes, instead of requesting several
-syscalls with the \c mmap approach. Another advantage is that it
+syscalls with the ``mmap()`` approach. Another advantage is that it
 permits to run the SMPI contexts in parallel, which is obviously not
-possible with the \c mmap approach. It was tricky to implement, but we
-are not aware of any flaws, so smpirun activates it by default.
+possible with the ``mmap()`` approach. It was tricky to implement, but
+we are not aware of any flaws, so smpirun activates it by default.
 
 In the future, it may be possible to further reduce the memory and
-disk consumption. It seems that we could <a
-href="https://lwn.net/Articles/415889/">punch holes</a> in the files
-before dl-loading them to remove the code and constants, and mmap
-these area onto a unique copy. If done correctly, this would reduce
-the disk- and memory- usage to the bare minimum, and would also reduce
-the pressure on the CPU instruction cache. See 
-<a href="https://github.com/simgrid/simgrid/issues/137">the relevant
-bug</a> on github for implementation leads.\n
+disk consumption. It seems that we could `punch holes
+<https://lwn.net/Articles/415889/>`_ in the files before dl-loading
+them to remove the code and constants, and mmap these area onto a
+unique copy. If done correctly, this would reduce the disk- and
+memory- usage to the bare minimum, and would also reduce the pressure
+on the CPU instruction cache. See the `relevant bug
+<https://github.com/simgrid/simgrid/issues/137>`_ on github for
+implementation leads.\n
 
 Also, currently, only the binary is copied and dlopen-ed for each MPI
 rank. We could probably extend this to external dependencies, but for
@@ -552,16 +578,22 @@ application. As usual, simgrid itself shall never be statically linked
 in your app. You don't want to give a copy of SimGrid to each MPI rank:
 that's ways too much for them to deal with.
 
-@section SMPI_adapting Adapting your MPI code for further scalability
+.. todo: speak of smpi/privatize-libs here
 
-As detailed in the reference article (available at
-http://hal.inria.fr/hal-01415484), you may want to adapt your code
+----------------------------------------------
+Adapting your MPI code for further scalability
+----------------------------------------------
+
+As detailed in the `reference article
+<http://hal.inria.fr/hal-01415484>`_, you may want to adapt your code
 to improve the simulation performance. But these tricks may seriously
 hinder the result quality (or even prevent the app to run) if used
 wrongly. We assume that if you want to simulate an HPC application,
 you know what you are doing. Don't prove us wrong!
 
-@subsection SMPI_adapting_size Reducing your memory footprint
+..............................
+Reducing your memory footprint
+..............................
 
 If you get short on memory (the whole app is executed on a single node when
 simulated), you should have a look at the SMPI_SHARED_MALLOC and
@@ -585,9 +617,11 @@ area between processes does not seem very wise. You cannot use the
 SMPI_SHARED_MALLOC macro in this case, sorry.
 
 This feature is demoed by the example file
-<tt>examples/smpi/NAS/dt.c</tt>
+`examples/smpi/NAS/dt.c <https://framagit.org/simgrid/simgrid/tree/master/examples/smpi/NAS/dt.c>`_
 
-@subsection SMPI_adapting_speed Toward faster simulations
+.........................
+Toward Faster Simulations
+.........................
 
 If your application is too slow, try using SMPI_SAMPLE_LOCAL,
 SMPI_SAMPLE_GLOBAL and friends to indicate which computation loops can
@@ -599,9 +633,11 @@ SMPI_SAMPLE_GLOBAL. Of course, none of this will work if the execution
 time of your loop iteration are not stable.
 
 This feature is demoed by the example file 
-<tt>examples/smpi/NAS/ep.c</tt>
+`examples/smpi/NAS/ep.c <https://framagit.org/simgrid/simgrid/tree/master/examples/smpi/NAS/ep.c>`_
 
-@section SMPI_accuracy Ensuring accurate simulations
+.............................
+Ensuring Accurate Simulations
+.............................
 
 Out of the box, SimGrid may give you fairly accurate results, but
 there is a plenty of factors that could go wrong and make your results
@@ -626,8 +662,8 @@ results that you observe between both settings (visualization can be
 precious for that). Then, try to modify your model (of the platform,
 of the collective operations) to reduce the most preeminent differences.
 
-If the discrepancies come from the computing time, try adapting the \c
-smpi/host-speed: reduce it if your simulation runs faster than in
+If the discrepancies come from the computing time, try adapting the 
+``smpi/host-speed``: reduce it if your simulation runs faster than in
 reality. If the error come from the communication, then you need to
 fiddle with your platform file.
 
@@ -637,65 +673,67 @@ modeling multicore/GPU machines with a set of separate hosts
 interconnected with very fast networks (but don't trust your model
 because it has the right names in the right place either).
 
-Finally, you may want to check [this
-article](https://hal.inria.fr/hal-00907887) on the classical pitfalls
-in modeling distributed systems.
+Finally, you may want to check `this article
+<https://hal.inria.fr/hal-00907887>`_ on the classical pitfalls in
+modeling distributed systems.
 
-@section SMPI_troubleshooting Troubleshooting with SMPI
+-------------------------
+Troubleshooting with SMPI
+-------------------------
 
-@subsection SMPI_trouble_configure_refuses_smpicc ./configure refuses to use smpicc
+.................................
+./configure refuses to use smpicc
+.................................
 
-If your <tt>./configure</tt> reports that the compiler is not
+If your ``./configure`` reports that the compiler is not
 functional or that you are cross-compiling, try to define the
-<tt>SMPI_PRETEND_CC</tt> environment variable before running the
+``SMPI_PRETEND_CC`` environment variable before running the
 configuration.
 
-@verbatim
-SMPI_PRETEND_CC=1 ./configure # here come the configure parameters
-make
-@endverbatim
+.. code-block:: shell
+
+   SMPI_PRETEND_CC=1 ./configure # here come the configure parameters
+   make
 
-Indeed, the programs compiled with <tt>smpicc</tt> cannot be executed
-without <tt>smpirun</tt> (they are shared libraries, and they do weird
-things on startup), while configure wants to test them directly.
-With <tt>SMPI_PRETEND_CC</tt> smpicc does not compile as shared,
-and the SMPI initialization stops and returns 0 before doing anything
-that would fail without <tt>smpirun</tt>.
+Indeed, the programs compiled with ``smpicc`` cannot be executed
+without ``smpirun`` (they are shared libraries and do weird things on
+startup), while configure wants to test them directly.  With
+``SMPI_PRETEND_CC`` smpicc does not compile as shared, and the SMPI
+initialization stops and returns 0 before doing anything that would
+fail without ``smpirun``.
 
-\warning 
+.. warning::
 
   Make sure that SMPI_PRETEND_CC is only set when calling ./configure,
   not during the actual execution, or any program compiled with smpicc
   will stop before starting.
 
-@subsection SMPI_trouble_configure_dont_find_smpicc ./configure does not pick smpicc as a compiler
+..............................................
+./configure does not pick smpicc as a compiler
+..............................................
 
 In addition to the previous answers, some projects also need to be
 explicitely told what compiler to use, as follows:
 
-@verbatim
-SMPI_PRETEND_CC=1 ./configure CC=smpicc # here come the other configure parameters
-make
-@endverbatim
+.. code-block:: shell
+               
+   SMPI_PRETEND_CC=1 ./configure CC=smpicc # here come the other configure parameters
+   make
 
-Maybe your configure is using another variable, such as <tt>cc</tt> or
-similar. Just check the logs.
+Maybe your configure is using another variable, such as ``cc`` (in
+lower case) or similar. Just check the logs.
 
-@subsection SMPI_trouble_useconds_t  error: unknown type name 'useconds_t'
+.....................................
+error: unknown type name 'useconds_t'
+.....................................
 
-Try to add <tt>-D_GNU_SOURCE</tt> to your compilation line to get ride
+Try to add ``-D_GNU_SOURCE`` to your compilation line to get ride
 of that error.
 
-The reason is that SMPI provides its own version of <tt>usleep(3)</tt>
+The reason is that SMPI provides its own version of ``usleep(3)``
 to override it and to block in the simulation world, not in the real
-one. It needs the <tt>useconds_t</tt> type for that, which is declared
-only if you declare <tt>_GNU_SOURCE</tt> before including
-<tt>unistd.h</tt>. If your project includes that header file before
+one. It needs the ``useconds_t`` type for that, which is declared
+only if you declare ``_GNU_SOURCE`` before including
+``unistd.h``. If your project includes that header file before
 SMPI, then you need to ensure that you pass the right configuration
 defines as advised above.
-
-
-*/
-
-
-/** @example include/smpi/smpi.h */
index e2b087a..4f0935e 100644 (file)
@@ -21,8 +21,8 @@ application using one of the following interfaces. It is even possible
 to mix several interfaces in the same simulation.
 
  - :ref:`Describing Algorithms with the S4U interface <S4U_doc>` (in C++)
- - Simulating existing MPI programs with the SMPI toolsuite (in C, C++,
-   or Fortran)
+ - :ref:`Simulating existing MPI programs with the SMPI toolsuite <SMPI_doc>`
+   (in C, C++, or Fortran)
  - In some cases, you may want to replay an execution trace in the simulator. This
    trace lists the events of your application or of your workload, and
    your application is decomposed as a list of event handlers that are
@@ -58,12 +58,10 @@ additional work.
 .. The old documentation of the obsolete MSG replay module was removed in
 ..  https://github.com/simgrid/simgrid/commit/e05361c201fb95d2b7605e59001cd0a49a489739
 
-
-.. include:: app_smpi.rst
-
-.. include:: app_legacy.rst
-
 .. toctree::
    :hidden:
 
       The S4U Interface <app_s4u.rst>
+      The SMPI Interface <app_smpi.rst>
+
+      
index 9f3d260..dc1f498 100644 (file)
@@ -41,9 +41,6 @@ release = u'3.21'
 # ones.
 extensions = [
     'sphinx.ext.todo',
-#    'sphinx.ext.coverage',
-#    'sphinx.ext.mathjax',
-#    'sphinx.ext.ifconfig',
     'breathe',
     'exhale',
     'hidden_code_block',
index 8ab5750..ea1761a 100644 (file)
@@ -6,8 +6,9 @@ Installing SimGrid
 ==================
 
 
-SimGrid should work out of the box on Linux, Mac OSX, FreeBSD, and Windows (under windows, only the Java interfaces are
-available at the moment).
+SimGrid should work out of the box on Linux, Mac OSX, FreeBSD, and
+Windows (under Windows, you need to install the Windows Subsystem
+Linux to get more than the Java bindings).
 
 Pre-compiled Packages
 ---------------------
@@ -121,13 +122,15 @@ dependencies.
    make
    make install
 
+.. _install_src_config:
+   
 Build Configuration
 ^^^^^^^^^^^^^^^^^^^
 
 This section is about **compile-time options**, that are very
-different from @ref options "run-time options". Compile-time options
-fall into two categories. *SimGrid-specific options* define which part
-of the framework to compile while *Generic options* are provided by
+different from :ref:`run-time options <options>`. Compile-time options
+fall into two categories. **SimGrid-specific options** define which part
+of the framework to compile while **Generic options** are provided by
 cmake itself.
 
 Generic build-time options
index 727330b..f0ec5c6 100644 (file)
@@ -6,8 +6,8 @@ Start your Own Project
 It is not advised to modify the SimGrid source code directly, as it
 will make it difficult to upgrade to the next version of SimGrid.
 Instead, you should create your own working directory somewhere on
-your disk (say `/home/joe/MyFirstSimulator/`), and write your code in
-there.
+your disk (say ``/home/joe/MyFirstSimulator/``), and write your code
+in there.
 
 Cloning a Template Project for S4U
 ----------------------------------
index 671a6b0..69ff7da 100644 (file)
@@ -14,3 +14,1535 @@ Configuring SimGrid
    </script>
    <br/>
    <br/>
+
+A number of options can be given at runtime to change the default
+SimGrid behavior. For a complete list of all configuration options
+accepted by the SimGrid version used in your simulator, simply pass
+the --help configuration flag to your program. If some of the options
+are not documented on this page, this is a bug that you should please
+report so that we can fix it. Note that some of the options presented
+here may not be available in your simulators, depending on the
+:ref:`compile-time options <install_src_config>` that you used.
+
+Setting Configuration Items
+---------------------------
+
+There is several way to pass configuration options to the simulators.
+The most common way is to use the ``--cfg`` command line argument. For
+example, to set the item ``Item`` to the value ``Value``, simply
+type the following on the command-line:
+
+.. code-block:: shell
+               
+   my_simulator --cfg=Item:Value (other arguments)
+
+Several ``--cfg`` command line arguments can naturally be used. If you
+need to include spaces in the argument, don't forget to quote the
+argument. You can even escape the included quotes (write @' for ' if
+you have your argument between ').
+
+Another solution is to use the ``<config>`` tag in the platform file. The
+only restriction is that this tag must occure before the first
+platform element (be it ``<zone>``, ``<cluster>``, ``<peer>`` or whatever).
+The ``<config>`` tag takes an ``id`` attribute, but it is currently
+ignored so you don't really need to pass it. The important part is that
+within that tag, you can pass one or several ``<prop>`` tags to specify
+the configuration to use. For example, setting ``Item`` to ``Value``
+can be done by adding the following to the beginning of your platform
+file:
+
+.. code-block:: xml
+               
+  <config>
+    <prop id="Item" value="Value"/>
+  </config>
+
+A last solution is to pass your configuration directly in your program
+with :cpp:func:`simgrid::s4u::Engine::set_config` or :cpp:func:`MSG_config`.
+
+.. code-block:: cpp
+               
+   #include <simgrid/s4u.hpp>
+
+   int main(int argc, char *argv[]) {
+     simgrid::s4u::Engine e(&argc, argv);
+     
+     e->set_config("Item:Value");
+     
+     // Rest of your code
+   }
+
+Existing Configuration Items
+----------------------------
+
+.. note::
+  The full list can be retrieved by passing ``--help`` and
+  ``--help-cfg`` to an executable that uses SimGrid.
+
+- **clean-atexit:** :ref:`cfg=clean-atexit`
+
+- **contexts/factory:** :ref:`cfg=contexts/factory`
+- **contexts/guard-size:** :ref:`cfg=contexts/guard-size`
+- **contexts/nthreads:** :ref:`cfg=contexts/nthreads`
+- **contexts/parallel-threshold:** :ref:`cfg=contexts/parallel-threshold`
+- **contexts/stack-size:** :ref:`cfg=contexts/stack-size`
+- **contexts/synchro:** :ref:`cfg=contexts/synchro`
+
+- **cpu/maxmin-selective-update:** :ref:`Cpu Optimization Level <options_model_optim>`
+- **cpu/model:** :ref:`options_model_select`
+- **cpu/optim:** :ref:`Cpu Optimization Level <options_model_optim>`
+
+- **exception/cutpath:** :ref:`cfg=exception/cutpath`
+
+- **host/model:** :ref:`options_model_select`
+
+- **maxmin/precision:** :ref:`cfg=maxmin/precision`
+- **maxmin/concurrency-limit:** :ref:`cfg=maxmin/concurrency-limit`
+
+- **msg/debug-multiple-use:** :ref:`cfg=msg/debug-multiple-use`
+
+- **model-check:** :ref:`options_modelchecking`
+- **model-check/checkpoint:** :ref:`cfg=model-check/checkpoint`
+- **model-check/communications-determinism:** :ref:`cfg=model-check/communications-determinism`
+- **model-check/dot-output:** :ref:`cfg=model-check/dot-output`
+- **model-check/hash:** :ref:`cfg=model-checker/hash`
+- **model-check/max-depth:** :ref:`cfg=model-check/max-depth`
+- **model-check/property:** :ref:`cfg=model-check/property`
+- **model-check/record:** :ref:`cfg=model-check/record`
+- **model-check/reduction:** :ref:`cfg=model-check/reduction`
+- **model-check/replay:** :ref:`cfg=model-check/replay`
+- **model-check/send-determinism:** :ref:`cfg=model-check/send-determinism`
+- **model-check/sparse-checkpoint:** :ref:`cfg=model-check/sparse-checkpoint`
+- **model-check/termination:** :ref:`cfg=model-check/termination`
+- **model-check/timeout:** :ref:`cfg=model-check/timeout`
+- **model-check/visited:** :ref:`cfg=model-check/visited`
+
+- **network/bandwidth-factor:** :ref:`cfg=network/bandwidth-factor`
+- **network/crosstraffic:** :ref:`cfg=opt_network/crosstraffic`
+- **network/latency-factor:** :ref:`cfg=network/latency-factor`
+- **network/maxmin-selective-update:** :ref:`Network Optimization Level <options_model_optim>`
+- **network/model:** :ref:`options_model_select`
+- **network/optim:** :ref:`Network Optimization Level <options_model_optim>`
+- **network/TCP-gamma:** :ref:`cfg=network/TCP-gamma`
+- **network/weight-S:** :ref:`cfg=network/weight-S`
+
+- **ns3/TcpModel:** :ref:`options_pls`
+- **path:** :ref:`cfg=path`
+- **plugin:** :ref:`cfg=plugin`
+
+- **simix/breakpoint:** :ref:`cfg=simix/breakpoint`
+
+- **storage/max_file_descriptors:** :ref:`cfg=storage/max_file_descriptors`
+
+- **surf/precision:** :ref:`cfg=surf/precision`
+
+- **For collective operations of SMPI,** please refer to Section :ref:`options_index_smpi_coll`
+- **smpi/async-small-thresh:** :ref:`cfg=smpi/async-small-thresh`
+- **smpi/bw-factor:** :ref:`cfg=smpi/bw-factor`
+- **smpi/coll-selector:** :ref:`cfg=smpi/coll-selector`
+- **smpi/comp-adjustment-file:** :ref:`cfg=smpi/comp-adjustment-file`
+- **smpi/cpu-threshold:** :ref:`cfg=smpi/cpu-threshold`
+- **smpi/display-timing:** :ref:`cfg=smpi/display-timing`
+- **smpi/grow-injected-times:** :ref:`cfg=smpi/grow-injected-times`
+- **smpi/host-speed:** :ref:`cfg=smpi/host-speed`
+- **smpi/IB-penalty-factors:** :ref:`cfg=smpi/IB-penalty-factors`
+- **smpi/iprobe:** :ref:`cfg=smpi/iprobe`
+- **smpi/iprobe-cpu-usage:** :ref:`cfg=smpi/iprobe-cpu-usage`
+- **smpi/init:** :ref:`cfg=smpi/init`
+- **smpi/keep-temps:** :ref:`cfg=smpi/keep-temps`
+- **smpi/lat-factor:** :ref:`cfg=smpi/lat-factor`
+- **smpi/ois:** :ref:`cfg=smpi/ois`
+- **smpi/or:** :ref:`cfg=smpi/or`
+- **smpi/os:** :ref:`cfg=smpi/os`
+- **smpi/papi-events:** :ref:`cfg=smpi/papi-events`
+- **smpi/privatization:** :ref:`cfg=smpi/privatization`
+- **smpi/privatize-libs:** :ref:`cfg=smpi/privatize-libs`
+- **smpi/send-is-detached-thresh:** :ref:`cfg=smpi/send-is-detached-thresh`
+- **smpi/shared-malloc:** :ref:`cfg=smpi/shared-malloc`
+- **smpi/shared-malloc-hugepage:** :ref:`cfg=smpi/shared-malloc-hugepage`
+- **smpi/simulate-computation:** :ref:`cfg=smpi/simulate-computation`
+- **smpi/test:** :ref:`cfg=smpi/test`
+- **smpi/wtime:** :ref:`cfg=smpi/wtime`
+
+- **Tracing configuration options** can be found in Section :ref:`tracing_tracing_options`
+
+- **storage/model:** :ref:`options_model_select`
+- **verbose-exit:** :ref:`cfg=verbose-exit`
+
+- **vm/model:** :ref:`options_model_select`
+
+.. _options_index_smpi_coll:
+
+Index of SMPI collective algorithms options
+
+.. TODO:: All available collective algorithms will be made available
+          via the ``smpirun --help-coll`` command.
+
+.. _options_model:
+
+Configuring the Platform Models
+-------------------------------
+
+.. _options_model_select:
+
+Choosing the Platform Models
+............................
+
+SimGrid comes with several network, CPU and storage models built in,
+and you can change the used model at runtime by changing the passed
+configuration. The three main configuration items are given below.
+For each of these items, passing the special ``help`` value gives you
+a short description of all possible values (for example,
+``--cfg=network/model:help`` will present all provided network
+models). Also, ``--help-models`` should provide information about all
+models for all existing resources.
+
+- ``network/model``: specify the used network model. Possible values:
+  
+  - **LV08 (default one):** Realistic network analytic model
+    (slow-start modeled by multiplying latency by 13.01, bandwidth by
+    .97; bottleneck sharing uses a payload of S=20537 for evaluating
+    RTT). Described in `Accuracy Study and Improvement of Network
+    Simulation in the SimGrid Framework
+    <http://mescal.imag.fr/membres/arnaud.legrand/articles/simutools09.pdf>`_.     
+  - **Constant:** Simplistic network model where all communication
+    take a constant time (one second). This model provides the lowest
+    realism, but is (marginally) faster.
+  - **SMPI:** Realistic network model specifically tailored for HPC
+    settings (accurate modeling of slow start with correction factors on
+    three intervals: < 1KiB, < 64 KiB, >= 64 KiB). This model can be
+    :ref:`further configured <options_model_network>`.
+  - **IB:** Realistic network model specifically tailored for HPC
+    settings with InfiniBand networks (accurate modeling contention
+    behavior, based on the model explained in `this PhD work
+    <http://mescal.imag.fr/membres/jean-marc.vincent/index.html/PhD/Vienne.pdf>`_.
+    This model can be :ref:`further configured <options_model_network>`.
+  - **CM02:** Legacy network analytic model. Very similar to LV08, but
+    without corrective factors. The timings of small messages are thus
+    poorly modeled. This model is described in `A Network Model for
+    Simulation of Grid Application
+    <ftp://ftp.ens-lyon.fr/pub/LIP/Rapports/RR/RR2002/RR2002-40.ps.gz>`_.
+  - **Reno/Reno2/Vegas:** Models from Steven H. Low using lagrange_solve instead of
+    lmm_solve (experts only; check the code for more info).
+  - **NS3** (only available if you compiled SimGrid accordingly): 
+    Use the packet-level network
+    simulators as network models (see :ref:`pls_ns3`).
+    This model can be :ref:`further configured <options_pls>`.
+    
+- ``cpu/model``: specify the used CPU model.  We have only one model
+  for now:
+
+  - **Cas01:** Simplistic CPU model (time=size/power)
+
+- ``host/model``: The host concept is the aggregation of a CPU with a
+  network card. Three models exists, but actually, only 2 of them are
+  interesting. The "compound" one is simply due to the way our
+  internal code is organized, and can easily be ignored. So at the
+  end, you have two host models: The default one allows to aggregate
+  an existing CPU model with an existing network model, but does not
+  allow parallel tasks because these beasts need some collaboration
+  between the network and CPU model. That is why, ptask_07 is used by
+  default when using SimDag.
+  
+  - **default:** Default host model. Currently, CPU:Cas01 and
+    network:LV08 (with cross traffic enabled)
+  - **compound:** Host model that is automatically chosen if
+    you change the network and CPU models
+  - **ptask_L07:** Host model somehow similar to Cas01+CM02 but
+    allowing "parallel tasks", that are intended to model the moldable
+    tasks of the grid scheduling literature.
+
+- ``storage/model``: specify the used storage model. Only one model is
+  provided so far.
+- ``vm/model``: specify the model for virtual machines. Only one model
+  is provided so far.
+
+.. todo: make 'compound' the default host model.
+
+.. _options_model_optim:
+
+Optimization Level
+..................
+
+The network and CPU models that are based on lmm_solve (that
+is, all our analytical models) accept specific optimization
+configurations.
+
+  - items ``network/optim`` and ``cpu/optim`` (both default to 'Lazy'):
+    
+    - **Lazy:** Lazy action management (partial invalidation in lmm +
+      heap in action remaining).
+    - **TI:** Trace integration. Highly optimized mode when using
+      availability traces (only available for the Cas01 CPU model for
+      now).
+    - **Full:** Full update of remaining and variables. Slow but may be
+      useful when debugging.
+      
+  - items ``network/maxmin-selective-update`` and
+    ``cpu/maxmin-selective-update``: configure whether the underlying
+    should be lazily updated or not. It should have no impact on the
+    computed timings, but should speed up the computation. |br| It is
+    still possible to disable this feature because it can reveal
+    counter-productive in very specific scenarios where the
+    interaction level is high. In particular, if all your
+    communication share a given backbone link, you should disable it:
+    without it, a simple regular loop is used to update each
+    communication. With it, each of them is still updated (because of
+    the dependency induced by the backbone), but through a complicated
+    and slow pattern that follows the actual dependencies.
+
+.. _cfg=maxmin/precision:
+.. _cfg=surf/precision:
+
+Numerical Precision
+...................
+
+**Option** ``maxmin/precision`` **Default:** 0.00001 (in flops or bytes) |br|
+**Option** ``surf/precision`` **Default:** 0.00001 (in seconds)
+
+The analytical models handle a lot of floating point values. It is
+possible to change the epsilon used to update and compare them through
+this configuration item. Changing it may speedup the simulation by
+discarding very small actions, at the price of a reduced numerical
+precision. You can modify separately the precision used to manipulate
+timings (in seconds) and the one used to manipulate amounts of work
+(in flops or bytes).
+
+.. _cfg=maxmin/concurrency-limit:
+
+Concurrency Limit
+.................
+
+**Option** ``maxmin/concurrency-limit`` **Default:** -1 (no limit)
+
+The maximum number of variables per resource can be tuned through this
+option. You can have as many simultaneous actions per resources as you
+want. If your simulation presents a very high level of concurrency, it
+may help to use e.g. 100 as a value here. It means that at most 100
+actions can consume a resource at a given time. The extraneous actions
+are queued and wait until the amount of concurrency of the considered
+resource lowers under the given boundary.
+
+Such limitations help both to the simulation speed and simulation accuracy
+on highly constrained scenarios, but the simulation speed suffers of this
+setting on regular (less constrained) scenarios so it is off by default.
+
+.. _options_model_network:
+
+Configuring the Network Model
+.............................
+
+.. _cfg=network/TCP-gamma:
+
+Maximal TCP Window Size
+^^^^^^^^^^^^^^^^^^^^^^^
+
+**Option** ``network/TCP-gamma`` **Default:** 4194304
+
+The analytical models need to know the maximal TCP window size to take
+the TCP congestion mechanism into account.  On Linux, this value can
+be retrieved using the following commands. Both give a set of values,
+and you should use the last one, which is the maximal size.
+
+.. code-block:: shell
+               
+   cat /proc/sys/net/ipv4/tcp_rmem # gives the sender window
+   cat /proc/sys/net/ipv4/tcp_wmem # gives the receiver window
+
+.. _cfg=smpi/IB-penalty-factors:
+.. _cfg=network/bandwidth-factor:
+.. _cfg=network/latency-factor:
+.. _cfg=network/weight-S:
+   
+Correcting Important Network Parameters
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+SimGrid can take network irregularities such as a slow startup or
+changing behavior depending on the message size into account.  You
+should not change these values unless you really know what you're
+doing.  The corresponding values were computed through data fitting
+one the timings of packet-level simulators, as described in `Accuracy
+Study and Improvement of Network Simulation in the SimGrid Framework
+<http://mescal.imag.fr/membres/arnaud.legrand/articles/simutools09.pdf>`_.
+
+
+If you are using the SMPI model, these correction coefficients are
+themselves corrected by constant values depending on the size of the
+exchange.  By default SMPI uses factors computed on the Stampede
+Supercomputer at TACC, with optimal deployment of processes on
+nodes. Again, only hardcore experts should bother about this fact.
+
+InfiniBand network behavior can be modeled through 3 parameters
+``smpi/IB-penalty-factors:"βe;βs;γs"``, as explained in `this PhD
+thesis
+<http://mescal.imag.fr/membres/jean-marc.vincent/index.html/PhD/Vienne.pdf>`_.
+
+.. todo:: This section should be rewritten, and actually explain the
+         options network/bandwidth-factor, network/latency-factor,
+         network/weight-S.
+
+.. _opt_network/crosstraffic:
+
+Simulating Cross-Traffic
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Since SimGrid v3.7, cross-traffic effects can be taken into account in
+analytical simulations. It means that ongoing and incoming
+communication flows are treated independently. In addition, the LV08
+model adds 0.05 of usage on the opposite direction for each new
+created flow. This can be useful to simulate some important TCP
+phenomena such as ack compression.
+
+For that to work, your platform must have two links for each
+pair of interconnected hosts. An example of usable platform is
+available in ``examples/platforms/crosstraffic.xml``.
+
+This is activated through the ``network/crosstraffic`` item, that
+can be set to 0 (disable this feature) or 1 (enable it).
+
+Note that with the default host model this option is activated by default.
+
+.. _cfg=smpi/async-small-thresh:
+
+Simulating Asyncronous Send
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+(this configuration item is experimental and may change or disapear)
+
+It is possible to specify that messages below a certain size will be
+sent as soon as the call to MPI_Send is issued, without waiting for
+the correspondant receive. This threshold can be configured through
+the ``smpi/async-small-thresh`` item. The default value is 0. This
+behavior can also be manually set for mailboxes, by setting the
+receiving mode of the mailbox with a call to
+:cpp:func:`MSG_mailbox_set_async`. After this, all messages sent to
+this mailbox will have this behavior regardless of the message size.
+
+This value needs to be smaller than or equals to the threshold set at
+@ref options_model_smpi_detached , because asynchronous messages are
+meant to be detached as well.
+
+.. _options_pls:
+
+Configuring NS3
+^^^^^^^^^^^^^^^
+
+**Option** ``ns3/TcpModel`` **Default:** "default" (NS3 default)
+
+When using NS3, there is an extra item ``ns3/TcpModel``, corresponding
+to the ``ns3::TcpL4Protocol::SocketType`` configuration item in
+NS3. The only valid values (enforced on the SimGrid side) are
+'default' (no change to the NS3 configuration), 'NewReno' or 'Reno' or
+'Tahoe'.
+
+Configuring the Storage model
+.............................
+
+.. _cfg=storage/max_file_descriptors:
+
+File Descriptor Cound per Host
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+**Option** ``storage/max_file_descriptors`` **Default:** 1024
+
+Each host maintains a fixed-size array of its file descriptors. You
+can change its size through this item to either enlarge it if your
+application requires it or to reduce it to save memory space.
+
+.. _cfg=plugin:
+
+Activating Plugins
+------------------
+
+SimGrid plugins allow to extend the framework without changing its
+source code directly. Read the source code of the existing plugins to
+learn how to do so (in ``src/plugins``), and ask your questions to the
+usual channels (Stack Overflow, Mailing list, IRC). The basic idea is
+that plugins usually register callbacks to some signals of interest.
+If they need to store some information about a given object (Link, CPU
+or Actor), they do so through the use of a dedicated object extension.
+
+Some of the existing plugins can be activated from the command line,
+meaning that you can activate them from the command line without any
+modification to your simulation code. For example, you can activate
+the host energy plugin by adding ``--cfg=plugin:host_energy`` to your
+command line.
+
+Here is the full list of plugins that can be activated this way:
+
+ - **host_energy:** keeps track of the energy dissipated by
+   computations. More details in @ref plugin_energy.
+ - **link_energy:** keeps track of the energy dissipated by
+   communications. More details in @ref SURF_plugin_energy.
+ - **host_load:** keeps track of the computational load. 
+   More details in @ref plugin_load.
+
+.. _options_modelchecking:
+   
+Configuring the Model-Checking
+------------------------------
+
+To enable the SimGrid model-checking support the program should
+be executed using the simgrid-mc wrapper:
+
+.. code-block:: shell
+               
+   simgrid-mc ./my_program
+
+Safety properties are expressed as assertions using the function
+:cpp:func:`void MC_assert(int prop)`.
+
+.. _cfg=model-check/property:
+     
+Specifying a liveness property
+..............................
+
+**Option** ``model-check/property`` **Default:** unset
+
+If you want to specify liveness properties, you have to pass them on
+the command line, specifying the name of the file containing the
+property, as formatted by the ltl2ba program.
+
+
+.. code-block:: shell
+               
+   simgrid-mc ./my_program --cfg=model-check/property:<filename>
+
+.. _cfg=model-check/checkpoint:
+   
+Going for Stateful Verification
+...............................
+
+By default, the system is backtracked to its initial state to explore
+another path instead of backtracking to the exact step before the fork
+that we want to explore (this is called stateless verification). This
+is done this way because saving intermediate states can rapidly
+exhaust the available memory. If you want, you can change the value of
+the ``model-check/checkpoint`` item. For example,
+``--cfg=model-check/checkpoint:1`` asks to take a checkpoint every
+step.  Beware, this will certainly explode your memory. Larger values
+are probably better, make sure to experiment a bit to find the right
+setting for your specific system.
+
+.. _cfg=model-check/reduction:
+
+Specifying the kind of reduction
+................................
+
+The main issue when using the model-checking is the state space
+explosion. To counter that problem, you can chose a exploration
+reduction techniques with
+``--cfg=model-check/reduction:<technique>``. For now, this
+configuration variable can take 2 values:
+
+ - **none:** Do not apply any kind of reduction (mandatory for now for
+   liveness properties)
+ - **dpor:** Apply Dynamic Partial Ordering Reduction. Only valid if
+   you verify local safety properties (default value for safety
+   checks).
+
+There is unfortunately no silver bullet here, and the most efficient
+reduction techniques cannot be applied to any properties. In
+particular, the DPOR method cannot be applied on liveness properties
+since our implementation of DPOR may break some cycles, while cycles
+are very important to the soundness of the exploration for liveness
+properties.
+
+.. _cfg=model-check/visited:
+
+Size of Cycle Detection Set
+...........................
+
+In order to detect cycles, the model-checker needs to check if a new
+explored state is in fact the same state than a previous one. For
+that, the model-checker can take a snapshot of each visited state:
+this snapshot is then used to compare it with subsequent states in the
+exploration graph.
+
+The ``model-check/visited`` item is the maximum number of states which
+are stored in memory. If the maximum number of snapshotted state is
+reached, some states will be removed from the memory and some cycles
+might be missed. Small values can lead to incorrect verifications, but
+large value can exhaust your memory, so choose carefully.
+
+By default, no state is snapshotted and cycles cannot be detected.
+
+.. _cfg=model-check/termination:
+
+Non-Termination Detection
+.........................
+
+The ``model-check/termination`` configuration item can be used to
+report if a non-termination execution path has been found. This is a
+path with a cycle which means that the program might never terminate.
+
+This only works in safety mode, not in liveness mode.
+
+This options is disabled by default.
+
+.. _cfg=model-check/dot-output:
+
+Dot Output
+..........
+
+If set, the ``model-check/dot-output`` configuration item is the name
+of a file in which to write a dot file of the path leading the found
+property (safety or liveness violation) as well as the cycle for
+liveness properties. This dot file can then fed to the graphviz dot
+tool to generate an corresponding graphical representation.
+
+.. _cfg=model-check/max-depth:
+
+Exploration Depth Limit
+.......................
+
+The ``model-checker/max-depth`` can set the maximum depth of the
+exploration graph of the model-checker. If this limit is reached, a
+logging message is sent and the results might not be exact.
+
+By default, there is not depth limit.
+
+.. _cfg=model-check/timeout:
+
+Handling of Timeouts
+....................
+
+By default, the model-checker does not handle timeout conditions: the `wait`
+operations never time out. With the ``model-check/timeout`` configuration item
+set to **yes**, the model-checker will explore timeouts of `wait` operations.
+
+.. _cfg=model-check/communications-determinism:
+.. _cfg=model-check/send-determinism:
+
+Communication Determinism
+.........................
+
+The ``model-check/communications-determinism`` and
+``model-check/send-determinism`` items can be used to select the
+communication determinism mode of the model-checker which checks
+determinism properties of the communications of an application.
+
+.. _cfg=model-check/sparse-checkpoint:
+
+Incremental Checkpoints
+.......................
+
+When the model-checker is configured to take a snapshot of each
+explored state (with the ``model-checker/visited`` item), the memory
+consumption can rapidly reach GiB ou Tib of memory. However, for many
+workloads, the memory does not change much between different snapshots
+and taking a complete copy of each snapshot is a waste of memory.
+
+The ``model-check/sparse-checkpoint`` option item can be set to
+**yes** to avoid making a complete copy of each snapshot. Instead,
+each snapshot will be decomposed in blocks which will be stored
+separately.  If multiple snapshots share the same block (or if the
+same block is used in the same snapshot), the same copy of the block
+will be shared leading to a reduction of the memory footprint.
+
+For many applications, this option considerably reduces the memory
+consumption.  In somes cases, the model-checker might be slightly
+slower because of the time taken to manage the metadata about the
+blocks. In other cases however, this snapshotting strategy will be
+much faster by reducing the cache consumption.  When the memory
+consumption is important, by avoiding to hit the swap or reducing the
+swap usage, this option might be much faster than the basic
+snapshotting strategy.
+
+This option is currently disabled by default.
+
+Verification Performance Considerations
+.......................................
+
+The size of the stacks can have a huge impact on the memory
+consumption when using model-checking. By default, each snapshot will
+save a copy of the whole stacks and not only of the part which is
+really meaningful: you should expect the contribution of the memory
+consumption of the snapshots to be @f$ @mbox{number of processes}
+@times @mbox{stack size} @times @mbox{number of states} @f$.
+
+The @b model-check/sparse-checkpoint can be used to reduce the memory
+consumption by trying to share memory between the different snapshots.
+
+When compiled against the model checker, the stacks are not
+protected with guards: if the stack size is too small for your
+application, the stack will silently overflow on other parts of the
+memory (see @ref options_virt_guard_size).
+
+.. _cfg=model-checker/hash:
+
+State Hashing
+.............
+
+Usually most of the time of the model-checker is spent comparing states. This
+process is complicated and consumes a lot of bandwidth and cache.
+In order to speedup the state comparison, the experimental ``model-checker/hash``
+configuration item enables the computation of a hash summarizing as much
+information of the state as possible into a single value. This hash can be used
+to avoid most of the comparisons: the costly comparison is then only used when
+the hashes are identical.
+
+Currently most of the state is not included in the hash because the
+implementation was found to be buggy and this options is not as useful as
+it could be. For this reason, it is currently disabled by default.
+
+.. _cfg=model-check/record:
+.. _cfg=model-check/replay:
+
+Record/Replay of Verification
+.............................
+
+As the model-checker keeps jumping at different places in the execution graph,
+it is difficult to understand what happens when trying to debug an application
+under the model-checker. Event the output of the program is difficult to
+interpret. Moreover, the model-checker does not behave nicely with advanced
+debugging tools such as valgrind. For those reason, to identify a trajectory
+in the execution graph with the model-checker and replay this trajcetory and
+without the model-checker black-magic but with more standard tools
+(such as a debugger, valgrind, etc.). For this reason, Simgrid implements an
+experimental record/replay functionnality in order to record a trajectory with
+the model-checker and replay it without the model-checker.
+
+When the model-checker finds an interesting path in the application
+execution graph (where a safety or liveness property is violated), it
+can generate an identifier for this path. To enable this behavious the
+``model-check/record`` must be set to **yes**, which is not the case
+by default.
+
+Here is an example of output:
+
+.. code-block:: shell
+
+   [  0.000000] (0:@) Check a safety property
+   [  0.000000] (0:@) **************************
+   [  0.000000] (0:@) *** PROPERTY NOT VALID ***
+   [  0.000000] (0:@) **************************
+   [  0.000000] (0:@) Counter-example execution trace:
+   [  0.000000] (0:@) Path = 1/3;1/4
+   [  0.000000] (0:@) [(1)Tremblay (app)] MC_RANDOM(3)
+   [  0.000000] (0:@) [(1)Tremblay (app)] MC_RANDOM(4)
+   [  0.000000] (0:@) Expanded states = 27
+   [  0.000000] (0:@) Visited states = 68
+   [  0.000000] (0:@) Executed transitions = 46
+
+This path can then be replayed outside of the model-checker (and even
+in non-MC build of simgrid) by setting the ``model-check/replay`` item
+to the given path. The other options should be the same (but the
+model-checker should be disabled).
+
+The format and meaning of the path may change between different
+releases so the same release of Simgrid should be used for the record
+phase and the replay phase.
+
+Configuring the User Code Virtualization
+----------------------------------------
+
+.. _cfg=contexts/factory:
+
+Selecting the Virtualization Factory
+....................................
+
+**Option** contexts/factory **Default:** "raw"
+
+In SimGrid, the user code is virtualized in a specific mechanism that
+allows the simulation kernel to control its execution: when a user
+process requires a blocking action (such as sending a message), it is
+interrupted, and only gets released when the simulated clock reaches
+the point where the blocking operation is done. This is explained
+graphically in the `relevant tutorial, available online
+<http://simgrid.gforge.inria.fr/tutorials/simgrid-simix-101.pdf>`_.
+
+In SimGrid, the containers in which user processes are virtualized are
+called contexts. Several context factory are provided, and you can
+select the one you want to use with the ``contexts/factory``
+configuration item. Some of the following may not exist on your
+machine because of portability issues. In any case, the default one
+should be the most effcient one (please report bugs if the
+auto-detection fails for you). They are approximately sorted here from
+the slowest to the most efficient:
+
+ - **thread:** very slow factory using full featured threads (either
+   pthreads or windows native threads). They are slow but very
+   standard. Some debuggers or profilers only work with this factory.
+ - **java:** Java applications are virtualized onto java threads (that
+   are regular pthreads registered to the JVM)
+ - **ucontext:** fast factory using System V contexts (Linux and FreeBSD only)
+ - **boost:** This uses the `context
+   implementation <http://www.boost.org/doc/libs/1_59_0/libs/context/doc/html/index.html>`_
+   of the boost library for a performance that is comparable to our
+   raw implementation.
+   |br| Install the relevant library (e.g. with the
+   libboost-contexts-dev package on Debian/Ubuntu) and recompile
+   SimGrid. 
+ - **raw:** amazingly fast factory using a context switching mechanism
+   of our own, directly implemented in assembly (only available for x86
+   and amd64 platforms for now) and without any unneeded system call.
+
+The main reason to change this setting is when the debugging tools get
+fooled by the optimized context factories. Threads are the most
+debugging-friendly contextes, as they allow to set breakpoints
+anywhere with gdb and visualize backtraces for all processes, in order
+to debug concurrency issues. Valgrind is also more comfortable with
+threads, but it should be usable with all factories (Exception: the
+callgrind tool really dislikes raw and ucontext factories).
+
+.. _cfg=contexts/stack-size:
+
+Adapting the Stack Size
+.......................
+
+**Option** ``contexts/stack-size`` **Default:** 8192 KiB
+
+Each virtualized used process is executed using a specific system
+stack. The size of this stack has a huge impact on the simulation
+scalability, but its default value is rather large. This is because
+the error messages that you get when the stack size is too small are
+rather disturbing: this leads to stack overflow (overwriting other
+stacks), leading to segfaults with corrupted stack traces.
+
+If you want to push the scalability limits of your code, you might
+want to reduce the ``contexts/stack-size`` item. Its default value is
+8192 (in KiB), while our Chord simulation works with stacks as small
+as 16 KiB, for example. For the thread factory, the default value is
+the one of the system but you can still change it with this parameter.
+
+The operating system should only allocate memory for the pages of the
+stack which are actually used and you might not need to use this in
+most cases. However, this setting is very important when using the
+model checker (see :ref:`options_mc_perf`).
+
+.. _cfg=contexts:guard-size:
+
+Disabling Stack Guard Pages
+...........................
+
+**Option** ``contexts:guard-size`` **Default** 1 page in most case (0 pages on Windows or with MC)
+
+A stack guard page is usually used which prevents the stack of a given
+actor from overflowing on another stack. But the performance impact
+may become prohibitive when the amount of actors increases.  The
+option ``contexts:guard-size`` is the number of stack guard pages
+used.  By setting it to 0, no guard pages will be used: in this case,
+you should avoid using small stacks (with :ref:`contexts/stack-size
+<cfg=contexts/stack-size>`) as the stack will silently overflow on
+other parts of the memory.
+
+When no stack guard page is created, stacks may then silently overflow
+on other parts of the memory if their size is too small for the
+application.
+
+.. _cfg=contexts/nthreads:
+.. _cfg=contexts/parallel-threshold:
+.. _cfg=contexts/synchro:
+  
+Running User Code in Parallel
+.............................
+
+Parallel execution of the user code is only considered stable in
+SimGrid v3.7 and higher, and mostly for MSG simulations. SMPI
+simulations may well fail in parallel mode. It is described in
+`INRIA RR-7653 <http://hal.inria.fr/inria-00602216/>`_.
+
+If you are using the **ucontext** or **raw** context factories, you can
+request to execute the user code in parallel. Several threads are
+launched, each of them handling as much user contexts at each run. To
+actiave this, set the ``contexts/nthreads`` item to the amount of
+cores that you have in your computer (or lower than 1 to have
+the amount of cores auto-detected).
+
+Even if you asked several worker threads using the previous option,
+you can request to start the parallel execution (and pay the
+associated synchronization costs) only if the potential parallelism is
+large enough. For that, set the ``contexts/parallel-threshold``
+item to the minimal amount of user contexts needed to start the
+parallel execution. In any given simulation round, if that amount is
+not reached, the contexts will be run sequentially directly by the
+main thread (thus saving the synchronization costs). Note that this
+option is mainly useful when the grain of the user code is very fine,
+because our synchronization is now very efficient.
+
+When parallel execution is activated, you can choose the
+synchronization schema used with the ``contexts/synchro`` item,
+which value is either:
+
+ - **futex:** ultra optimized synchronisation schema, based on futexes
+   (fast user-mode mutexes), and thus only available on Linux systems.
+   This is the default mode when available.
+ - **posix:** slow but portable synchronisation using only POSIX
+   primitives.
+ - **busy_wait:** not really a synchronisation: the worker threads
+   constantly request new contexts to execute. It should be the most
+   efficient synchronisation schema, but it loads all the cores of
+   your machine for no good reason. You probably prefer the other less
+   eager schemas.
+
+   
+Configuring the Tracing
+-----------------------
+
+The :ref:`tracing subsystem <outcomes_vizu>` can be configured in
+several different ways depending on the nature of the simulator (MSG,
+SimDag, SMPI) and the kind of traces that need to be obtained. See the
+:ref:`Tracing Configuration Options subsection
+<tracing_tracing_options>` to get a detailed description of each
+configuration option.
+
+We detail here a simple way to get the traces working for you, even if
+you never used the tracing API.
+
+
+- Any SimGrid-based simulator (MSG, SimDag, SMPI, ...) and raw traces:
+
+  .. code-block:: shell
+
+     --cfg=tracing:yes --cfg=tracing/uncategorized:yes --cfg=triva/uncategorized:uncat.plist
+
+  The first parameter activates the tracing subsystem, the second
+  tells it to trace host and link utilization (without any
+  categorization) and the third creates a graph configuration file to
+  configure Triva when analysing the resulting trace file.
+
+- MSG or SimDag-based simulator and categorized traces (you need to
+  declare categories and classify your tasks according to them) 
+
+  .. code-block:: shell
+
+     --cfg=tracing:yes --cfg=tracing/categorized:yes --cfg=triva/categorized:cat.plist
+
+  The first parameter activates the tracing subsystem, the second
+  tells it to trace host and link categorized utilization and the
+  third creates a graph configuration file to configure Triva when
+  analysing the resulting trace file.
+
+- SMPI simulator and traces for a space/time view:
+
+  .. code-block:: shell
+     
+     smpirun -trace ...
+
+  The `-trace` parameter for the smpirun script runs the simulation
+  with ``--cfg=tracing:yes --cfg=tracing/smpi:yes``. Check the
+  smpirun's `-help` parameter for additional tracing options.
+
+Sometimes you might want to put additional information on the trace to
+correctly identify them later, or to provide data that can be used to
+reproduce an experiment. You have two ways to do that:
+
+- Add a string on top of the trace file as comment:
+
+  .. code-block:: shell
+
+     --cfg=tracing/comment:my_simulation_identifier
+
+- Add the contents of a textual file on top of the trace file as comment:
+
+  .. code-block:: shell
+                 
+     --cfg=tracing/comment-file:my_file_with_additional_information.txt
+
+Please, use these two parameters (for comments) to make reproducible
+simulations. For additional details about this and all tracing
+options, check See the :ref:`tracing_tracing_options`.
+
+Configuring MSG
+---------------
+
+.. _cfg=msg/debug-multiple-use:
+
+Debugging MSG Code
+..................
+
+**Option** ``msg/debug-multiple-use`` **Default:** off
+
+Sometimes your application may try to send a task that is still being
+executed somewhere else, making it impossible to send this task. However,
+for debugging purposes, one may want to know what the other host is/was
+doing. This option shows a backtrace of the other process.
+
+Configuring SMPI
+----------------
+
+The SMPI interface provides several specific configuration items.
+These are uneasy to see since the code is usually launched through the
+``smiprun`` script directly.
+
+.. _cfg=smpi/host-speed:
+.. _cfg=smpi/cpu-threshold:
+.. _cfg=smpi/simulate-computation:
+
+Automatic Benchmarking of SMPI Code
+...................................
+
+In SMPI, the sequential code is automatically benchmarked, and these
+computations are automatically reported to the simulator. That is to
+say that if you have a large computation between a ``MPI_Recv()`` and
+a ``MPI_Send()``, SMPI will automatically benchmark the duration of
+this code, and create an execution task within the simulator to take
+this into account. For that, the actual duration is measured on the
+host machine and then scaled to the power of the corresponding
+simulated machine. The variable ``smpi/host-speed`` allows to specify
+the computational speed of the host machine (in flop/s) to use when
+scaling the execution times. It defaults to 20000, but you really want
+to update it to get accurate simulation results.
+
+When the code is constituted of numerous consecutive MPI calls, the
+previous mechanism feeds the simulation kernel with numerous tiny
+computations. The ``smpi/cpu-threshold`` item becomes handy when this
+impacts badly the simulation performance. It specifies a threshold (in
+seconds) below which the execution chunks are not reported to the
+simulation kernel (default value: 1e-6).
+
+.. note:: The option ``smpi/cpu-threshold`` ignores any computation
+   time spent below this threshold. SMPI does not consider the
+   `amount` of these computations; there is no offset for this. Hence,
+   a value that is too small, may lead to unreliable simulation
+   results.
+
+In some cases, however, one may wish to disable simulation of
+application computation. This is the case when SMPI is used not to
+simulate an MPI applications, but instead an MPI code that performs
+"live replay" of another MPI app (e.g., ScalaTrace's replay tool,
+various on-line simulators that run an app at scale). In this case the
+computation of the replay/simulation logic should not be simulated by
+SMPI. Instead, the replay tool or on-line simulator will issue
+"computation events", which correspond to the actual MPI simulation
+being replayed/simulated. At the moment, these computation events can
+be simulated using SMPI by calling internal smpi_execute*() functions.
+
+To disable the benchmarking/simulation of computation in the simulated
+application, the variable ``smpi/simulate-computation`` should be set
+to no.  This option just ignores the timings in your simulation; it
+still executes the computations itself. If you want to stop SMPI from
+doing that, you should check the SMPI_SAMPLE macros, documented in 
+Section :ref:`SMPI_adapting_speed`.
+
++------------------------------------+-------------------------+-----------------------------+
+|  Solution                          | Computations executed?  | Computations simulated?     |
++====================================+=========================+=============================+   
+| --cfg=smpi/simulate-computation:no | Yes                     | Never                       |
++------------------------------------+-------------------------+-----------------------------+
+| --cfg=smpi/cpu-threshold:42        | Yes, in all cases       | If it lasts over 42 seconds |
++------------------------------------+-------------------------+-----------------------------+
+| SMPI_SAMPLE() macro                | Only once per loop nest | Always                      |
++------------------------------------+-------------------------+-----------------------------+
+
+.. _cfg=smpi/comp-adjustment-file:
+
+Slow-down or speed-up parts of your code
+........................................
+
+**Option** ``smpi/comp-adjustment-file:`` **Default:** unset
+
+This option allows you to pass a file that contains two columns: The
+first column defines the section that will be subject to a speedup;
+the second column is the speedup. For instance:
+
+.. code-block:: shell
+
+  "start:stop","ratio"
+  "exchange_1.f:30:exchange_1.f:130",1.18244559422142
+
+The first line is the header - you must include it.  The following
+line means that the code between two consecutive MPI calls on line 30
+in exchange_1.f and line 130 in exchange_1.f should receive a speedup
+of 1.18244559422142. The value for the second column is therefore a
+speedup, if it is larger than 1 and a slow-down if it is smaller
+than 1. Nothing will be changed if it is equal to 1.
+
+Of course, you can set any arbitrary filenames you want (so the start
+and end don't have to be in the same file), but be aware that this
+mechanism only supports `consecutive calls!`
+
+Please note that you must pass the ``-trace-call-location`` flag to
+smpicc or smpiff, respectively. This flag activates some internal
+macro definitions that help with obtaining the call location.
+
+.. _cfg=smpi/bw-factor:
+
+Bandwidth Factors
+.................
+
+**Option** ``smpi/bw-factor``
+|br| **Default:** 65472:0.940694;15424:0.697866;9376:0.58729;5776:1.08739;3484:0.77493;1426:0.608902;732:0.341987;257:0.338112;0:0.812084
+
+The possible throughput of network links is often dependent on the
+message sizes, as protocols may adapt to different message sizes. With
+this option, a series of message sizes and factors are given, helping
+the simulation to be more realistic. For instance, the current default
+value means that messages with size 65472 and more will get a total of
+MAX_BANDWIDTH*0.940694, messages of size 15424 to 65471 will get
+MAX_BANDWIDTH*0.697866 and so on (where MAX_BANDWIDTH denotes the
+bandwidth of the link).
+
+An experimental script to compute these factors is available online. See
+http://simgrid.gforge.inria.fr/contrib/smpi-calibration-doc.html
+http://simgrid.gforge.inria.fr/contrib/smpi-saturation-doc.html
+
+.. _cfg=smpi/display-timing:
+       
+Reporting Simulation Time
+.........................
+
+**Option** ``smpi/display-timing`` **Default:** 0 (false)
+
+Most of the time, you run MPI code with SMPI to compute the time it
+would take to run it on a platform. But since the code is run through
+the ``smpirun`` script, you don't have any control on the launcher
+code, making it difficult to report the simulated time when the
+simulation ends. If you enable the ``smpi/display-timing`` item,
+``smpirun`` will display this information when the simulation
+ends.
+
+.. _cfg=smpi/keep-temps:
+
+Keeping temporary files after simulation
+........................................
+
+**Option** ``smpi/keep-temps`` **default:** 0 (false)
+
+SMPI usually generates a lot of temporary files that are cleaned after
+use. This option request to preserve them, for example to debug or
+profile your code. Indeed, the binary files are removed very early
+under the dlopen privatization schema, which tend to fool the
+debuggers.
+
+.. _cfg=smpi/lat-factor:
+
+Latency factors
+...............
+
+**Option** ``smpi/lat-factor`` |br|
+**default:** 65472:11.6436;15424:3.48845;9376:2.59299;5776:2.18796;3484:1.88101;1426:1.61075;732:1.9503;257:1.95341;0:2.01467
+
+The motivation and syntax for this option is identical to the motivation/syntax
+of :ref:`cfg=smpi/bw-factor`.
+
+There is an important difference, though: While smpi/bw-factor `reduces` the
+actual bandwidth (i.e., values between 0 and 1 are valid), latency factors
+increase the latency, i.e., values larger than or equal to 1 are valid here.
+
+.. _cfg=smpi/papi-events:
+       
+Trace hardware counters with PAPI
+.................................
+
+**Option** ``smpi/papi-events`` **default:** unset
+
+When the PAPI support was compiled in SimGrid, this option takes the
+names of PAPI counters and adds their respective values to the trace
+files (See Section :ref:`tracing_tracing_options`).
+
+.. warning::
+   
+   This feature currently requires superuser privileges, as registers
+   are queried.  Only use this feature with code you trust! Call
+   smpirun for instance via ``smpirun -wrapper "sudo "
+   <your-parameters>`` or run ``sudo sh -c "echo 0 >
+   /proc/sys/kernel/perf_event_paranoid"`` In the later case, sudo
+   will not be required.
+
+It is planned to make this feature available on a per-process (or per-thread?) basis.
+The first draft, however, just implements a "global" (i.e., for all processes) set
+of counters, the "default" set.
+
+.. code-block:: shell
+
+   --cfg=smpi/papi-events:"default:PAPI_L3_LDM:PAPI_L2_LDM"
+
+.. _cfg=smpi/privatization:
+
+Automatic Privatization of Global Variables
+...........................................
+
+**Option** ``smpi/privatization`` **default:** "dlopen" (when using smpirun)
+
+MPI executables are usually meant to be executed in separated
+processes, but SMPI is executed in only one process. Global variables
+from executables will be placed in the same memory zone and shared
+between processes, causing intricate bugs.  Several options are
+possible to avoid this, as described in the main `SMPI publication
+<https://hal.inria.fr/hal-01415484>`_ and in the :ref:`SMPI
+documentation <SMPI_what_globals>`. SimGrid provides two ways of
+automatically privatizing the globals, and this option allows to
+choose between them.
+
+  - **no** (default when not using smpirun): Do not automatically
+    privatize variables.  Pass ``-no-privatize`` to smpirun to disable
+    this feature.
+  - **dlopen** or **yes** (default when using smpirun): Link multiple
+    times against the binary.
+  - **mmap** (slower, but maybe somewhat more stable):
+    Runtime automatic switching of the data segments.
+
+.. warning::
+   This configuration option cannot be set in your platform file. You can only
+   pass it as an argument to smpirun.
+
+.. _cfg=smpi/privatize-libs:
+
+Automatic privatization of global variables inside external libraries
+.....................................................................
+
+**Option** ``smpi/privatize-libs`` **default:** unset
+
+**Linux/BSD only:** When using dlopen (default) privatization,
+privatize specific shared libraries with internal global variables, if
+they can't be linked statically.  For example libgfortran is usually
+used for Fortran I/O and indexes in files can be mixed up.
+
+Multiple libraries can be given, semicolon separated.
+
+This configuration option can only use either full paths to libraries,
+or full names.  Check with ldd the name of the library you want to
+use.  Example:
+
+.. code-block:: shell
+                 
+   ldd allpairf90
+      ...
+      libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007fbb4d91b000)
+      ...
+
+Then you can use ``--cfg=smpi/privatize-libs:libgfortran.so.3``
+or ``--cfg=smpi/privatize-libs:/usr/lib/x86_64-linux-gnu/libgfortran.so.3``,
+but not ``libgfortran`` nor ``libgfortran.so``.
+
+.. _cfg=smpi/send-is-detached-thresh:
+
+Simulating MPI detached send
+............................
+
+**Option** ``smpi/send-is-detached-thresh`` **default:** 65536
+
+This threshold specifies the size in bytes under which the send will
+return immediately. This is different from the threshold detailed in
+:ref:`options_model_network_asyncsend` because the message is not
+effectively sent when the send is posted. SMPI still waits for the
+correspondant receive to be posted to perform the communication
+operation.
+
+.. _cfg=smpi/coll-selector:
+
+Simulating MPI collective algorithms
+....................................
+
+**Option** ``smpi/coll-selector`` **Possible values:** naive (default), ompi, mpich
+
+SMPI implements more than 100 different algorithms for MPI collective
+communication, to accurately simulate the behavior of most of the
+existing MPI libraries. The ``smpi/coll-selector`` item can be used to
+use the decision logic of either OpenMPI or MPICH libraries (by
+default SMPI uses naive version of collective operations).
+
+Each collective operation can be manually selected with a
+``smpi/collective_name:algo_name``. Available algorithms are listed in
+:ref:`SMPI_use_colls`.
+
+.. _cfg=smpi/iprobe:
+
+Inject constant times for MPI_Iprobe
+....................................
+
+**Option** ``smpi/iprobe`` **default:** 0.0001
+
+The behavior and motivation for this configuration option is identical
+with :ref:`smpi/test <cfg=smpi/test>`, but for the function
+``MPI_Iprobe()``
+
+.. _cfg=smpi/iprobe-cpu-usage:
+
+Reduce speed for iprobe calls
+.............................
+
+**Option** ``smpi/iprobe-cpu-usage`` **default:** 1 (no change)
+
+MPI_Iprobe calls can be heavily used in applications. To account
+correctly for the energy cores spend probing, it is necessary to
+reduce the load that these calls cause inside SimGrid.
+
+For instance, we measured a max power consumption of 220 W for a
+particular application but only 180 W while this application was
+probing. Hence, the correct factor that should be passed to this
+option would be 180/220 = 0.81.
+
+.. _cfg=smpi/init:
+
+Inject constant times for MPI_Init
+..................................
+
+**Option** ``smpi/init`` **default:** 0
+
+The behavior and motivation for this configuration option is identical
+with :ref:`smpi/test <cfg=smpi/test>`, but for the function ``MPI_Init()``.
+
+.. _cfg=smpi/ois:
+
+Inject constant times for MPI_Isend()
+.....................................
+
+**Option** ``smpi/ois``
+
+The behavior and motivation for this configuration option is identical
+with :ref:`smpi/os <cfg=smpi/os>`, but for the function ``MPI_Isend()``.
+
+.. _cfg=smpi/os:
+
+Inject constant times for MPI_send()
+....................................
+
+**Option** ``smpi/os``
+
+In several network models such as LogP, send (MPI_Send, MPI_Isend) and
+receive (MPI_Recv) operations incur costs (i.e., they consume CPU
+time). SMPI can factor these costs in as well, but the user has to
+configure SMPI accordingly as these values may vary by machine.  This
+can be done by using ``smpi/os`` for MPI_Send operations; for MPI_Isend
+and MPI_Recv, use ``smpi/ois`` and ``smpi/or``, respectively. These work
+exactly as ``smpi/ois``.
+
+This item can consist of multiple sections; each section takes three
+values, for example ``1:3:2;10:5:1``.  The sections are divided by ";"
+so this example contains two sections.  Furthermore, each section
+consists of three values.
+
+1. The first value denotes the minimum size for this section to take effect;
+   read it as "if message size is greater than this value (and other section has a larger
+   first value that is also smaller than the message size), use this".
+   In the first section above, this value is "1".
+
+2. The second value is the startup time; this is a constant value that will always
+   be charged, no matter what the size of the message. In the first section above,
+   this value is "3".
+
+3. The third value is the `per-byte` cost. That is, it is charged for every
+   byte of the message (incurring cost messageSize*cost_per_byte)
+   and hence accounts also for larger messages. In the first
+   section of the example above, this value is "2".
+
+Now, SMPI always checks which section it should take for a given
+message; that is, if a message of size 11 is sent with the
+configuration of the example above, only the second section will be
+used, not the first, as the first value of the second section is
+closer to the message size. Hence, when ``smpi/os=1:3:2;10:5:1``, a
+message of size 11 incurs the following cost inside MPI_Send:
+``5+11*1`` because 5 is the startup cost and 1 is the cost per byte.
+
+Note that the order of sections can be arbitrary; they will be ordered internally.
+
+.. _cfg=smpi/or:
+
+Inject constant times for MPI_Recv()
+....................................
+
+**Option** ``smpi/or``
+
+The behavior and motivation for this configuration option is identical
+with :ref:`smpi/os <cfg=smpi/os>`, but for the function ``MPI_Recv()``.
+
+.. _cfg=smpi/test:
+.. _cfg=smpi/grow-injected-times:
+
+Inject constant times for MPI_Test
+..................................
+
+**Option** ``smpi/test`` **default:** 0.0001
+
+By setting this option, you can control the amount of time a process
+sleeps when MPI_Test() is called; this is important, because SimGrid
+normally only advances the time while communication is happening and
+thus, MPI_Test will not add to the time, resulting in a deadlock if
+used as a break-condition as in the following example:
+
+.. code-block:: cpp
+
+   while(!flag) {
+       MPI_Test(request, flag, status);
+       ...
+   }
+
+To speed up execution, we use a counter to keep track on how often we
+already checked if the handle is now valid or not. Hence, we actually
+use counter*SLEEP_TIME, that is, the time MPI_Test() causes the
+process to sleep increases linearly with the number of previously
+failed tests. This behavior can be disabled by setting
+``smpi/grow-injected-times`` to **no**. This will also disable this
+behavior for MPI_Iprobe.
+
+.. _cfg=smpi/shared-malloc:
+.. _cfg=smpi/shared-malloc-hugepage:
+
+Factorize malloc()s
+...................
+
+**Option** ``smpi/shared-malloc`` **Possible values:** global (default), local
+
+If your simulation consumes too much memory, you may want to modify
+your code so that the working areas are shared by all MPI ranks. For
+example, in a bloc-cyclic matrix multiplication, you will only
+allocate one set of blocs, and every processes will share them.
+Naturally, this will lead to very wrong results, but this will save a
+lot of memory so this is still desirable for some studies. For more on
+the motivation for that feature, please refer to the `relevant section
+<https://simgrid.github.io/SMPI_CourseWare/topic_understanding_performance/matrixmultiplication>`_
+of the SMPI CourseWare (see Activity #2.2 of the pointed
+assignment). In practice, change the call to malloc() and free() into
+SMPI_SHARED_MALLOC() and SMPI_SHARED_FREE().
+
+SMPI provides two algorithms for this feature. The first one, called 
+``local``, allocates one bloc per call to SMPI_SHARED_MALLOC() in your
+code (each call location gets its own bloc) and this bloc is shared
+amongst all MPI ranks.  This is implemented with the shm_* functions
+to create a new POSIX shared memory object (kept in RAM, in /dev/shm)
+for each shared bloc.
+
+With the ``global`` algorithm, each call to SMPI_SHARED_MALLOC()
+returns a new adress, but it only points to a shadow bloc: its memory
+area is mapped on a 1MiB file on disk. If the returned bloc is of size
+N MiB, then the same file is mapped N times to cover the whole bloc.
+At the end, no matter how many SMPI_SHARED_MALLOC you do, this will
+only consume 1 MiB in memory.
+
+You can disable this behavior and come back to regular mallocs (for
+example for debugging purposes) using @c "no" as a value.
+
+If you want to keep private some parts of the buffer, for instance if these
+parts are used by the application logic and should not be corrupted, you
+can use SMPI_PARTIAL_SHARED_MALLOC(size, offsets, offsets_count). Example:
+
+.. code-block:: cpp
+
+   mem = SMPI_PARTIAL_SHARED_MALLOC(500, {27,42 , 100,200}, 2);
+
+This will allocate 500 bytes to mem, such that mem[27..41] and
+mem[100..199] are shared while other area remain private.
+
+Then, it can be deallocated by calling SMPI_SHARED_FREE(mem).
+
+When smpi/shared-malloc:global is used, the memory consumption problem
+is solved, but it may induce too much load on the kernel's pages table. 
+In this case, you should use huge pages so that we create only one
+entry per Mb of malloced data instead of one entry per 4k.
+To activate this, you must mount a hugetlbfs on your system and allocate
+at least one huge page:
+
+.. code-block:: shell
+               
+    mkdir /home/huge
+    sudo mount none /home/huge -t hugetlbfs -o rw,mode=0777
+    sudo sh -c 'echo 1 > /proc/sys/vm/nr_hugepages' # echo more if you need more
+
+Then, you can pass the option
+``--cfg=smpi/shared-malloc-hugepage:/home/huge`` to smpirun to
+actually activate the huge page support in shared mallocs.
+
+.. _cfg=smpi/wtime:
+
+Inject constant times for MPI_Wtime, gettimeofday and clock_gettime
+...................................................................
+
+**Option** ``smpi/wtime`` **default:** 10 ns
+
+This option controls the amount of (simulated) time spent in calls to
+MPI_Wtime(), gettimeofday() and clock_gettime(). If you set this value
+to 0, the simulated clock is not advanced in these calls, which leads
+to issue if your application contains such a loop:
+
+.. code-block:: cpp
+               
+   while(MPI_Wtime() < some_time_bound) {
+        /* some tests, with no communication nor computation */
+   }
+
+When the option smpi/wtime is set to 0, the time advances only on
+communications and computations, so the previous code results in an
+infinite loop: the current [simulated] time will never reach
+``some_time_bound``.  This infinite loop is avoided when that option
+is set to a small amount, as it is by default since SimGrid v3.21.
+
+Note that if your application does not contain any loop depending on
+the current time only, then setting this option to a non-zero value
+will slow down your simulations by a tiny bit: the simulation loop has
+to be broken and reset each time your code ask for the current time.
+If the simulation speed really matters to you, you can avoid this
+extra delay by setting smpi/wtime to 0.
+
+Other Configurations
+--------------------
+
+.. _cfg=clean-atexit:
+
+Cleanup at Termination
+......................
+
+**Option** ``clean-atexit`` **default:** on
+
+If your code is segfaulting during its finalization, it may help to
+disable this option to request SimGrid to not attempt any cleanups at
+the end of the simulation. Since the Unix process is ending anyway,
+the operating system will wipe it all.
+
+.. _cfg=path:
+
+Search Path
+...........
+
+**Option** ``path`` **default:** . (current dir)
+
+It is possible to specify a list of directories to search into for the
+trace files (see :ref:`pf_trace`) by using this configuration
+item. To add several directory to the path, set the configuration
+item several times, as in ``--cfg=path:toto --cfg=path:tutu``
+
+.. _cfg=simix/breakpoint:
+
+Set a Breakpoint
+................
+
+**Option** ``simix/breakpoint`` **default:** unset
+
+This configuration option sets a breakpoint: when the simulated clock
+reaches the given time, a SIGTRAP is raised.  This can be used to stop
+the execution and get a backtrace with a debugger.
+
+It is also possible to set the breakpoint from inside the debugger, by
+writing in global variable simgrid::simix::breakpoint. For example,
+with gdb:
+
+.. code-block:: shell
+
+   set variable simgrid::simix::breakpoint = 3.1416
+
+.. _cfg=verbose-exit:
+   
+Behavior on Ctrl-C
+..................
+
+**Option** ``verbose-exit`` **default:** on
+
+By default, when Ctrl-C is pressed, the status of all existing actors
+is displayed before exiting the simulation. This is very useful to
+debug your code, but it can reveal troublesome if you have many
+actors. Set this configuration item to **off** to disable this
+feature.
+
+.. _cfg=exception/cutpath:
+
+Truncate local path from exception backtrace
+............................................
+
+**Option** ``exception/cutpath`` **default:** off
+
+This configuration option is used to remove the path from the
+backtrace shown when an exception is thrown. This is mainly useful for
+the tests: the full file path makes the tests not reproducible because
+the path of source files depend of the build settings. That would
+break most of our tests as we keep comparing output.
+
+Logging Configuration
+---------------------
+
+It can be done by using XBT. Go to :ref:`XBT_log` for more details.
+
+.. |br| raw:: html
+
+   <br />
index 43d927a..692f8c1 100644 (file)
@@ -12,7 +12,10 @@ Describing the Experimental Scenario
    - Reproducible random number generation
    - Command line options, in particular on the model switching
 
-.. include:: scenar_config.rst
+.. toctree::
+   :hidden:
+
+      Configuring SimGrid <scenar_config.rst>
 
 
             
index eef698c..434a161 100644 (file)
@@ -479,10 +479,16 @@ Use the EP benchmark, class B, 16 processes.
 Further Readings
 ----------------
 
-We regularly use SimGrid in our teachings on MPI. This way, our
-student can experiment with platforms that they do not have access to,
-and the associated visualisation tools helps them to understand their
-work.  The whole material is available online, in a separate project:
-the `SMPI CourseWare <https://simgrid.github.io/SMPI_CourseWare/>`_.
+You may also be interested in the `SMPI reference article
+<https://hal.inria.fr/hal-01415484>`_ or these `introductory slides
+<http://simgrid.org/tutorials/simgrid-smpi-101.pdf>`_. The `SMPI
+reference documentation <SMPI_doc>`_ covers much more content than
+this short tutorial.
+
+Finally, we regularly use SimGrid in our teachings on MPI. This way,
+our student can experiment with platforms that they do not have access
+to, and the associated visualisation tools helps them to understand
+their work.  The whole material is available online, in a separate
+project: the `SMPI CourseWare <https://simgrid.github.io/SMPI_CourseWare/>`_.
 
 ..  LocalWords:  SimGrid
index 202659f..655a240 100644 (file)
@@ -885,19 +885,15 @@ set(DOC_SOURCES
   doc/doxygen/inside_doxygen.doc
   doc/doxygen/inside_extending.doc
   doc/doxygen/inside_release.doc
-  doc/doxygen/install.doc
-  doc/doxygen/install_yours.doc
   doc/doxygen/java.doc
   doc/doxygen/module-msg.doc
   doc/doxygen/module-sd.doc
   doc/doxygen/module-simix.doc
-  doc/doxygen/module-smpi.doc
   doc/doxygen/module-surf.doc
   doc/doxygen/module-trace.doc
   doc/doxygen/module-xbt.doc
   doc/doxygen/module-index.doc
   doc/doxygen/ns3.doc
-  doc/doxygen/options.doc
   doc/doxygen/outcomes.doc
   doc/doxygen/outcomes_logs.doc
   doc/doxygen/outcomes_MC.doc
@@ -926,9 +922,12 @@ set(DOC_SOURCES
   docs/source/img/extlink.png
   docs/source/img/extlink.svg
   docs/source/img/graphical-toc.svg
+  docs/source/img/smpi_simgrid_alltoall_pair_16.png
+  docs/source/img/smpi_simgrid_alltoall_ring_16.png
 
   docs/source/application.rst
   docs/source/app_s4u.rst
+  docs/source/app_smpi.rst
   docs/source/index.rst
   docs/source/intro_concepts.rst
   docs/source/introduction.rst
@@ -995,8 +994,6 @@ set(DOC_IMG
   ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_2011_small.png
   ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_win.bmp
   ${CMAKE_HOME_DIRECTORY}/doc/webcruft/simgrid_logo_win_2011.bmp
-  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/smpi_simgrid_alltoall_pair_16.png
-  ${CMAKE_HOME_DIRECTORY}/doc/webcruft/smpi_simgrid_alltoall_ring_16.png
   )
 
 set(bin_files