-
Notifications
You must be signed in to change notification settings - Fork 939
dims_create: fix calculation of factors for odd squares #7189
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
Conversation
Until now sqrt(n) was missed as a factor for odd square numbers n. This lead to suboptimal results of MPI_Dims_create for input numbers like 9, 25, 49, ... Fix the results by including sqrt(n) in the search for factors. Refs: open-mpi#7186 Signed-off-by: Michael Lass <[email protected]>
|
Can one of the admins verify this patch? |
|
ok to test |
|
Tested by creating 2D dims for numbers 1-99: |
awlauria
left a comment
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.
LGTM.
|
@michaellass Awesome! Would you mind opening a few more PRs -- Thanks! |
Until now sqrt(n) was missed as a factor for odd square numbers n. This lead to suboptimal results of MPI_Dims_create for input numbers like 9, 25, 49, ... Fix the results by including sqrt(n) in the search for factors.
Refs: #7186