p Testing the mechanism for computing host energy consumption
$ ${bindir:=.}/energy-consumption/energy-consumption$EXEEXT ${srcdir:=.}/../platforms/energy_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (1:dvfs_test@MyHost1) Energetic profile: 100.0:120.0:200.0, 93.0:110.0:170.0, 90.0:105.0:150.0
+> [ 0.000000] (1:dvfs_test@MyHost1) Energetic profile: 100.0:120.0:120.0, 93.0:110.0:110.0, 90.0:105.0:105.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=1000.00 J
> [ 10.000000] (1:dvfs_test@MyHost1) Run a task of 1E+08 flops
-> [ 11.000000] (1:dvfs_test@MyHost1) Task done (duration: 1.00 s). Current peak speed=1E+08 flop/s; Current consumption: from 120W to 200W depending on load; Energy dissipated=1120 J
+> [ 11.000000] (1:dvfs_test@MyHost1) Task done (duration: 1.00 s). Current peak speed=1E+08 flop/s; Current consumption: from 120W to 120W depending on load; Energy dissipated=1120 J
> [ 11.000000] (1:dvfs_test@MyHost1) ========= Requesting pstate 2 (speed should be of 2E+07 flop/s and is of 2E+07 flop/s)
> [ 11.000000] (1:dvfs_test@MyHost1) Run a task of 1E+08 flops
> [ 16.000000] (1:dvfs_test@MyHost1) Task done (duration: 5.00 s). Current peak speed=2E+07 flop/s; Energy dissipated=1645 J
> [ 30.000000] (0:maestro@) Energy consumption of host MyHost3: 3000.000000 Joules
$ ${bindir:=.}/energy-consumption/energy-consumption$EXEEXT ${srcdir:=.}/../platforms/energy_cluster.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (1:dvfs_test@MyHost1) Energetic profile: 100.0:120.0:200.0, 93.0:110.0:170.0, 90.0:105.0:150.0
+> [ 0.000000] (1:dvfs_test@MyHost1) Energetic profile: 100.0:120.0:120.0, 93.0:110.0:110.0, 90.0:105.0:105.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=1000.00 J
> [ 10.000000] (1:dvfs_test@MyHost1) Run a task of 1E+08 flops
-> [ 11.000000] (1:dvfs_test@MyHost1) Task done (duration: 1.00 s). Current peak speed=1E+08 flop/s; Current consumption: from 120W to 200W depending on load; Energy dissipated=1120 J
+> [ 11.000000] (1:dvfs_test@MyHost1) Task done (duration: 1.00 s). Current peak speed=1E+08 flop/s; Current consumption: from 120W to 120W depending on load; Energy dissipated=1120 J
> [ 11.000000] (1:dvfs_test@MyHost1) ========= Requesting pstate 2 (speed should be of 2E+07 flop/s and is of 2E+07 flop/s)
> [ 11.000000] (1:dvfs_test@MyHost1) Run a task of 1E+08 flops
> [ 16.000000] (1:dvfs_test@MyHost1) Task done (duration: 5.00 s). Current peak speed=2E+07 flop/s; Energy dissipated=1645 J
! output sort 19
$ ${bindir:=.}/energy-onoff/energy-onoff$EXEEXT ${srcdir:=.}/energy-onoff/platform_onoff.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
-> [ 0.000000] (1:onoff_test@MyHost2) Energetic profile: 95.0:120.0:200.0,93.0:110.0:170.0,90.0:100.0:150.0, 120:120:120,110:110:110
+> [ 0.000000] (1:onoff_test@MyHost2) Energetic profile: 95.0:120.0:120.0,93.0:110.0:110.0,90.0:100.0:100.0, 120:120:120,110:110:110
> [ 0.000000] (1:onoff_test@MyHost2) Initial peak speed=1E+08 flop/s; Energy dissipated =0E+00 J
> [ 0.000000] (1:onoff_test@MyHost2) Sleep for 10 seconds
> [ 10.000000] (1:onoff_test@MyHost2) Done sleeping. Current peak speed=1E+08; Energy dissipated=950.00 J
values that are right for you. -->
<host id="MyHost1" speed="100.0Mf,50.0Mf,20.0Mf, 0.006666667f,0.1429f" pstate="0" >
- <prop id="watt_per_state" value="95.0:120.0:200.0,93.0:110.0:170.0,90.0:100.0:150.0, 120:120:120,110:110:110" />
+ <prop id="watt_per_state" value="95.0:120.0:120.0,93.0:110.0:110.0,90.0:100.0:100.0, 120:120:120,110:110:110" />
<prop id="watt_off" value="10" />
</host>
<host id="MyHost2" speed="100.0Mf" >
- <prop id="watt_per_state" value="100.0:120.0:200.0" />
+ <prop id="watt_per_state" value="100.0:120.0:120.0" />
<prop id="watt_off" value="10" />
</host>
bw="125MBps" lat="50us" bb_bw="2.25GBps" bb_lat="500us">
<!-- List of idle_power:min_power:max_power pairs (in Watts) -->
<!-- The list must contain one speed tupple for each previously defined pstate-->
- <prop id="watt_per_state" value="100.0:120.0:200.0, 93.0:110.0:170.0, 90.0:105.0:150.0" />
+ <prop id="watt_per_state" value="100.0:120.0:120.0, 93.0:110.0:110.0, 90.0:105.0:105.0" />
<prop id="watt_off" value="10" />
</cluster>
</platform>
<!-- Multiple pstate processor capacities can be defined as a list of powers specified for a given host -->
<!-- Attribute 'pstate' specifies the initialy selected pstate (here, the lowest pstate corresponds to the highest
processor speed) -->
- <host id="MyHost1" speed="100.0Mf,50.0Mf,20.0Mf" pstate="0" >
+ <host id="MyHost1" speed="100.0Mf,50.0Mf,20.0Mf" pstate="0" core="1" >
<!-- List of min_power:max_power pairs (in Watts) corresponding to the speed consumed when the processor is idle
and when it is fully loaded -->
<!-- The list must contain one speed pair for each previously defined pstate-->
- <prop id="watt_per_state" value="100.0:120.0:200.0, 93.0:110.0:170.0, 90.0:105.0:150.0" />
+ <prop id="watt_per_state" value="100.0:120.0:120.0, 93.0:110.0:110.0, 90.0:105.0:105.0" />
<prop id="watt_off" value="10" />
</host>
<host id="MyHost2" speed="100.0Mf,50.0Mf,20.0Mf" pstate="0" >
- <prop id="watt_per_state" value="100.0:120.0:200.0, 93.0:110.0:170.0, 90.0:105.0:150.0" />
+ <prop id="watt_per_state" value="100.0:120.0:120.0, 93.0:110.0:110.0, 90.0:105.0:105.0" />
<prop id="watt_off" value="10" />
</host>
<host id="MyHost3" speed="100.0Mf,50.0Mf,20.0Mf" pstate="0" >
- <prop id="watt_per_state" value="100.0:120.0:200.0, 93.0:110.0:170.0, 90.0:105.0:150.0" />
+ <prop id="watt_per_state" value="100.0:120.0:120.0, 93.0:110.0:110.0, 90.0:105.0:105.0" />
<prop id="watt_off" value="10" />
</host>
#include "simgrid/s4u/Engine.hpp"
+#include <algorithm>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <string>
xbt_free(msg);
}
/* watts_off is 0 by default */
+
+ if (ptr->coreCount() == 1)
+ xbt_assert(std::all_of(power_range_watts_list.begin(), power_range_watts_list.end(),
+ [](PowerRange power_range) { return power_range.min == power_range.max; }),
+ "You only have one core in host %s, but the \
+ energy consumption for one core does not match the energy consumption for all (here: 1) cores). This is an error in your platform, please fix it.",
+ host->cname());
}
HostEnergy::~HostEnergy() = default;