-
Notifications
You must be signed in to change notification settings - Fork 5
Targetor: an algorithm for multi-criteria load balancing #297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
SMoraisDev
wants to merge
19
commits into
LIHPC-Computational-Geometry:master
Choose a base branch
from
SMoraisDev:wip/targetor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Targetor: an algorithm for multi-criteria load balancing #297
SMoraisDev
wants to merge
19
commits into
LIHPC-Computational-Geometry:master
from
SMoraisDev:wip/targetor
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previous implementation was too poorly developed, I'd rather start again, building on my accumulated experience.
Previously, the implementation of SearchStrat for NeighborSearchStrat required the trait bound isize: From<T>. This was not compatible with the current implementation of Targetor<i32,i32> as isize does not implement From<i32>.
Define trait PartitionImbalanceHandler which is composed of two methods: - compute_imbalances: return the imbalances of the partition over all criterion while taking into account the criterion target loads. - process_imbalance: return a couple composed of one of the most imbalanced criterion and the part from which a weight should me moved. This trait is implemented for Targetor.
Define trait Repartitioning composed of the method optimize. This trait is implemented for Targetor.
Previous implementation was just checking if there was a move that in the same box as the "best" move to do. The added code allows optimize to explore the boxes close to the "best" move by going further and further away. This is performed by leveraging the NeighborSearchStrat approach.
Btw, current struct name is |
The current implementation does not handle constant weight (discretizing the weight space between val and val results in None values) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR provides a new algorithm that can be used to optimize a partition where the instance has multiple criteria.
The idea of the algorithm is to optimize the partition by achieving the best possible movement or a movement close to it. To do this, the space of weights is discretised into boxes and each weight is associated with a box. The algorithm is iterative, and at each iteration it will determine the best move to make, search the associated box and, if there are no valid moves associated with the box's weight, it will explore nearby boxes, moving further and further away.
Currently, the space of weights is discretised in a regular manner according to values supplied by the user (cf. struct RegularBoxHandler). Other structures can be considered as long as they implement the BoxHandler trait.
The approach to exploring neighbor boxes is based on a progressively increasing neighborhood (see struct NeighborSearchStrat). Other structures can be considered as long as they implement the SearchStrat trait.