Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make sure that MSG_host_get_wattmin_at() is tested
[simgrid.git] / examples / msg / energy / e3 / e3.c
index 40d61cc..5f31fb1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2010, 2013. The SimGrid Team.
+/* Copyright (c) 2007-2010, 2013-2014. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,8 +6,9 @@
 
 #include<stdio.h>
 
-#include "msg/msg.h"
+#include "simgrid/msg.h"
 #include "xbt/sysdep.h"         /* calloc */
+#include "simgrid/plugins.h"
 
 /* Create a log channel to have nice outputs. */
 #include "xbt/log.h"
@@ -58,10 +59,10 @@ static int dvfs(int argc, char *argv[])
   double task_time = 0;
   host = MSG_host_self();
 
-  double current_peak = MSG_get_host_current_power_peak(host);
+  double current_peak = MSG_host_get_current_power_peak(host);
 
   XBT_INFO("Current power peak=%f", current_peak);
-  double consumed_energy = MSG_get_host_consumed_energy(host);
+  double consumed_energy = MSG_host_get_consumed_energy(host);
   XBT_INFO("Total energy (Joules): %f", consumed_energy);
 
   // Process 1 - long CPU task
@@ -90,7 +91,7 @@ static int dvfs(int argc, char *argv[])
 
   task_time = MSG_get_clock() - task_time;
   XBT_INFO("Task simulation time: %e", task_time);
-  consumed_energy = MSG_get_host_consumed_energy(host);
+  consumed_energy = MSG_host_get_consumed_energy(host);
   XBT_INFO("Total energy (Joules): %f", consumed_energy);
 
   return 0;