-
-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add IndexMap imbalance "diagnostic" function #2653
Conversation
So, perfect balance = 1? And it can never be less than 1. I am not sure about the -1, maybe this should also just be 1 - because zero everywhere is also perfectly balanced? And then, why not just subtract the 1? In the example above, we are mostly interested that one process has 31.8% more ghost dofs than average... 0.318 would be the "imbalance", 0.0 perfect balance... |
/// separately for owned indices and ghost indices and returns them as a | ||
/// std::array<double, 2>. If the total number of owned or ghost indices is | ||
/// zero, the respective entry in the array is set to -1. | ||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be useful to say that "1.0" represents a "perfect" balance.
This seems useful, and is non-trivial to implement. Thanks! |
This PR adds a new
imbalance()
function to theIndexMap
class.The imbalance is defined as the maximum number of indices on any process divided by the average number of indices per process, and is computed separately for owned and ghost indices.
Usage example: