From: Martin Quinson Date: Wed, 10 Jun 2015 16:18:47 +0000 (+0200) Subject: make sure that MSG_host_get_wattmin_at() is tested X-Git-Tag: v3_12~622 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9527e5cfe29c3ab692d7e38409ae5fea29ace6cc make sure that MSG_host_get_wattmin_at() is tested --- diff --git a/examples/msg/energy/consumption/energy_consumption.c b/examples/msg/energy/consumption/energy_consumption.c index 822f1d7aad..2b70166b37 100644 --- a/examples/msg/energy/consumption/energy_consumption.c +++ b/examples/msg/energy/consumption/energy_consumption.c @@ -45,9 +45,11 @@ int dvfs(int argc, char *argv[]) task1 = MSG_task_create ("t1", 100E6, 0, NULL); MSG_task_execute (task1); MSG_task_destroy(task1); - XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J", + XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Current consumption: from %.0fW to %.0fW depending on load; Energy dissipated=%.0f J", MSG_get_clock()-start, - MSG_host_get_current_power_peak(host), MSG_host_get_consumed_energy(host)); + MSG_host_get_current_power_peak(host), MSG_host_get_wattmin_at(host,MSG_host_get_pstate(host)), + MSG_host_get_wattmax_at(host,MSG_host_get_pstate(host)), + MSG_host_get_consumed_energy(host)); // ========= Change power peak ========= int pstate=2; diff --git a/examples/msg/energy/consumption/energy_consumption.tesh b/examples/msg/energy/consumption/energy_consumption.tesh index c5ff2fbb45..6f751c033d 100644 --- a/examples/msg/energy/consumption/energy_consumption.tesh +++ b/examples/msg/energy/consumption/energy_consumption.tesh @@ -9,7 +9,7 @@ $ $SG_TEST_EXENV energy/consumption/energy_consumption$EXEEXT ${srcdir:=.}/../pl > [ 0.000000] (1:dvfs_test@MyHost1) Sleep for 10 seconds > [ 10.000000] (1:dvfs_test@MyHost1) Done sleeping (duration: 10.00 s). Current peak speed=1E+08; Energy dissipated=950.00 J > [ 10.000000] (1:dvfs_test@MyHost1) Run a task for 100E6 flops -> [ 11.000000] (1:dvfs_test@MyHost1) Task done (duration: 1.00 s). Current peak speed=1E+08 flop/s; Energy dissipated=1150 J +> [ 11.000000] (1:dvfs_test@MyHost1) Task done (duration: 1.00 s). Current peak speed=1E+08 flop/s; Current consumption: from 95W to 200W depending on load; Energy dissipated=1150 J > [ 11.000000] (1:dvfs_test@MyHost1) ========= Requesting pstate 2 (speed should be of 20000000.00 flop/s and is of 20000000.00 flop/s) > [ 11.000000] (1:dvfs_test@MyHost1) Run a task for 100E6 flops > [ 16.000000] (1:dvfs_test@MyHost1) Task done (duration: 5.00 s). Current peak speed=2E+07 flop/s; Energy dissipated=1900 J