Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics in the energy plugin
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 6 Mar 2017 23:29:07 +0000 (00:29 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 6 Mar 2017 23:29:07 +0000 (00:29 +0100)
examples/java/energy/consumption/energy_consumption.tesh
examples/java/energy/pstate/energy_pstate.tesh
examples/java/energy/vm/energy_vm.tesh
examples/msg/energy-consumption/energy-consumption.tesh
examples/msg/energy-onoff/energy-onoff.tesh
examples/msg/energy-ptask/energy-ptask.tesh
examples/msg/energy-vm/energy-vm.tesh
examples/smpi/energy/energy.tesh
examples/smpi/energy/f77/energy.tesh
examples/smpi/energy/f90/energy.tesh
src/surf/plugins/host_energy.cpp

index e957c97..ef29636 100644 (file)
@@ -8,10 +8,10 @@ $ java -classpath ${classpath:=.} energy/consumption/Main ${srcdir:=.}/../platfo
 > [MyHost1:energyConsumer:(1) 0.000000] [jmsg/INFO] Initial peak speed= 1.0E8 flop/s; Energy dissipated = 0.0 J
 > [MyHost1:energyConsumer:(1) 10.000000] [jmsg/INFO] Currently consumed energy after sleeping 10 sec: 1000.0
 > [MyHost1:energyConsumer:(1) 20.000000] [jmsg/INFO] Currently consumed energy after executing 1E9 flops: 2200.0
 > [MyHost1:energyConsumer:(1) 0.000000] [jmsg/INFO] Initial peak speed= 1.0E8 flop/s; Energy dissipated = 0.0 J
 > [MyHost1:energyConsumer:(1) 10.000000] [jmsg/INFO] Currently consumed energy after sleeping 10 sec: 1000.0
 > [MyHost1:energyConsumer:(1) 20.000000] [jmsg/INFO] Currently consumed energy after executing 1E9 flops: 2200.0
-> [20.000000] [surf_energy/INFO] Summed energy consumption: 6200.000000 Joules; used hosts consumed: 2200.000000 Joules; unused (idle) hosts consumed: 4000.000000
+> [20.000000] [surf_energy/INFO] Total energy consumption: 6200.000000 Joules (used hosts: 2200.000000 Joules; unused/idle hosts: 4000.000000)
 > [20.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
 > [20.000000] [jmsg/INFO] Total simulation time: 20.0
 > [20.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
 > [20.000000] [jmsg/INFO] Total simulation time: 20.0
-> [20.000000] [surf_energy/INFO] Total energy of host MyHost1: 2200.000000 Joules
-> [20.000000] [surf_energy/INFO] Total energy of host MyHost2: 2000.000000 Joules
-> [20.000000] [surf_energy/INFO] Total energy of host MyHost3: 2000.000000 Joules
+> [20.000000] [surf_energy/INFO] Energy consumption of host MyHost1: 2200.000000 Joules
+> [20.000000] [surf_energy/INFO] Energy consumption of host MyHost2: 2000.000000 Joules
+> [20.000000] [surf_energy/INFO] Energy consumption of host MyHost3: 2000.000000 Joules
 
 
index 398458e..f2c91c8 100644 (file)
@@ -18,8 +18,8 @@ $ java -classpath ${classpath:=.} energy/pstate/Main ${srcdir:=.}/../platforms/e
 > [MyHost2:dvfs_test:(3) 6.000000] [jmsg/INFO] Count of Processor states=3
 > [MyHost1:dvfs_test:(2) 6.000000] [jmsg/INFO] Current power peak=2.0E7
 > [MyHost2:dvfs_test:(3) 6.000000] [jmsg/INFO] Current power peak=2.0E7
 > [MyHost2:dvfs_test:(3) 6.000000] [jmsg/INFO] Count of Processor states=3
 > [MyHost1:dvfs_test:(2) 6.000000] [jmsg/INFO] Current power peak=2.0E7
 > [MyHost2:dvfs_test:(3) 6.000000] [jmsg/INFO] Current power peak=2.0E7
-> [6.000000] [surf_energy/INFO] Summed energy consumption: 1890.000000 Joules; used hosts consumed: 1290.000000 Joules; unused (idle) hosts consumed: 600.000000
+> [6.000000] [surf_energy/INFO] Total energy consumption: 1890.000000 Joules (used hosts: 1290.000000 Joules; unused/idle hosts: 600.000000)
 > [6.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
 > [6.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
-> [6.000000] [surf_energy/INFO] Total energy of host MyHost1: 645.000000 Joules
-> [6.000000] [surf_energy/INFO] Total energy of host MyHost2: 645.000000 Joules
-> [6.000000] [surf_energy/INFO] Total energy of host MyHost3: 600.000000 Joules
+> [6.000000] [surf_energy/INFO] Energy consumption of host MyHost1: 645.000000 Joules
+> [6.000000] [surf_energy/INFO] Energy consumption of host MyHost2: 645.000000 Joules
+> [6.000000] [surf_energy/INFO] Energy consumption of host MyHost3: 600.000000 Joules
index e8db727..8ad0d48 100644 (file)
@@ -14,8 +14,8 @@ $ java -classpath ${classpath:=.} energy/vm/Main ${srcdir:=.}/../platforms/energ
 > [vmHost1:p11:(2) 6.000000] [jmsg/INFO] This worker is done.
 > [vmHost3:p31:(6) 6.000000] [jmsg/INFO] This worker is done.
 > [vmHost3:p312:(7) 6.000000] [jmsg/INFO] This worker is done.
 > [vmHost1:p11:(2) 6.000000] [jmsg/INFO] This worker is done.
 > [vmHost3:p31:(6) 6.000000] [jmsg/INFO] This worker is done.
 > [vmHost3:p312:(7) 6.000000] [jmsg/INFO] This worker is done.
-> [10.000000] [surf_energy/INFO] Summed energy consumption: 3360.000000 Joules; used hosts consumed: 3360.000000 Joules; unused (idle) hosts consumed: 0.000000
+> [10.000000] [surf_energy/INFO] Total energy consumption: 3360.000000 Joules (used hosts: 3360.000000 Joules; unused/idle hosts: 0.000000)
 > [10.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
 > [10.000000] [jmsg/INFO] MSG_main finished; Cleaning up the simulation...
-> [10.000000] [surf_energy/INFO] Total energy of host MyHost1: 1120.000000 Joules
-> [10.000000] [surf_energy/INFO] Total energy of host MyHost2: 1120.000000 Joules
-> [10.000000] [surf_energy/INFO] Total energy of host MyHost3: 1120.000000 Joules
+> [10.000000] [surf_energy/INFO] Energy consumption of host MyHost1: 1120.000000 Joules
+> [10.000000] [surf_energy/INFO] Energy consumption of host MyHost2: 1120.000000 Joules
+> [10.000000] [surf_energy/INFO] Energy consumption of host MyHost3: 1120.000000 Joules
index cea5657..bab32d8 100644 (file)
@@ -16,8 +16,8 @@ $ ${bindir:=.}/energy-consumption/energy-consumption$EXEEXT ${srcdir:=.}/../plat
 > [ 20.000000] (1:dvfs_test@MyHost1) Done sleeping (duration: 4.00 s). Current peak speed=2E+07 flop/s; Energy dissipated=2005 J
 > [ 20.000000] (1:dvfs_test@MyHost1) Turning MyHost2 off, and sleeping another 10 seconds. MyHost2 dissipated 2000 J so far.
 > [ 30.000000] (1:dvfs_test@MyHost1) Done sleeping (duration: 10.00 s). Current peak speed=2E+07 flop/s; Energy dissipated=2905 J
 > [ 20.000000] (1:dvfs_test@MyHost1) Done sleeping (duration: 4.00 s). Current peak speed=2E+07 flop/s; Energy dissipated=2005 J
 > [ 20.000000] (1:dvfs_test@MyHost1) Turning MyHost2 off, and sleeping another 10 seconds. MyHost2 dissipated 2000 J so far.
 > [ 30.000000] (1:dvfs_test@MyHost1) Done sleeping (duration: 10.00 s). Current peak speed=2E+07 flop/s; Energy dissipated=2905 J
-> [ 30.000000] (0:maestro@) Summed energy consumption: 8005.000000 Joules; used hosts consumed: 5005.000000 Joules; unused (idle) hosts consumed: 3000.000000
+> [ 30.000000] (0:maestro@) Total energy consumption: 8005.000000 Joules (used hosts: 5005.000000 Joules; unused/idle hosts: 3000.000000)
 > [ 30.000000] (0:maestro@) Total simulation time: 30.00
 > [ 30.000000] (0:maestro@) Total simulation time: 30.00
-> [ 30.000000] (0:maestro@) Total energy of host MyHost1: 2905.000000 Joules
-> [ 30.000000] (0:maestro@) Total energy of host MyHost2: 2100.000000 Joules
-> [ 30.000000] (0:maestro@) Total energy of host MyHost3: 3000.000000 Joules
+> [ 30.000000] (0:maestro@) Energy consumption of host MyHost1: 2905.000000 Joules
+> [ 30.000000] (0:maestro@) Energy consumption of host MyHost2: 2100.000000 Joules
+> [ 30.000000] (0:maestro@) Energy consumption of host MyHost3: 3000.000000 Joules
index d51c44a..f0c366e 100644 (file)
@@ -18,9 +18,9 @@ $ ${bindir:=.}/energy-onoff/energy-onoff$EXEEXT ${srcdir:=.}/energy-onoff/platfo
 > [ 26.997901] (1:onoff_test@MyHost2) Switch to virtual pstate 3, that encodes the shutting down state in the XML file of that example
 > [ 26.997901] (1:onoff_test@MyHost2) Actually start the host
 > [ 26.997901] (1:onoff_test@MyHost2) Simulate the boot up by executing one flop on that host
 > [ 26.997901] (1:onoff_test@MyHost2) Switch to virtual pstate 3, that encodes the shutting down state in the XML file of that example
 > [ 26.997901] (1:onoff_test@MyHost2) Actually start the host
 > [ 26.997901] (1:onoff_test@MyHost2) Simulate the boot up by executing one flop on that host
-> [176.997893] (0:maestro@) Summed energy consumption: 37519.557482 Joules; used hosts consumed: 37519.557482 Joules; unused (idle) hosts consumed: 0.000000
+> [176.997893] (0:maestro@) Total energy consumption: 37519.557482 Joules (used hosts: 37519.557482 Joules; unused/idle hosts: 0.000000)
 > [176.997893] (0:maestro@) Total simulation time: 177.00
 > [176.997893] (0:maestro@) Total simulation time: 177.00
-> [176.997893] (0:maestro@) Total energy of host MyHost1: 19819.768169 Joules
-> [176.997893] (0:maestro@) Total energy of host MyHost2: 17699.789313 Joules
+> [176.997893] (0:maestro@) Energy consumption of host MyHost1: 19819.768169 Joules
+> [176.997893] (0:maestro@) Energy consumption of host MyHost2: 17699.789313 Joules
 > [176.997893] (1:onoff_test@MyHost2) Switch back to previously selected pstate 0
 > [176.997893] (1:onoff_test@MyHost2) Host1 is now ON again. Current peak speed=1E+08 flop/s; Energy dissipated=19820 J
 > [176.997893] (1:onoff_test@MyHost2) Switch back to previously selected pstate 0
 > [176.997893] (1:onoff_test@MyHost2) Host1 is now ON again. Current peak speed=1E+08 flop/s; Energy dissipated=19820 J
index 7dde4e6..2601390 100644 (file)
@@ -8,8 +8,8 @@ $ ${bindir:=.}/energy-ptask/energy-ptask$EXEEXT ${srcdir:=.}/../platforms/energy
 > [311.000000] (1:test@MyHost1) Then, build a parallel task with no computation nor communication (synchro only)
 > [311.000000] (1:test@MyHost1) Finally, trick the ptask to do a 'remote execution', on host MyHost2
 > [321.000000] (1:test@MyHost1) Goodbye now!
 > [311.000000] (1:test@MyHost1) Then, build a parallel task with no computation nor communication (synchro only)
 > [311.000000] (1:test@MyHost1) Finally, trick the ptask to do a 'remote execution', on host MyHost2
 > [321.000000] (1:test@MyHost1) Goodbye now!
-> [321.000000] (0:maestro@) Summed energy consumption: 115160.000000 Joules; used hosts consumed: 115160.000000 Joules; unused (idle) hosts consumed: 0.000000
+> [321.000000] (0:maestro@) Total energy consumption: 115160.000000 Joules (used hosts: 115160.000000 Joules; unused/idle hosts: 0.000000)
 > [321.000000] (0:maestro@) Simulation done.
 > [321.000000] (0:maestro@) Simulation done.
-> [321.000000] (0:maestro@) Total energy of host MyHost1: 38320.000000 Joules
-> [321.000000] (0:maestro@) Total energy of host MyHost2: 38520.000000 Joules
-> [321.000000] (0:maestro@) Total energy of host MyHost3: 38320.000000 Joules
+> [321.000000] (0:maestro@) Energy consumption of host MyHost1: 38320.000000 Joules
+> [321.000000] (0:maestro@) Energy consumption of host MyHost2: 38520.000000 Joules
+> [321.000000] (0:maestro@) Energy consumption of host MyHost3: 38320.000000 Joules
index 2225e3b..c89dd5d 100644 (file)
@@ -15,8 +15,8 @@ $ ${bindir:=.}/energy-vm/energy-vm$EXEEXT ${srcdir:=.}/../platforms/energy_platf
 > [  6.000000] (2:p11@vm_host1) This worker is done.
 > [  6.000000] (6:p31@vm_host3) This worker is done.
 > [  6.000000] (7:p32@vm_host3) This worker is done.
 > [  6.000000] (2:p11@vm_host1) This worker is done.
 > [  6.000000] (6:p31@vm_host3) This worker is done.
 > [  6.000000] (7:p32@vm_host3) This worker is done.
-> [ 10.000000] (0:maestro@) Summed energy consumption: 3360.000000 Joules; used hosts consumed: 3360.000000 Joules; unused (idle) hosts consumed: 0.000000
+> [ 10.000000] (0:maestro@) Total energy consumption: 3360.000000 Joules (used hosts: 3360.000000 Joules; unused/idle hosts: 0.000000)
 > [ 10.000000] (0:maestro@) Total simulation time: 10.00; All hosts must have the exact same energy consumption.
 > [ 10.000000] (0:maestro@) Total simulation time: 10.00; All hosts must have the exact same energy consumption.
-> [ 10.000000] (0:maestro@) Total energy of host MyHost1: 1120.000000 Joules
-> [ 10.000000] (0:maestro@) Total energy of host MyHost2: 1120.000000 Joules
-> [ 10.000000] (0:maestro@) Total energy of host MyHost3: 1120.000000 Joules
+> [ 10.000000] (0:maestro@) Energy consumption of host MyHost1: 1120.000000 Joules
+> [ 10.000000] (0:maestro@) Energy consumption of host MyHost2: 1120.000000 Joules
+> [ 10.000000] (0:maestro@) Energy consumption of host MyHost3: 1120.000000 Joules
index 3dd7c0d..c11eef7 100644 (file)
@@ -19,7 +19,7 @@ $ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile  -platf
 > [30.000000] [rank 1] Current pstate: 2; Current power: 20000000
 > [80.000000] [rank 0] Energy consumed: 8650 Joules.
 > [80.000000] [rank 1] Energy consumed: 8650 Joules.
 > [30.000000] [rank 1] Current pstate: 2; Current power: 20000000
 > [80.000000] [rank 0] Energy consumed: 8650 Joules.
 > [80.000000] [rank 1] Energy consumed: 8650 Joules.
-> [80.000000] [surf_energy/INFO] Summed energy consumption: 25300.000000 Joules; used hosts consumed: 17300.000000 Joules; unused (idle) hosts consumed: 8000.000000
-> [80.000000] [surf_energy/INFO] Total energy of host MyHost1: 8650.000000 Joules
-> [80.000000] [surf_energy/INFO] Total energy of host MyHost2: 8650.000000 Joules
-> [80.000000] [surf_energy/INFO] Total energy of host MyHost3: 8000.000000 Joules
+> [80.000000] [surf_energy/INFO] Total energy consumption: 25300.000000 Joules (used hosts: 17300.000000 Joules; unused/idle hosts: 8000.000000)
+> [80.000000] [surf_energy/INFO] Energy consumption of host MyHost1: 8650.000000 Joules
+> [80.000000] [surf_energy/INFO] Energy consumption of host MyHost2: 8650.000000 Joules
+> [80.000000] [surf_energy/INFO] Energy consumption of host MyHost3: 8000.000000 Joules
index 185cbd1..ac21859 100644 (file)
@@ -26,7 +26,7 @@ $ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile  -platf
 >  [   30.000000000000000      ] [rank            1 ] Current pstate:            2 ; Current power:    20000000.000000000     
 >  [   80.000000000000000      ] [rank            0 ] Energy consumed (Joules):    8650.0000000000000     
 >  [   80.000000000000000      ] [rank            1 ] Energy consumed (Joules):    8650.0000000000000     
 >  [   30.000000000000000      ] [rank            1 ] Current pstate:            2 ; Current power:    20000000.000000000     
 >  [   80.000000000000000      ] [rank            0 ] Energy consumed (Joules):    8650.0000000000000     
 >  [   80.000000000000000      ] [rank            1 ] Energy consumed (Joules):    8650.0000000000000     
-> [80.000000] [surf_energy/INFO] Summed energy consumption: 25300.000000 Joules; used hosts consumed: 17300.000000 Joules; unused (idle) hosts consumed: 8000.000000
-> [80.000000] [surf_energy/INFO] Total energy of host MyHost1: 8650.000000 Joules
-> [80.000000] [surf_energy/INFO] Total energy of host MyHost2: 8650.000000 Joules
-> [80.000000] [surf_energy/INFO] Total energy of host MyHost3: 8000.000000 Joules
+> [80.000000] [surf_energy/INFO] Total energy consumption: 25300.000000 Joules (used hosts: 17300.000000 Joules; unused/idle hosts: 8000.000000)
+> [80.000000] [surf_energy/INFO] Energy consumption of host MyHost1: 8650.000000 Joules
+> [80.000000] [surf_energy/INFO] Energy consumption of host MyHost2: 8650.000000 Joules
+> [80.000000] [surf_energy/INFO] Energy consumption of host MyHost3: 8000.000000 Joules
index b1f395a..d8ef694 100644 (file)
@@ -26,7 +26,7 @@ $ ../../../smpi_script/bin/smpirun -np 2 -hostfile ${srcdir:=.}/hostfile  -platf
 >  [   30.000000000000000      ] [rank            1 ] Current pstate:            2 ; Current power:    20000000.000000000     
 >  [   80.000000000000000      ] [rank            0 ] Energy consumed (Joules):    8650.0000000000000     
 >  [   80.000000000000000      ] [rank            1 ] Energy consumed (Joules):    8650.0000000000000     
 >  [   30.000000000000000      ] [rank            1 ] Current pstate:            2 ; Current power:    20000000.000000000     
 >  [   80.000000000000000      ] [rank            0 ] Energy consumed (Joules):    8650.0000000000000     
 >  [   80.000000000000000      ] [rank            1 ] Energy consumed (Joules):    8650.0000000000000     
-> [80.000000] [surf_energy/INFO] Summed energy consumption: 25300.000000 Joules; used hosts consumed: 17300.000000 Joules; unused (idle) hosts consumed: 8000.000000
-> [80.000000] [surf_energy/INFO] Total energy of host MyHost1: 8650.000000 Joules
-> [80.000000] [surf_energy/INFO] Total energy of host MyHost2: 8650.000000 Joules
-> [80.000000] [surf_energy/INFO] Total energy of host MyHost3: 8000.000000 Joules
+> [80.000000] [surf_energy/INFO] Total energy consumption: 25300.000000 Joules (used hosts: 17300.000000 Joules; unused/idle hosts: 8000.000000)
+> [80.000000] [surf_energy/INFO] Energy consumption of host MyHost1: 8650.000000 Joules
+> [80.000000] [surf_energy/INFO] Energy consumption of host MyHost2: 8650.000000 Joules
+> [80.000000] [surf_energy/INFO] Energy consumption of host MyHost3: 8000.000000 Joules
index aa6af90..124d6f2 100644 (file)
@@ -310,27 +310,26 @@ static void onHostDestruction(simgrid::s4u::Host& host)
 
   HostEnergy* host_energy = host.extension<HostEnergy>();
   host_energy->update();
 
   HostEnergy* host_energy = host.extension<HostEnergy>();
   host_energy->update();
-  XBT_INFO("Total energy of host %s: %f Joules", host.cname(), host_energy->getConsumedEnergy());
+  XBT_INFO("Energy consumption of host %s: %f Joules", host.cname(), host_energy->getConsumedEnergy());
 }
 
 static void onSimulationEnd()
 {
   sg_host_t* host_list     = sg_host_list();
   int host_count           = sg_host_count();
 }
 
 static void onSimulationEnd()
 {
   sg_host_t* host_list     = sg_host_list();
   int host_count           = sg_host_count();
-  double total_energy      = 0.0; // Total energy consumption (whole plattform)
+  double total_energy      = 0.0; // Total energy consumption (whole platform)
   double used_hosts_energy = 0.0; // Energy consumed by hosts that computed something
   for (int i = 0; i < host_count; i++) {
     if (dynamic_cast<simgrid::s4u::VirtualMachine*>(host_list[i]) == nullptr) { // Ignore virtual machines
 
       bool host_was_used = (host_list[i]->extension<HostEnergy>()->last_updated != 0);
   double used_hosts_energy = 0.0; // Energy consumed by hosts that computed something
   for (int i = 0; i < host_count; i++) {
     if (dynamic_cast<simgrid::s4u::VirtualMachine*>(host_list[i]) == nullptr) { // Ignore virtual machines
 
       bool host_was_used = (host_list[i]->extension<HostEnergy>()->last_updated != 0);
-      double energy      = 0.0;
-      energy             = host_list[i]->extension<HostEnergy>()->getConsumedEnergy();
+      double energy      = host_list[i]->extension<HostEnergy>()->getConsumedEnergy();
       total_energy      += energy;
       if (host_was_used)
         used_hosts_energy += energy;
     }
   }
       total_energy      += energy;
       if (host_was_used)
         used_hosts_energy += energy;
     }
   }
-  XBT_INFO("Summed energy consumption: %f Joules; used hosts consumed: %f Joules; unused (idle) hosts consumed: %f",
+  XBT_INFO("Total energy consumption: %f Joules (used hosts: %f Joules; unused/idle hosts: %f)",
            total_energy, used_hosts_energy, total_energy - used_hosts_energy);
 }
 
            total_energy, used_hosts_energy, total_energy - used_hosts_energy);
 }