-
Notifications
You must be signed in to change notification settings - Fork 708
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
Determine MPI Data Types in col_on_comm() & dst_on_comm() to prevent displacements overflow. (Fix for #2156) #2157
Open
benkirk
wants to merge
4
commits into
wrf-model:develop
Choose a base branch
from
benkirk:fix_displacements_overflow
base: develop
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.
Conversation
This file contains 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
…displacements overflow. The MPI_Gatherv() and MPI_Scatterv() operations require integer displacements into the communications buffers. Historically everything is passed as an MPI_CHAR, causing these displacements to be larger than otherwise necessary. For large domain sizes this can cause the displace[] offsets to exceed the maximum int, wrapping to negative values. This change introduces additional error checking and then uses the function MPI_Type_match_size() (available since MPI-2.0) to determine a suitable MPI_Datatype given the input *typesize. The result then is that the displace[] offsets are in terms of data type extents, rather than bytes, and less likely to overflow.
Just for awareness, I can't see the output of the failed |
Common problem - it will be provided by message later
…On Fri, Jan 17, 2025 at 3:21 PM Benjamin S. Kirk ***@***.***> wrote:
Just for awareness, I can't see the output of the failed WRF-BUILD-2690;
I get a timeout accessing
https://ncar_jenkins.scalacomputing.com/job/WRF-Feature-Regression-Test/2690/console
—
Reply to this email directly, view it on GitHub
<#2157 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEIZ77CVDAXTOXJBOYNIOZ32LF67RAVCNFSM6AAAAABVMWK7MSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJZGMYDONRXGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Fixes runtime failures caught by CI in in the underlying MPI_Gatherv().
Of course dtype needs to be MPI_Datatype, not an int. This error sneaked through MPICH-based tests but not OpenMPI. Hopefully this change will address previous CI failures.
The regression test results:
|
@benkirk Thanks for the fix! I tested it for a few cases we could run before and it is working now. |
Thanks for the success report @weiwangncar, happy to help! |
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.
Determine MPI Data Types in col_on_comm() & dst_on_comm() to prevent displacements overflow.
TYPE: bug fix
KEYWORDS: prevent displacements overflow in MPI_Gatherv() and MPI_Scatterv() operations
SOURCE: Benjamin Kirk & Negin Sobhani (NSF NCAR / CISL)
DESCRIPTION OF CHANGES:
Problem:
The MPI_Gatherv() and MPI_Scatterv() operations require integer displacements into the communications buffers. Historically everything is passed as an MPI_CHAR, causing these displacements to be larger than otherwise necessary. For large domain sizes this can cause the displace[] offsets to exceed the maximum int, wrapping to negative values.
Solution:
This change introduces additional error checking and then uses the function MPI_Type_match_size() (available since MPI-2.0) to determine a suitable MPI_Datatype given the input *typesize. The result then is that the displace[] offsets are in terms of data type extents, rather than bytes, and less likely to overflow.
ISSUE: Fixes #2156
LIST OF MODIFIED FILES:
M frame/collect_on_comm.c
TESTS CONDUCTED:
Failed cases run now.
RELEASE NOTE:
Determine MPI Data Types in col_on_comm() & dst_on_comm() to prevent displacements overflow.