Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename the plugins from the command line, and document it
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 26 May 2018 14:35:35 +0000 (16:35 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 26 May 2018 14:35:35 +0000 (16:35 +0200)
ChangeLog
doc/doxygen/options.doc
examples/smpi/energy/energy.tesh
examples/smpi/energy/f77/energy.tesh
examples/smpi/energy/f90/energy.tesh
src/surf/surf_interface.cpp

index 71afbb0..59b8de4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,23 +4,29 @@ TRACE
  - Change --cfg=tracing/msg/vm to --cfg=tracing/vm as virtual machine
    behavior tracing is no longer limited to MSG
 
- S4U:
+S4U:
  - Introduced new function simgrid::s4u::Host::get_actor_count. This function
    returns the number of actors running on a specific host.
 
- Simix:
+Plugins:
+ - Allow to run the Link energy plugin from the command line with 
+   --cfg=plugin:link_energy
+ - Rename Energy plugin into host_energy
+ - Rename Load plugin into host_load
+
+simix:
  - Add parameter --cfg=simix/breakpoint to raise a SIGTRAP at given time.
 
- SMPI:
+SMPI:
  - Replay: The replay file has been re-written in C++.
  - Replay: Tags used for messages sent via MPI_Send / MPI_Recv are now
    supported. They are stored in the trace and used when replayed.
 
- XBT:
+XBT:
  - Config: the C API is now deprecated (will be removed in 3.23), and
            the C++ API has been slightly improved.
 
- Fixed bugs:
+Fixed bugs:
  - #143: Setting a breakpoint at a given time
  - #258: daemonized actors hang after all non-daemonized actors have completed
 
index dff9c9c..c643c23 100644 (file)
@@ -254,24 +254,31 @@ when using SimDag.
 
 \subsection options_generic_plugin Plugins
 
-SimGrid supports the use of plugins; currently, no known plugins
-can be activated but there are use-cases where you may want to write
-your own plugin (for instance, for logging).
-
-Plugins can for instance define own classes that inherit from
-existing classes (for instance, a class "CpuEnergy" inherits from
-"Cpu" to assess energy consumption).
-
-The plugin connects to the code by registering callbacks using
-``signal.connect(callback)`` (see file ``src/surf/plugins/energy.cpp`` for
-details).
+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:Energy
+    --cfg=plugin:host_energy
 \endverbatim
 
-\note
-    This option is case-sensitive: Energy and energy are not the same!
+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
 
index ee5fa2e..1895a49 100644 (file)
@@ -1,5 +1,5 @@
 p Test smpi bindings for dvfs functions (C example)
-$ ${bindir:=.}/../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile  -platform ${platfdir}/energy_platform.xml --cfg=smpi/simulate-computation:no ${bindir:=.}/../examples/smpi/energy/smpi_energy --cfg=plugin:Energy --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+$ ${bindir:=.}/../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile  -platform ${platfdir}/energy_platform.xml --cfg=smpi/simulate-computation:no ${bindir:=.}/../examples/smpi/energy/smpi_energy --cfg=plugin:host_energy --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
 > [0.000000] [rank 0] Pstates: 3; Powers: 100000000, 50000000, 20000000
 > [0.000000] [rank 1] Pstates: 3; Powers: 100000000, 50000000, 20000000
 > [0.000000] [rank 0] Current pstate: 0; Current power: 100000000
index a3391a6..c9de94b 100644 (file)
@@ -1,6 +1,6 @@
 p Test smpi bindings for dvfs functions (Fortran 77 example)
 
-$ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile  -platform ${srcdir:=.}/../../platforms/energy_platform.xml --cfg=smpi/simulate-computation:no ${bindir:=.}/f77/sef --cfg=plugin:Energy --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+$ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile  -platform ${srcdir:=.}/../../platforms/energy_platform.xml --cfg=smpi/simulate-computation:no ${bindir:=.}/f77/sef --cfg=plugin:host_energy --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
 > [     0.00000000] [rank  0]  3 pstates available
 > [     0.00000000] [rank  1]  3 pstates available
 > [     0.00000000] [rank  0] Power:  100000000.0000
index 9c9f947..5394bfc 100644 (file)
@@ -1,6 +1,6 @@
 p Test smpi bindings for dvfs functions (Fortran 90 example)
 
-$ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile  -platform ${srcdir:=.}/../../platforms/energy_platform.xml --cfg=smpi/simulate-computation:no ${bindir:=.}/f90/sef90 --cfg=plugin:Energy  --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
+$ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile  -platform ${srcdir:=.}/../../platforms/energy_platform.xml --cfg=smpi/simulate-computation:no ${bindir:=.}/f90/sef90 --cfg=plugin:host_energy --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning
 > [     0.00000000] [rank  0]  3 pstates available
 > [     0.00000000] [rank  1]  3 pstates available
 > [     0.00000000] [rank  0] Power:  100000000.0000
index 8697e77..85b2bd3 100644 (file)
@@ -40,9 +40,9 @@ extern std::map<std::string, simgrid::surf::StorageType*> storage_types;
 #include <simgrid/plugins/load.h>   // FIXME: this plug-in should not be linked to the core
 
 s_surf_model_description_t surf_plugin_description[] = {
-    {"Host_Energy", "Cpu energy consumption.", &sg_host_energy_plugin_init},
-    {"Link_Energy", "Link energy consumption.", &sg_link_energy_plugin_init},
-    {"Load", "Cpu load.", &sg_host_load_plugin_init},
+    {"host_energy", "Cpu energy consumption.", &sg_host_energy_plugin_init},
+    {"link_energy", "Link energy consumption.", &sg_link_energy_plugin_init},
+    {"host_load", "Cpu load.", &sg_host_load_plugin_init},
     {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
 };