geopm
3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
|
#include <PowerBalancerImp.hpp>
Public Member Functions | |
PowerBalancerImp (double ctl_latency, double trial_delta, int num_sample, double measure_duration) | |
Construct a testable PowerBalancerImp object. More... | |
PowerBalancerImp (double ctl_latency) | |
Construct a PowerBalancerImp object. More... | |
virtual | ~PowerBalancerImp ()=default |
Destroy a PowerBalancerImp object. More... | |
void | power_cap (double cap) override |
Should be called at the start of application execution with the average power cap across compute nodes. Should be called at the end of the second phase of execution to note that the power savings made across all compute nodes has been evenly redistributed. More... | |
double | power_cap (void) const override |
The current power cap which cannot be exceeded without breaking contract that the average power budget across all compute nodes is maintained. More... | |
double | power_limit (void) const override |
Returns the current power limit prescribed for this node. More... | |
void | power_limit_adjusted (double limit) override |
Notify power balancer that a new limit has been set with the governor. More... | |
bool | is_runtime_stable (double measured_runtime) override |
Update the object with a runtime measured under the current power limit and test if the current runtime sample is reliable such that a call runtime_sample() can be made. More... | |
double | runtime_sample (void) const override |
Return the expected execution time of an application epoch under the current power limit. More... | |
void | calculate_runtime_sample (void) override |
Sample the measured runtimes under the current power cap in the first phase of execution. This measurement will be aggregated across all compute nodes to find the largest runtime measured. More... | |
void | target_runtime (double largest_runtime) override |
bool | is_target_met (double measured_runtime) override |
During the second phase of execution the power limit is decreased until the epoch runtime on the compute node under management has increased to the runtime of the slowest compute node. This method is used to update the object with a new measurement and also test if the current power limit meets the requirements. If the method returns false, then the value returned by power_limit() may have been updated. The new power limit should be enforced for the next epoch execution. More... | |
double | power_slack (void) override |
Query the difference between the last power cap setting and the current power limit. If this method is called and it returns zero then the trial delta used to lower the power limit is reduced by a factor of two. More... | |
Public Member Functions inherited from geopm::PowerBalancer | |
PowerBalancer ()=default | |
Construct a IPowerBalancer object. More... | |
virtual | ~PowerBalancer ()=default |
Destroy a IPowerBalancer object. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from geopm::PowerBalancer | |
static std::unique_ptr< PowerBalancer > | make_unique (double ctl_latency) |
Returns a unique_ptr to a concrete object constructed using the underlying implementation. More... | |
static std::shared_ptr< PowerBalancer > | make_shared (double ctl_latency) |
Returns a shared_ptr to a concrete object constructed using the underlying implementation. More... | |
geopm::PowerBalancerImp::PowerBalancerImp | ( | double | ctl_latency, |
double | trial_delta, | ||
int | num_sample, | ||
double | measure_duration | ||
) |
Construct a testable PowerBalancerImp object.
geopm::PowerBalancerImp::PowerBalancerImp | ( | double | ctl_latency | ) |
Construct a PowerBalancerImp object.
|
virtualdefault |
Destroy a PowerBalancerImp object.
|
overridevirtual |
Sample the measured runtimes under the current power cap in the first phase of execution. This measurement will be aggregated across all compute nodes to find the largest runtime measured.
Implements geopm::PowerBalancer.
|
overridevirtual |
Update the object with a runtime measured under the current power limit and test if the current runtime sample is reliable such that a call runtime_sample() can be made.
measured_runtime | Most recent measurement of the execution time for an epoch on the node being managed under the current power limit. |
m_runtime_vec used as a temporary holder until enough time has passed to determine how many samples are required in the circular buffer.
Implements geopm::PowerBalancer.
|
overridevirtual |
During the second phase of execution the power limit is decreased until the epoch runtime on the compute node under management has increased to the runtime of the slowest compute node. This method is used to update the object with a new measurement and also test if the current power limit meets the requirements. If the method returns false, then the value returned by power_limit() may have been updated. The new power limit should be enforced for the next epoch execution.
measured_runtime | Most recent measurement of the execution time for an epoch on the node being managed under the current power limit. |
Implements geopm::PowerBalancer.
|
overridevirtual |
Should be called at the start of application execution with the average power cap across compute nodes. Should be called at the end of the second phase of execution to note that the power savings made across all compute nodes has been evenly redistributed.
power_cap | The new maximum power limit equal to the current power limit plus the amount of power saved that is being redistributed. |
Implements geopm::PowerBalancer.
|
overridevirtual |
The current power cap which cannot be exceeded without breaking contract that the average power budget across all compute nodes is maintained.
Implements geopm::PowerBalancer.
|
overridevirtual |
Returns the current power limit prescribed for this node.
Implements geopm::PowerBalancer.
|
overridevirtual |
Notify power balancer that a new limit has been set with the governor.
limit | limit that was set. |
Implements geopm::PowerBalancer.
|
overridevirtual |
Query the difference between the last power cap setting and the current power limit. If this method is called and it returns zero then the trial delta used to lower the power limit is reduced by a factor of two.
Implements geopm::PowerBalancer.
|
overridevirtual |
Return the expected execution time of an application epoch under the current power limit.
Implements geopm::PowerBalancer.
|
overridevirtual |
Set | the target runtime which is the largest epoch execution time measured by any compute node since the application began or the last global increase to the power budget. |
largest_runtime | The largest expected runtime for one epoch across all compute nodes under the current power budget. |
Implements geopm::PowerBalancer.