- xbt_assert(current_power_values.size() == 3, "Power properties incorrectly defined - "
- "could not retrieve idle, min and max power values for host %s",
- host->cname());
+ if (host->getCoreCount() == 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->getCname());
+ if (current_power_values.size() == 2) {
+ // In this case, 1core == AllCores
+ current_power_values.push_back(current_power_values.at(1));
+ } else { // size == 3
+ xbt_assert((current_power_values.at(1)) == (current_power_values.at(2)),
+ "Power properties incorrectly defined for host %s.\n"
+ "The energy profile of mono-cores should be formatted as 'Idle:FullSpeed' only.\n"
+ "If you go for a 'Idle:OneCore:AllCores' power profile on mono-cores, then OneCore and AllCores "
+ "must be equal.",
+ host->getCname());
+ }
+ } 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->getCname());
+ }