Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill a useless function, and rename another one
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 15 Jan 2023 23:47:52 +0000 (00:47 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 16 Jan 2023 07:46:08 +0000 (08:46 +0100)
src/kernel/EngineImpl.cpp
src/surf/sg_platf.cpp
src/surf/xml/platf.hpp
src/surf/xml/surfxml_parseplatf.cpp

index efbd881..e769b07 100644 (file)
@@ -185,7 +185,6 @@ void EngineImpl::initialize(int* argc, char** argv)
   install_signal_handlers();
 
   /* register a function to be called by SURF after the environment creation */
-  sg_platf_init();
   s4u::Engine::on_platform_created_cb([this]() { this->presolve(); });
 
   if (config::get_value<bool>("debug/clean-atexit"))
@@ -272,7 +271,7 @@ void EngineImpl::shutdown()
   }
 
   tmgr_finalize();
-  sg_platf_exit();
+  sg_platf_parser_finalize();
 
   delete instance_;
   instance_ = nullptr;
@@ -312,8 +311,7 @@ void EngineImpl::load_platform(const std::string& platf)
 
 void EngineImpl::load_deployment(const std::string& file) const
 {
-  sg_platf_exit();
-  sg_platf_init();
+  sg_platf_parser_finalize();
 
   surf_parse_open(file);
   surf_parse();
index db9026a..59c6007 100644 (file)
@@ -42,14 +42,8 @@ static simgrid::kernel::routing::ClusterZoneCreationArgs
 static simgrid::kernel::routing::NetZoneImpl* current_routing = nullptr;
 static simgrid::s4u::Host* current_host = nullptr;
 
-/** Module management function: creates all internal data structures */
-void sg_platf_init()
-{
-  // Do nothing: just for symmetry of user code
-}
-
 /** Module management function: frees all internal data structures */
-void sg_platf_exit()
+void sg_platf_parser_finalize()
 {
   simgrid::kernel::routing::on_cluster_creation.disconnect_slots();
 
index 853b66f..203ca09 100644 (file)
@@ -11,8 +11,7 @@
 #include <vector>
 
 /* Module management functions */
-XBT_PUBLIC void sg_platf_init();
-XBT_PUBLIC void sg_platf_exit();
+XBT_PUBLIC void sg_platf_parser_finalize();
 
 XBT_PUBLIC void surf_parse_open(const std::string& file);
 XBT_PUBLIC void surf_parse_close();
index 1d4b776..5cfc7f2 100644 (file)
@@ -54,8 +54,6 @@ void sg_platf_trace_connect(simgrid::kernel::routing::TraceConnectCreationArgs*
 /* This function acts as a main in the parsing area. */
 void parse_platform_file(const std::string& file)
 {
-  sg_platf_init();
-
   /* init the flex parser */
   surf_parse_open(file);