From ed6ffebb2cdac45e7456678c2714f4c23749659e Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 15 Nov 2018 07:34:24 +0100 Subject: [PATCH] docs improvements - 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 | 13 ++++++ docs/source/app_s4u.rst | 8 ++-- docs/source/app_smpi.rst | 63 ++++++++++++++++++++++++++++-- 3 files changed, 78 insertions(+), 6 deletions(-) diff --git a/docs/source/Installing_SimGrid.rst b/docs/source/Installing_SimGrid.rst index cb94bd1bd4..d668edfedf 100644 --- a/docs/source/Installing_SimGrid.rst +++ b/docs/source/Installing_SimGrid.rst @@ -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 + `. + Generic build-time options """""""""""""""""""""""""" diff --git a/docs/source/app_s4u.rst b/docs/source/app_s4u.rst index 9c8aef7841..f0b7d30186 100644 --- a/docs/source/app_s4u.rst +++ b/docs/source/app_s4u.rst @@ -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 ` 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** diff --git a/docs/source/app_smpi.rst b/docs/source/app_smpi.rst index ade7f20ccd..8a2f5a0b0f 100644 --- a/docs/source/app_smpi.rst +++ b/docs/source/app_smpi.rst @@ -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 +` 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 +`, 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 +`_. + +.. 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. -- 2.20.1