Fix restart where you lose a level and NReaders > NProcs()#5074
Open
atmyers wants to merge 3 commits intoAMReX-Codes:developmentfrom
Open
Fix restart where you lose a level and NReaders > NProcs()#5074atmyers wants to merge 3 commits intoAMReX-Codes:developmentfrom
atmyers wants to merge 3 commits intoAMReX-Codes:developmentfrom
Conversation
This was referenced Feb 25, 2026
Open
Member
|
Do we need to fix Extern/HDF5/AMReX_ParticleHDF5.H as well? |
atmyers
added a commit
that referenced
this pull request
Mar 3, 2026
This fixes Issue #5056. Note, the test included here also would have caught the NReaders bug fixed in #5074. The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [ ] changes answers in the test suite to more than roundoff level - [ ] are likely to significantly affect the results of downstream AMReX users - [ ] include documentation in the code and/or rst files, if appropriate
WeiqunZhang
requested changes
Mar 3, 2026
Src/Extern/HDF5/AMReX_ParticleHDF5.H
Outdated
| const int rank = ParallelDescriptor::MyProc(); | ||
| const int NReaders = MaxReaders(); | ||
| if (rank >= NReaders) { return; } | ||
| if (rank >= NReaders) { continue; } |
Member
There was a problem hiding this comment.
There are memory leaks here. Before continue, we need to call H5*close just like how it's done at the end of the loop.
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.
The proposed changes: