Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[DVFS] Make the Dvfs plugin available
[simgrid.git] / src / surf / surf_interface.cpp
index 2786df7..db2ad1f 100644 (file)
@@ -36,19 +36,15 @@ std::vector<simgrid::s4u::Host*> host_that_restart;
 std::set<std::string> watched_hosts;
 extern std::map<std::string, simgrid::surf::StorageType*> storage_types;
 
-namespace simgrid {
-namespace surf {
-
-simgrid::xbt::signal<void()> surfExitCallbacks;
-}
-}
-
+#include <simgrid/plugins/dvfs.h>   // FIXME: this plug-in should not be linked to the core
 #include <simgrid/plugins/energy.h> // FIXME: this plug-in should not be linked to the core
 #include <simgrid/plugins/load.h>   // FIXME: this plug-in should not be linked to the core
 
 s_surf_model_description_t surf_plugin_description[] = {
-    {"Energy", "Cpu energy consumption.", &sg_host_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_dvfs", "Dvfs support", &sg_host_dvfs_plugin_init},
+    {"host_load", "Cpu load.", &sg_host_load_plugin_init},
     {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
 };
 
@@ -312,7 +308,6 @@ void surf_init(int *argc, char **argv)
 void surf_exit()
 {
   simgrid::s4u::Engine::shutdown();
-  sg_link_exit();
   for (auto const& e : storage_types) {
     simgrid::surf::StorageType* stype = e.second;
     delete stype->properties;
@@ -324,11 +319,8 @@ void surf_exit()
     delete model;
   delete all_existing_models;
 
-
-  if (future_evt_set) {
-    delete future_evt_set;
-    future_evt_set = nullptr;
-  }
+  delete future_evt_set;
+  future_evt_set = nullptr;
 
   tmgr_finalize();
   sg_platf_exit();