Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[Energy] Fix broken commit c6fc463d75e4daa67ddf9c460cbc473b1aa9d6ba
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Mon, 6 Mar 2017 12:09:28 +0000 (13:09 +0100)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Mon, 6 Mar 2017 12:53:30 +0000 (13:53 +0100)
This fixes compilation errors but also updated failing tests

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 ae07b57..cea5657 100644 (file)
@@ -16,6 +16,7 @@ $ ${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 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 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
index 1dc58bb..d51c44a 100644 (file)
@@ -18,6 +18,7 @@ $ ${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 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@) 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
index 19069e7..7dde4e6 100644 (file)
@@ -8,6 +8,7 @@ $ ${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@) 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@) 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
index 3d82954..2225e3b 100644 (file)
@@ -15,6 +15,7 @@ $ ${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 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 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
index b546246..3dd7c0d 100644 (file)
@@ -19,6 +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 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
index e6a588f..185cbd1 100644 (file)
@@ -26,6 +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 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
index 14b0275..b1f395a 100644 (file)
@@ -26,6 +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 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
index e3e4977..08ab4df 100644 (file)
@@ -3,11 +3,11 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include <simgrid/s4u/engine.hpp>
 #include "simgrid/plugins/energy.h"
 #include "simgrid/simix.hpp"
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
 #include "src/surf/cpu_interface.hpp"
 #include "simgrid/plugins/energy.h"
 #include "simgrid/simix.hpp"
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
 #include "src/surf/cpu_interface.hpp"
+#include <simgrid/s4u/engine.hpp>
 #include <utility>
 
 /** @addtogroup SURF_plugin_energy
 #include <utility>
 
 /** @addtogroup SURF_plugin_energy
@@ -326,26 +326,6 @@ static void onSimulationEnd()
            total_energy, used_hosts_energy, total_energy - used_hosts_energy);
 }
 
            total_energy, used_hosts_energy, total_energy - used_hosts_energy);
 }
 
-static int monitor_DVFS(int argc, char **argv);
-static int monitor_DVFS(int argc, char **argv) 
-{
-  while (1) {
-    MSG_process_sleep(5);
-  }
-
-  return 0;
-}
-
-static void onPlatformCreated() 
-{
-  sg_host_t* host_list = sg_host_list();
-  int host_count       = sg_host_count();
-  for (int i = 0; i < host_count; i++) {
-    MSG_process_create("dvfs", &monitor_DVFS, NULL, host_list[i]);
-    XBT_INFO("Created new MSG processes!");
-  }
-}
-
 /* **************************** Public interface *************************** */
 SG_BEGIN_DECL()
 
 /* **************************** Public interface *************************** */
 SG_BEGIN_DECL()
 
@@ -364,7 +344,6 @@ void sg_host_energy_plugin_init()
   simgrid::s4u::Host::onStateChange.connect(&onHostChange);
   simgrid::s4u::Host::onSpeedChange.connect(&onHostChange);
   simgrid::s4u::Host::onDestruction.connect(&onHostDestruction);
   simgrid::s4u::Host::onStateChange.connect(&onHostChange);
   simgrid::s4u::Host::onSpeedChange.connect(&onHostChange);
   simgrid::s4u::Host::onDestruction.connect(&onHostDestruction);
-  simgrid::s4u::onPlatformCreated.connect(&onPlatformCreated);
   simgrid::s4u::onSimulationEnd.connect(&onSimulationEnd);
   simgrid::surf::CpuAction::onStateChange.connect(&onActionStateChange);
 }
   simgrid::s4u::onSimulationEnd.connect(&onSimulationEnd);
   simgrid::surf::CpuAction::onStateChange.connect(&onActionStateChange);
 }