-
Notifications
You must be signed in to change notification settings - Fork 715
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Determine MPI Data Types in col_on_comm() & dst_on_comm() to prevent…
… 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.
- Loading branch information
Showing
1 changed file
with
54 additions
and
19 deletions.
There are no files selected for viewing
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