Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make room for the upcoming network energy plugin
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 15 Feb 2017 14:33:21 +0000 (15:33 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 15 Feb 2017 14:51:48 +0000 (15:51 +0100)
ChangeLog
examples/msg/energy-consumption/energy-consumption.c
examples/msg/energy-onoff/energy-onoff.c
examples/msg/energy-ptask/energy-ptask.c
examples/msg/energy-vm/energy-vm.c
include/simgrid/plugins/energy.h
src/bindings/java/jmsg.cpp
src/surf/plugins/energy.cpp
src/surf/surf_interface.cpp

index e74893b..2af5b4a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@ SimGrid (3.15) UNRELEASED; urgency=low
 
  MSG
  - New function: MSG_process_yield()
+ - Renamed MSG_energy_plugin_init() -> MSG_host_energy_plugin_init()
+   to make room for the upcoming network energy plugin.
 
  Java
  - Ensure that an actor can kill itself with Process::exit()
index f8985ef..00231b6 100644 (file)
@@ -68,7 +68,7 @@ static int dvfs(int argc, char *argv[])
 
 int main(int argc, char *argv[])
 {
-  sg_energy_plugin_init();
+  sg_host_energy_plugin_init();
   MSG_init(&argc, argv);
 
   xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
index 98562d5..17ae54a 100644 (file)
@@ -84,7 +84,7 @@ static int onoff(int argc, char *argv[]) {
 
 int main(int argc, char *argv[])
 {
-  sg_energy_plugin_init();
+  sg_host_energy_plugin_init();
   MSG_init(&argc, argv);
 
   xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
index 3cf07cc..2764151 100644 (file)
@@ -93,7 +93,7 @@ int main(int argc, char *argv[])
   xbt_assert(argc >= 2, "2Usage: %s <platform file> [--energy]", argv[0]);
 
   if(argc == 3 && argv[2][2] == 'e')
-    sg_energy_plugin_init();
+    sg_host_energy_plugin_init();
 
   MSG_create_environment(argv[1]);
 
index c885f51..8a2011d 100644 (file)
@@ -58,7 +58,7 @@ static int dvfs(int argc, char *argv[])
 
 int main(int argc, char *argv[])
 {
-  sg_energy_plugin_init();
+  sg_host_energy_plugin_init();
   MSG_init(&argc, argv);
 
   xbt_assert(argc > 1, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
index f21799f..06d1de8 100644 (file)
 
 SG_BEGIN_DECL()
 
-XBT_PUBLIC(void) sg_energy_plugin_init();
+XBT_PUBLIC(void) sg_host_energy_plugin_init();
 XBT_PUBLIC(double) sg_host_get_consumed_energy(sg_host_t host);
 XBT_PUBLIC(double) sg_host_get_wattmin_at(sg_host_t host, int pstate);
 XBT_PUBLIC(double) sg_host_get_wattmax_at(sg_host_t host, int pstate);
 
-#define MSG_energy_plugin_init() sg_energy_plugin_init()
+#define MSG_host_energy_plugin_init() sg_energy_plugin_init()
 #define MSG_host_get_consumed_energy(host) sg_host_get_consumed_energy(host)
 #define MSG_host_get_wattmin_at(host,pstate) sg_host_get_wattmin_at(host,pstate)
 #define MSG_host_get_wattmax_at(host,pstate) sg_host_get_wattmax_at(host,pstate)
index 7e536de..819951b 100644 (file)
@@ -258,7 +258,7 @@ Java_org_simgrid_msg_Msg_deployApplication(JNIEnv * env, jclass cls, jstring jde
 SG_END_DECL()
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit() {
-  sg_energy_plugin_init();
+  sg_host_energy_plugin_init();
 }
 
 /** Run a Java org.simgrid.msg.Process
index 97e99fd..c063cd3 100644 (file)
@@ -277,7 +277,7 @@ static void onHostDestruction(simgrid::s4u::Host& host) {
  * \brief Enable energy plugin
  * \details Enable energy plugin to get joules consumption of each cpu. You should call this function before #MSG_init().
  */
-void sg_energy_plugin_init()
+void sg_host_energy_plugin_init()
 {
   if (HostEnergy::EXTENSION_ID.valid())
     return;
index 3a37bcc..7db2906 100644 (file)
@@ -46,8 +46,8 @@ simgrid::xbt::signal<void(void)> surfExitCallbacks;
 #include <simgrid/plugins/energy.h> // FIXME: this plugin should not be linked to the core
 
 s_surf_model_description_t surf_plugin_description[] = {
-    {"Energy", "Cpu energy consumption.", &sg_energy_plugin_init},
-     {nullptr, nullptr,  nullptr}      /* this array must be nullptr terminated */
+    {"Energy", "Cpu energy consumption.", &sg_host_energy_plugin_init},
+    {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
 };
 
 /* Don't forget to update the option description in smx_config when you change this */