-
Notifications
You must be signed in to change notification settings - Fork 714
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
MPI_Gatherv/MPI_Scatterv displacements overflow in frame/collect_on_comm.c #2156
Comments
@negin513 I created this issue and pointed to your PR with proposed fix coming. |
On Cray-EX systems under
Here's a full stack trace from
|
… displacements overflow. (Fix for #2156) (#2157) 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.
Describe the bug
The functions
col_on_comm()
&dst_on_comm()
inframe/collect_on_comm.c
useMPI_CHAR
as the underlying datatype inMPI_{Gather,Scattter}v
operations. This means the required displacements,displace[]
, are in terms of bytes. For large problems, and large local communicators, this can cause overflow in the displacement offsets, which manifests in MPI communication failure. Typically with a very obtuse error message.This seems to occur more frequently with large local communicators, typical of high-core-count nodes.
To Reproduce
We have boiled this down to a 6-rank example that is available on NSF NCAR/Derecho at
/glade/work/negins/consulting/RC-26919/high-res
, with a PR to be submitted with a proposed fix.Expected behavior
*typesize
so the displacements are smaller (elements instead of bytes),Additional context
Related to #1333
We think this is also the underlying issue with https://forum.mmm.ucar.edu/threads/cxil_map-write-error-with-real-exe.19321/
The text was updated successfully, but these errors were encountered: