Skip to content

Chunk logic error/bug in Component.#210

Open
The9Cat wants to merge 12 commits intodevelfrom
chunkLogic
Open

Chunk logic error/bug in Component.#210
The9Cat wants to merge 12 commits intodevelfrom
chunkLogic

Conversation

@The9Cat
Copy link
Member

@The9Cat The9Cat commented Mar 25, 2026

The issue

If nbodies is smaller than 8, chunk size can be assigned a zero value in Component. This will result in an HDF5 library error and exp run termination.

This is BUG.

The details

For compression efficiency, the chunk size is set to nbodies/8 if it is greater than than nbodies. This will lead to the chunk size being set to zero if nbodies < 8. Probably rare under most circumstances.

The fix

Only downsize the chuck size if nbodies >= 8. Tested.

If nbodies is smaller than 8, chunk size can be assigned a zero value.
This will result in an HDF5 library error and termination.
@The9Cat The9Cat requested a review from Copilot March 25, 2026 21:39
@The9Cat The9Cat added the bug Something isn't working label Mar 25, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 avoid nbodies/8 when nbodies < 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.

Copy link

Copilot AI commented Mar 25, 2026

@The9Cat I've opened a new pull request, #211, to work on those changes. Once the pull request is ready, I'll request review from you.

The9Cat and others added 4 commits March 25, 2026 17:46
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
[WIP] [WIP] Address feedback on chunk logic error in Component
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

The9Cat and others added 3 commits March 25, 2026 17:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

Copilot AI commented Mar 25, 2026

@The9Cat I've opened a new pull request, #212, to work on those changes. Once the pull request is ready, I'll request review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants