From 6e39e9e795ef85dc454c72dde17d86a151dba0eb Mon Sep 17 00:00:00 2001 From: Christian Heinrich Date: Tue, 11 Sep 2018 10:33:04 +0200 Subject: [PATCH 1/1] [ENERGY] Change behavior on 1-core machines In fc45b14055d16a944771ccf34cd94f5511e6fb24 the behavior was modified when a machine specifies the Idle:OneCore:AllCores energy consumption but only has a single core. Using the AllCores consumption does make more sense in this case as it allows users more easily to model full load with MPI+OpenMP applications: All cores are actually used with OpenMP but only one process uses MPI. Hence changing the behavior to use the AllCores value instead. --- src/plugins/host_energy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/host_energy.cpp b/src/plugins/host_energy.cpp index be43b29592..ec14e759e7 100644 --- a/src/plugins/host_energy.cpp +++ b/src/plugins/host_energy.cpp @@ -351,13 +351,13 @@ void HostEnergy::init_watts_range_list() // In this case, 1core == AllCores current_power_values.push_back(current_power_values.at(1)); } else { // size == 3 - current_power_values[2] = current_power_values.at(1); + current_power_values[1] = current_power_values.at(2); + current_power_values[2] = current_power_values.at(2); static bool displayed_warning = false; if (not displayed_warning) { // Otherwise we get in the worst case no_pstate*no_hosts warnings XBT_WARN("Host %s is a single-core machine and part of the power profile is '%s'" ", which is in the 'Idle:OneCore:AllCores' format." - " Since this is a single-core machine, AllCores and OneCore are identical." - " Here, only the value for 'OneCore' is used.", host_->get_cname(), current_power_values_str.c_str()); + " Here, only the value for 'AllCores' is used.", host_->get_cname(), current_power_values_str.c_str()); displayed_warning = true; } } -- 2.20.1