Class RebalancingTaskRescheduler

Inheritance Relationships

Base Type

Class Documentation

class RebalancingTaskRescheduler : public combigrid::TaskRescheduler

A task rescheduler improving the load balance by using a load model. The resulting load balance is not necessarily optimal.

Public Functions

inline RebalancingTaskRescheduler(unsigned int max_iterations, double min_inbalance)

Constructor for a rebalancing task rescheduler with specific scheduling parameters.

Parameters:
  • max_iterations – The maximum of allowed iterations. In every iteration a maximum of one task is going to be able to be rescheduled.

  • min_inbalance – The minimum of load inbalance necessary to start the search for a task to reschedule.

virtual std::vector<std::pair<LevelVector, int>> eval(const std::map<LevelVector, int> &levelVectorToProcessGroupIndex, const std::map<LevelVector, unsigned long> &levelVectorToTaskDuration, LoadModel *loadModel) override

Calculates changes in task distribution with the goal of a more balanced runtime of process groups.

The resulting load balance is not necessarily going to be the optimal distribution.

Parameters:
  • levelVectorToProcessGroupIndex – The current task distribution.

  • levelVectorToTaskDuration – The last measured durations of the tasks run function.

  • loadModel – The load model to use for the prognosis of future task loads. Needs to be a instance of SpecificUOTLearningLoadModel otherwise the scheduling is aborted.

Returns:

Vector of pairs of level vector and process group. The semantic meaning is: The task (defined by its level vector) should be moved to the process group (defined by its process group id).