Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make sure that MSG_host_get_wattmin_at() is tested
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 10 Jun 2015 16:18:47 +0000 (18:18 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 10 Jun 2015 16:18:47 +0000 (18:18 +0200)
examples/msg/energy/consumption/energy_consumption.c
examples/msg/energy/consumption/energy_consumption.tesh

index 822f1d7..2b70166 100644 (file)
@@ -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;
index c5ff2fb..6f751c0 100644 (file)
@@ -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