Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to make Engine::on_config_in_platform_done() useless my better placing Engine...
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 1 May 2018 10:22:59 +0000 (12:22 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 1 May 2018 10:22:59 +0000 (12:22 +0200)
include/simgrid/s4u/Engine.hpp
src/surf/sg_platf.cpp
src/surf/xml/surfxml_sax_cb.cpp

index 5d18f7b..a50747f 100644 (file)
@@ -223,7 +223,8 @@ public:
  * right before the actual simulation starts. */
 extern XBT_PUBLIC xbt::signal<void()> on_platform_created;
 
  * right before the actual simulation starts. */
 extern XBT_PUBLIC xbt::signal<void()> on_platform_created;
 
-/** Callback fired when the platform is about to be created (ie, just before the xml file is parsed) */
+/** Callback fired when the platform is about to be created
+ * (ie, after any configuration change and just before the resource creation) */
 extern XBT_PUBLIC xbt::signal<void()> on_platform_creation;
 
 /** Callback fired when some configuration has be done directly in the XML file */
 extern XBT_PUBLIC xbt::signal<void()> on_platform_creation;
 
 /** Callback fired when some configuration has be done directly in the XML file */
index fa00565..fd639aa 100644 (file)
@@ -544,6 +544,8 @@ static void surf_config_models_setup()
 simgrid::s4u::NetZone* sg_platf_new_Zone_begin(simgrid::kernel::routing::ZoneCreationArgs* zone)
 {
   if (not surf_parse_models_setup_already_called) {
 simgrid::s4u::NetZone* sg_platf_new_Zone_begin(simgrid::kernel::routing::ZoneCreationArgs* zone)
 {
   if (not surf_parse_models_setup_already_called) {
+    simgrid::s4u::on_platform_creation();
+
     /* Initialize the surf models. That must be done after we got all config, and before we need the models.
      * That is, after the last <config> tag, if any, and before the first of cluster|peer|AS|trace|trace_connect
      *
     /* Initialize the surf models. That must be done after we got all config, and before we need the models.
      * That is, after the last <config> tag, if any, and before the first of cluster|peer|AS|trace|trace_connect
      *
index e56c3f0..be0c93d 100644 (file)
@@ -390,8 +390,6 @@ void STag_surfxml_platform() {
                              "The most recent formalism that this version of SimGrid understands is v4.1.\n"
                              "Please update your code, or use another, more adapted, file.",
              surf_parsed_filename, version);
                              "The most recent formalism that this version of SimGrid understands is v4.1.\n"
                              "Please update your code, or use another, more adapted, file.",
              surf_parsed_filename, version);
-
-  simgrid::s4u::on_platform_creation();
 }
 void ETag_surfxml_platform(){
   simgrid::s4u::on_platform_created();
 }
 void ETag_surfxml_platform(){
   simgrid::s4u::on_platform_created();