- if (host_->get_core_count() == 1) {
- xbt_assert(current_power_values.size() == 2 || current_power_values.size() == 3,
- "Power properties incorrectly defined for host %s."
- "It should be 'Idle:FullSpeed' power values because you have one core only.",
- host_->get_cname());
- if (current_power_values.size() == 2) {
- // In this case, 1core == AllCores
- current_power_values.push_back(current_power_values.at(1));
- } else { // size == 3
- 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."
- " Here, only the value for 'AllCores' is used.", host_->get_cname(), current_power_values_str.c_str());
- displayed_warning = true;
- }
- }
- } else {
- xbt_assert(current_power_values.size() == 3,
- "Power properties incorrectly defined for host %s."
- "It should be 'Idle:OneCore:AllCores' power values because you have more than one core.",
- host_->get_cname());
+
+ xbt_assert(current_power_values.size() == 2 || current_power_values.size() == 3,
+ "Power properties incorrectly defined for host %s."
+ "It should be 'Idle:AllCores' (or 'Idle:Epsilon:AllCores') power values.",
+ host_->get_cname());
+
+ double idle_power;
+ double epsilon_power;
+ double max_power;
+
+ auto msg_idle = xbt::string_printf("Invalid Idle value for pstate %d on host %s", i, host_->get_cname());
+ auto msg_epsilon = xbt::string_printf("Invalid Epsilon value for pstate %d on host %s", i, host_->get_cname());
+ auto msg_max = xbt::string_printf("Invalid AllCores value for pstate %d on host %s", i, host_->get_cname());
+
+ idle_power = xbt_str_parse_double((current_power_values.at(0)).c_str(), msg_idle.c_str());
+ if (current_power_values.size() == 2) { // Case: Idle:AllCores
+ epsilon_power = xbt_str_parse_double((current_power_values.at(0)).c_str(), msg_idle.c_str());
+ max_power = xbt_str_parse_double((current_power_values.at(1)).c_str(), msg_max.c_str());
+ } else { // Case: Idle:Epsilon:AllCores
+ epsilon_power = xbt_str_parse_double((current_power_values.at(1)).c_str(), msg_epsilon.c_str());
+ max_power = xbt_str_parse_double((current_power_values.at(2)).c_str(), msg_max.c_str());