X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9b73466ada27682d1729f394549479da83ef4a99..9527e5cfe29c3ab692d7e38409ae5fea29ace6cc:/examples/msg/energy/e3/e3.c diff --git a/examples/msg/energy/e3/e3.c b/examples/msg/energy/e3/e3.c index 4230a8e39c..5f31fb11cc 100644 --- a/examples/msg/energy/e3/e3.c +++ b/examples/msg/energy/e3/e3.c @@ -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 -#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; @@ -99,7 +100,7 @@ static int dvfs(int argc, char *argv[]) int main(int argc, char *argv[]) { msg_error_t res = MSG_OK; - + sg_energy_plugin_init(); MSG_init(&argc, argv); if (argc != 3) {