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"))
}
tmgr_finalize();
- sg_platf_exit();
+ sg_platf_parser_finalize();
delete instance_;
instance_ = nullptr;
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();
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();
#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();
/* 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);