Simulating MPI Applications
===========================
+.. warning:: This document is still in early stage. You can try to
+ take this tutorial, but should not be surprised if things fall short.
+ It will be completed for the next release, v3.22, released by the end
+ of 2018.
+
Discover SMPI
-------------
``mpiff``, or with ``smpicxx`` instead of ``mpicxx``. Then, the only
difference between the classical ``mpirun`` and the new ``smpirun`` is
that it requires a new parameter ``-platform`` with a file describing
-the virtual platform on which your application shall run.
+the simulated platform on which your application shall run.
Internally, all ranks of your application are executed as threads of a
single unix process. That's not a problem if your application has
------------------------
As a SMPI user, you are supposed to provide a description of your
-virtual platform, that is mostly a set of simulated hosts and network
+simulated platform, that is mostly a set of simulated hosts and network
links with some performance characteristics. SimGrid provides a plenty
of :ref:`documentation <platform>` and examples (in the
`examples/platforms <https://framagit.org/simgrid/simgrid/tree/master/examples/platforms>`_
This topology was introduced to further reduce the amount of links
while maintaining a high bandwidth for local communications. To model
this in SimGrid, pass a ``topology="DRAGONFLY"`` attribute to your
-cluster.
+cluster. It's based on the implementation of the topology used on
+Cray XC systems, described in paper
+`Cray Cascade: A scalable HPC system based on a Dragonfly network <https://dl.acm.org/citation.cfm?id=2389136>`_.
+
+System description follows the format ``topo_parameters=#groups;#chassis;#routers;#nodes``
+For example, ``3,4 ; 3,2 ; 3,1 ; 2``:
+
+- ``3,4``: There are 3 groups with 4 links between each (blue level).
+ Links to nth group are attached to the nth router of the group
+ on our implementation.
+- ``3,2``: In each group, there are 3 chassis with 2 links between each nth router
+ of each group (black level)
+- ``3,1``: In each chassis, 3 routers are connected together with a single link
+ (green level)
+- ``2``: Each router has two nodes attached (single link)
+
+.. image:: ../../examples/platforms/cluster_dragonfly.svg
+ :align: center
.. literalinclude:: ../../examples/platforms/cluster_dragonfly.xml
:language: xml
-.. todo::
-
- Add the image, and the documuentation of the topo_parameters.
-
Final Word
..........
Use the EP benchmark, class B, 16 processes.
+.. todo:: write this section, and the following ones.
+
+Further Readings
+----------------
+
+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