From df58b4c7d68161fb9d91b939787b8a8283acda5b Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 3 Feb 2015 09:50:56 +0100 Subject: [PATCH] cosmetics in example and revalidate all energy examples --- examples/msg/energy/e2/e2.c | 12 ++++----- .../msg/energy/e2/energy_consumption.tesh | 26 ++++++++++--------- examples/msg/energy/e3/concurrent_tasks.tesh | 4 +-- examples/smpi/energy/energy.tesh | 4 +-- examples/smpi/energy/f77/energy.tesh | 4 +-- examples/smpi/energy/f90/energy.tesh | 4 +-- 6 files changed, 28 insertions(+), 26 deletions(-) diff --git a/examples/msg/energy/e2/e2.c b/examples/msg/energy/e2/e2.c index 8ba1d79002..8adac1047d 100644 --- a/examples/msg/energy/e2/e2.c +++ b/examples/msg/energy/e2/e2.c @@ -29,13 +29,13 @@ int dvfs(int argc, char *argv[]) XBT_INFO("Energetic profile: %s", MSG_host_get_property_value(host,"watt_per_state")); - XBT_INFO("Initial power peak=%.0E flop/s; Consumed energy (Joules)=%.0E J", + XBT_INFO("Initial peak speed=%.0E flop/s; Energy dissipated =%.0E J", MSG_host_get_current_power_peak(host), MSG_host_get_consumed_energy(host)); double start = MSG_get_clock(); XBT_INFO("Sleep for 10 seconds"); MSG_process_sleep(10); - XBT_INFO("Done sleeping (duration: %.2f s). Current power peak=%.0E; Current consumed energy=%.2f J", + XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E; Energy dissipated=%.2f J", MSG_get_clock()-start, MSG_host_get_current_power_peak(host), MSG_host_get_consumed_energy(host)); @@ -45,14 +45,14 @@ 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 power peak=%.0E flop/s; Current consumed energy=%.0f J", + XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J", MSG_get_clock()-start, MSG_host_get_current_power_peak(host), MSG_host_get_consumed_energy(host)); // ========= Change power peak ========= int pstate=2; MSG_host_set_pstate(host, pstate); - XBT_INFO("========= Requesting pstate %d (power should be of %.2f flop/s and is of %.2f flop/s", + XBT_INFO("========= Requesting pstate %d (speed should be of %.2f flop/s and is of %.2f flop/s)", pstate, MSG_host_get_power_peak_at(host, pstate), MSG_host_get_current_power_peak(host)); @@ -63,14 +63,14 @@ int dvfs(int argc, char *argv[]) task1 = MSG_task_create ("t2", 100E6, 0, NULL); MSG_task_execute (task1); MSG_task_destroy(task1); - XBT_INFO("Task done (duration: %.2f s). Current power peak=%.0E flop/s; Current consumed energy=%.0f J", + XBT_INFO("Task done (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J", MSG_get_clock()-start, MSG_host_get_current_power_peak(host), MSG_host_get_consumed_energy(host)); start = MSG_get_clock(); XBT_INFO("Sleep for 10 seconds"); MSG_process_sleep(4); - XBT_INFO("Done sleeping (duration: %.2f s). Current power peak=%.0E flop/s; Current consumed energy=%.0f J", + XBT_INFO("Done sleeping (duration: %.2f s). Current peak speed=%.0E flop/s; Energy dissipated=%.0f J", MSG_get_clock()-start, MSG_host_get_current_power_peak(host), MSG_host_get_consumed_energy(host)); diff --git a/examples/msg/energy/e2/energy_consumption.tesh b/examples/msg/energy/e2/energy_consumption.tesh index 67dedf72ae..ad3cd31b62 100644 --- a/examples/msg/energy/e2/energy_consumption.tesh +++ b/examples/msg/energy/e2/energy_consumption.tesh @@ -4,15 +4,17 @@ p Testing the mechanism for computing host energy consumption ! output sort $ $SG_TEST_EXENV energy/e2/e2$EXEEXT ${srcdir:=.}/../platforms/energy_platform.xml ${srcdir:=.}/energy/e2/deployment_e2.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" -> [ 0.000000] (1:dvfs_test@MyHost1) Current power peak=100000000.000000 -> [ 0.000000] (1:dvfs_test@MyHost1) Total energy (Joules): 0.000000 -> [ 1.000000] (1:dvfs_test@MyHost1) Task1 simulation time: 1.000000e+00 -> [ 1.000000] (1:dvfs_test@MyHost1) Total energy (Joules): 200.000000 -> [ 1.000000] (1:dvfs_test@MyHost1) =========Changing power peak value to 20000000.000000 (at index 2) -> [ 6.000000] (1:dvfs_test@MyHost1) Task2 simulation time: 5.000000e+00 -> [ 6.000000] (1:dvfs_test@MyHost1) Total energy (Joules): 950.000000 -> [ 9.000000] (1:dvfs_test@MyHost1) Task3 (sleep) simulation time: 4.000000e+00 -> [ 9.000000] (1:dvfs_test@MyHost1) Total energy (Joules): 1220.000000 -> [ 9.000000] (0:@) Total simulation time: 9.000000e+00 -> [ 9.000000] (0:@) Total energy (Joules) of host MyHost1: 1220.000000 -> [ 9.000000] (0:@) Total energy (Joules) of host MyHost2: 0.000000 +> [ 0.000000] (1:dvfs_test@MyHost1) Energetic profile: 95.0:200.0, 93.0:170.0, 90.0:150.0 +> [ 0.000000] (1:dvfs_test@MyHost1) Initial peak speed=1E+08 flop/s; Energy dissipated =0E+00 J +> [ 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) ========= 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 +> [ 16.000000] (1:dvfs_test@MyHost1) Sleep for 10 seconds +> [ 20.000000] (0:@) Total simulation time: 20.00 +> [ 20.000000] (0:@) Total energy of host MyHost1: 2260.000000 Joules +> [ 20.000000] (0:@) Total energy of host MyHost2: 1900.000000 Joules +> [ 20.000000] (1:dvfs_test@MyHost1) Done sleeping (duration: 4.00 s). Current peak speed=2E+07 flop/s; Energy dissipated=2260 J diff --git a/examples/msg/energy/e3/concurrent_tasks.tesh b/examples/msg/energy/e3/concurrent_tasks.tesh index 88b7f3be2c..f0178483c7 100644 --- a/examples/msg/energy/e3/concurrent_tasks.tesh +++ b/examples/msg/energy/e3/concurrent_tasks.tesh @@ -19,5 +19,5 @@ $ $SG_TEST_EXENV energy/e3/e3$EXEEXT ${srcdir:=.}/../platforms/energy_platform.x > [ 8.000000] (1:dvfs_test@MyHost1) Task simulation time: 8.000000e+00 > [ 8.000000] (1:dvfs_test@MyHost1) Total energy (Joules): 1390.000000 > [ 8.000000] (0:@) Total simulation time: 8.000000e+00 -> [ 8.000000] (0:@) Total energy (Joules) of host MyHost1: 1390.000000 -> [ 8.000000] (0:@) Total energy (Joules) of host MyHost2: 0.000000 +> [ 8.000000] (0:@) Total energy of host MyHost1: 1390.000000 Joules +> [ 8.000000] (0:@) Total energy of host MyHost2: 760.000000 Joules diff --git a/examples/smpi/energy/energy.tesh b/examples/smpi/energy/energy.tesh index 0520bc2118..6a67aeb8d9 100644 --- a/examples/smpi/energy/energy.tesh +++ b/examples/smpi/energy/energy.tesh @@ -16,5 +16,5 @@ $ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile -platf > [30.000000] [rank 0] Energy consumed: 5400 Joules. > [30.000000] [rank 0] Current pstate: 2; Current power: 20000000 > [80.000000] [rank 0] Energy consumed: 12900 Joules. -> [80.000000] [surf_energy/INFO] Total energy (Joules) of host MyHost1: 12900.000000 -> [80.000000] [surf_energy/INFO] Total energy (Joules) of host MyHost2: 2000.000000 +> [80.000000] [surf_energy/INFO] Total energy of host MyHost1: 12900.000000 Joules +> [80.000000] [surf_energy/INFO] Total energy of host MyHost2: 8650.000000 Joules diff --git a/examples/smpi/energy/f77/energy.tesh b/examples/smpi/energy/f77/energy.tesh index 82fa1fc764..7cd737e4bb 100644 --- a/examples/smpi/energy/f77/energy.tesh +++ b/examples/smpi/energy/f77/energy.tesh @@ -7,8 +7,8 @@ $ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile -platf > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'plugin' to 'Energy' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) -> [80.000000] [surf_energy/INFO] Total energy (Joules) of host MyHost1: 12900.000000 -> [80.000000] [surf_energy/INFO] Total energy (Joules) of host MyHost2: 2000.000000 +> [80.000000] [surf_energy/INFO] Total energy of host MyHost1: 12900.000000 Joules +> [80.000000] [surf_energy/INFO] Total energy of host MyHost2: 8650.000000 Joules > [ 0.0000000000000000 ] [rank 0 ] 3 pstates available > [ 0.0000000000000000 ] [rank 1 ] 1 pstates available > [ 0.0000000000000000 ] [rank 0 ] Power: 100000000.00000000 diff --git a/examples/smpi/energy/f90/energy.tesh b/examples/smpi/energy/f90/energy.tesh index 7b750ef509..4e0b208989 100644 --- a/examples/smpi/energy/f90/energy.tesh +++ b/examples/smpi/energy/f90/energy.tesh @@ -7,8 +7,8 @@ $ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile -platf > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/cpu_threshold' to '-1' > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'plugin' to 'Energy' > [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s) -> [80.000000] [surf_energy/INFO] Total energy (Joules) of host MyHost1: 12900.000000 -> [80.000000] [surf_energy/INFO] Total energy (Joules) of host MyHost2: 2000.000000 +> [80.000000] [surf_energy/INFO] Total energy of host MyHost1: 12900.000000 Joules +> [80.000000] [surf_energy/INFO] Total energy of host MyHost2: 8650.000000 Joules > [ 0.0000000000000000 ] [rank 0 ] 3 pstates available > [ 0.0000000000000000 ] [rank 1 ] 1 pstates available > [ 0.0000000000000000 ] [rank 0 ] Power: 100000000.00000000 -- 2.20.1