X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9789ab443456db17ab488320128d58373e81cc7d..f679512d82a1ab52c61c4ccebc5144362334a65a:/src/surf/plugins/host_energy.cpp diff --git a/src/surf/plugins/host_energy.cpp b/src/surf/plugins/host_energy.cpp index 8e3fa2da23..f0e7c9bc7f 100644 --- a/src/surf/plugins/host_energy.cpp +++ b/src/surf/plugins/host_energy.cpp @@ -171,12 +171,12 @@ void HostEnergy::update() XBT_DEBUG("[update_energy of %s] period=[%.2f-%.2f]; current power peak=%.0E flop/s; consumption change: %.2f J -> " "%.2f J", - host->get_cname(), start_time, finish_time, host->pimpl_cpu->getSpeed(1.0), previous_energy, + host->get_cname(), start_time, finish_time, host->pimpl_cpu->get_speed(1.0), previous_energy, energy_this_step); } /* Save data for the upcoming time interval: whether it's on/off and the pstate if it's on */ - this->pstate = host->is_on() ? host->getPstate() : pstate_off; + this->pstate = host->is_on() ? host->get_pstate() : pstate_off; } HostEnergy::HostEnergy(simgrid::s4u::Host* ptr) : host(ptr), last_updated(surf_get_clock()) @@ -235,7 +235,7 @@ double HostEnergy::getCurrentWattsValue() cpu_load = host->pimpl_cpu->get_constraint()->get_usage() / current_speed; /** Divide by the number of cores here **/ - cpu_load /= host->pimpl_cpu->get_cores_count(); + cpu_load /= host->pimpl_cpu->get_core_count(); if (cpu_load > 1) // A machine with a load > 1 consumes as much as a fully loaded machine, not more cpu_load = 1; @@ -286,7 +286,7 @@ double HostEnergy::getCurrentWattsValue(double cpu_load) * (maxCpuLoad is by definition 1) */ double power_slope; - int coreCount = host->getCoreCount(); + int coreCount = host->get_core_count(); double coreReciprocal = static_cast(1) / static_cast(coreCount); if (coreCount > 1) power_slope = (max_power - min_power) / (1 - coreReciprocal); @@ -320,14 +320,14 @@ void HostEnergy::initWattsRangeList() std::vector all_power_values; boost::split(all_power_values, all_power_values_str, boost::is_any_of(",")); - XBT_DEBUG("%s: profile: %s, cores: %d", host->get_cname(), all_power_values_str, host->getCoreCount()); + XBT_DEBUG("%s: profile: %s, cores: %d", host->get_cname(), all_power_values_str, host->get_core_count()); int i = 0; for (auto const& current_power_values_str : all_power_values) { /* retrieve the power values associated with the current pstate */ std::vector current_power_values; boost::split(current_power_values, current_power_values_str, boost::is_any_of(":")); - if (host->getCoreCount() == 1) { + 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.",