Conversation
If nbodies is smaller than 8, chunk size can be assigned a zero value. This will result in an HDF5 library error and termination.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an HDF5 chunk-sizing edge case in Component writes where small nbodies could lead to an invalid chunk dimension (0), causing HDF5 write failures and terminating runs.
Changes:
- Updates chunk “sanity” logic in
Component::write_HDF5(...)to avoidnbodies/8whennbodies < 8. - Applies the same update in
Component::write_H5(...)(H5Cpp path) for consistency.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…set extent Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com> Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/50498858-ea92-42e1-8f2b-1e11e7a0f23c
[WIP] [WIP] Address feedback on chunk logic error in Component
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com> Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/010b5b10-88a6-4331-b7ed-e0d62fae5309
Fix HDF5 dataset creation failure when nbodies == 0
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 issue
If
nbodiesis smaller than 8, chunk size can be assigned a zero value inComponent. This will result in an HDF5 library error andexprun termination.This is BUG.
The details
For compression efficiency, the chunk size is set to
nbodies/8if it is greater than thannbodies. This will lead to the chunk size being set to zero ifnbodies < 8. Probably rare under most circumstances.The fix
Only downsize the chuck size if
nbodies >= 8. Tested.