bugfix in parallel#82
Open
hgoelzer wants to merge 2 commits into
Open
Conversation
This file contains hidden or 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
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.
This is a bug discovered by Mariana. It has limited/no impact on physics, but was responsible for failing GNU debug tests with NorESM.
See NorESMhub@b31d336
M: The problem is in the parallel_mpi.F90, subroutine parallel_halo_integer_3d (lines 6740–6763): All eight MPI send/receive calls used mpi_real8 instead of mpi_integer. Since mpi_integer is 4 bytes and mpi_real8 is 8 bytes, MPI was posting receives expecting twice as many bytes as the integer buffers (wrecv, erecv, srecv, nrecv) could hold. This wrote past the end of those stack-allocated buffers, corrupting the heap —
exactly what the malloc assertion failure in glibc's _int_malloc indicates.
The crash surfaces during the parallel_halo(marine_connection_mask_3d, ...) call in glissade_bmlt_float.F90:1391 because that's the first integer 3D halo exchange triggered in this code path.
With the fix in place - the GNU debug test is running now.