Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
docs improvements
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 15 Nov 2018 06:34:24 +0000 (07:34 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 15 Nov 2018 07:21:11 +0000 (08:21 +0100)
- some words about trace replay, mostly stolen from tuto. Ways more should be said.
- A warning about remainings of previous cmake configuration
- A word on VM in the 10000ft view of S4U

docs/source/Installing_SimGrid.rst
docs/source/app_s4u.rst
docs/source/app_smpi.rst

index cb94bd1..d668edf 100644 (file)
@@ -135,6 +135,19 @@ fall into two categories. **SimGrid-specific options** define which part
 of the framework to compile while **Generic options** are provided by
 cmake itself.
 
+.. warning::
+
+   Our build system often gets mixed up if you change something on
+   your machine after the build configuration.  For example, if
+   SimGrid fails to detect your fortran compiler, it is not enough to
+   install a fortran compiler. You also need to clean every Cmake
+   files, such as ``CMakeCache.txt``. Since Cmake also generates some
+   files in the tree, you may need to wipe out your complete tree and
+   start with a fresh one when you install new dependencies.
+   
+   Another (better) solution is to :ref:`build out of the source tree
+   <install_cmake_outsrc>`.
+
 Generic build-time options
 """"""""""""""""""""""""""
 
index 9c8aef7..f0b7d30 100644 (file)
@@ -56,7 +56,10 @@ synchronization mechanisms** such as |API_s4u_Barrier|_, |API_s4u_Semaphore|_,
 Each actor is located on a simulated |API_s4u_Host|_. Each host is located
 itself in a |API_s4u_NetZone|_, that knows the networking path between one
 resource to another. Each NetZone is included in another one, forming
-a tree of NetZones which root zone contains the whole platform.
+a tree of NetZones which root zone contains the whole platform. The
+actors can also be located on a |API_s4U_VirtualMachine|_ that may
+restrict the activities it contains to a limited amount of cores.
+Virtual machines can also be migrated between hosts.
 
 The :ref:`simgrid::s4u::this_actor <API_s4u_this_actor>` namespace
 provides many helper functions to simplify the code of actors.
@@ -116,8 +119,7 @@ provides many helper functions to simplify the code of actors.
 .. |API_s4u_Storages| replace:: **Storages**
 .. _API_s4u_Storages: #s4u-storage
 
-.. |API_s4u_VirtualMachines| replace:: **VirtualMachines**
-.. _API_s4u_VirtualMachines: #s4u-virtualmachine
+.. |API_s4u_VirtualMachine| replace:: **VirtualMachines**
 
 .. |API_s4u_Host| replace:: **Host**
 
index ade7f20..8a2f5a0 100644 (file)
@@ -41,9 +41,22 @@ 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.
 
-----------
-Using SMPI
-----------
+.. _SMPI_online:
+
+-----------------
+Using SMPI online
+-----------------
+
+In this mode, your application is actually executed. Every computation
+occurs for real while every communication is simulated. In addition,
+the executions are automatically benchmarked so that their timings can
+be applied within the simulator. 
+
+SMPI can also go offline by replaying a trace. :ref:`Trace replay
+<SMPI_offline>` is usually ways faster than online simulation (because
+the computation are skipped), but it can only applied to applications
+with constant execution and communication patterns (for the exact same
+reason).
 
 ...................
 Compiling your Code
@@ -741,3 +754,47 @@ 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.
+
+
+
+.. _SMPI_offline:
+
+-----------------------------
+Trace Replay and Offline SMPI
+-----------------------------
+
+Although SMPI is often used for :ref:`online simulation
+<SMPI_online>`, where the application is executed for real, you can
+also go for offline simulation through trace replay. 
+
+SimGrid uses time-independent traces, in which each actor is given a
+script of the actions to do sequentially. These trace files can
+actually be captured with the online version of SMPI, as follows:
+
+.. code-block:: shell
+
+   $ smpirun -trace-ti --cfg=tracing/filename:LU.A.32 -np 32 -platform ../cluster_backbone.xml bin/lu.A.32 
+
+The produced trace is composed of a file ``LU.A.32`` and a folder
+``LU.A.32_files``. The file names don't match with the MPI ranks, but
+that's expected.
+
+To replay this with SMPI, you need to first compile the provided
+``smpi_replay.cpp`` file, that comes from
+`simgrid/examples/smpi/replay
+<https://framagit.org/simgrid/simgrid/tree/master/examples/smpi/replay>`_.
+
+.. code-block:: shell
+
+   $ smpicxx ../replay.cpp -O3 -o ../smpi_replay
+
+Afterward, you can replay your trace in SMPI as follows:
+
+   $ smpirun -np 32 -platform ../cluster_torus.xml -ext smpi_replay ../smpi_replay LU.A.32
+
+All the outputs are gone, as the application is not really simulated
+here. Its trace is simply replayed. But if you visualize the live
+simulation and the replay, you will see that the behavior is
+unchanged. The simulation does not run much faster on this very
+example, but this becomes very interesting when your application
+is computationally hungry.