8 #ifndef SRC_DECOMPOSITION_DLB_HPP_ 9 #define SRC_DECOMPOSITION_DLB_HPP_ 60 SAR_HEURISTIC, UNBALANCE_THRLD
66 THRLD_LOW = 5, THRLD_MEDIUM = 7, THRLD_HIGH = 10
109 float t_max = t, t_avg = t;
150 std::cerr <<
"Error: Un-balance value must be set before checking DLB.";
void setHeurisitc(Heuristic h)
Set the heuristic to use (default: un-balance threshold)
size_t iterationStartTime
Interval between teo rebalance.
float i_time
Idle time accumulated so far, needed for SAR heuristic.
size_t simulationEndTime
End iteration of the simulation.
Heuristic getHeurisitc()
Get the heuristic.
ThresholdLevel thl
Threshold value.
DLB(Vcluster<> &v_cl)
Constructor for DLB class.
void setTimeStep(double t)
Set delta time step for one iteration (Computation time)
float unbalance
Un-balance value.
void setSimulationEndTime(size_t t)
Set end time for the simulation.
size_t n_ts
Number of time-steps since the previous DLB.
Heuristic heuristic
Type of the heuristic to use.
void startIteration(size_t t)
Set start time for the single iteration.
size_t iterationEndTime
End time.
void setComputationCost(size_t computation)
Set time step for the single iteration.
bool rebalanceNeeded()
check if a re-balance is needed using the selected heuristic
bool SAR()
Function that gather times informations and decides if a rebalance is needed it uses the SAR heuristi...
Implementation of VCluster class.
size_t simulationStartTime
starting time of the simulation (0)
void execute()
Execute all the requests.
void setSimulationStartTime(size_t t)
Set start time for the simulation.
size_t getSimulationEndTime()
Get end time for the simulation.
float w_n
Wn for SAR heuristic.
Vcluster & v_cl
Runtime virtual cluster machine.
size_t getNTimeStepSinceDLB()
Get how many time-steps have passed since the last re-balancing.
ThresholdLevel
Level of un-balance needed to trigger the re-balance.
double timeStep
integration time
bool unbalanceThreshold()
Check if the un-balance has exceeded the threshold.
size_t getProcessingUnits()
Get the total number of processors.
openfpm::vector< long > times
Vector to collect all timings.
void sum(T &num)
Sum the numbers across all processors and get the result.
void endIteration(size_t t)
Set the end time when the previous rebalance has been performed.
void startIteration()
Set start time for the single iteration.
Time structure for statistical purposes.
void endIteration()
Set end time for the single iteration.
size_t getSimulationStartTime()
Get start time for the simulation.
float c_c
Computation cost for SAR heuristic.
void max(T &num)
Get the maximum number across all processors (or reduction with infinity norm)
void setThresholdLevel(ThresholdLevel t)
threshold of umbalance to start a rebalance
void setUnbalance(float u)
Set un-balance value.
Heuristic
Type of DLB heuristics.
Times timeInfo
Structure that will contain all the timings.