core/io: fix H5MD time/step datasets off-by-one vs value datasets#5342
Draft
RudolfWeeber wants to merge 3 commits into
Draft
core/io: fix H5MD time/step datasets off-by-one vs value datasets#5342RudolfWeeber wants to merge 3 commits into
RudolfWeeber wants to merge 3 commits into
Conversation
…tial extent Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
@hidekb what's your take on this? |
Contributor
|
This suggestion is essentially correct. However, this modification causes an error in the test hdmd.py. I try to fix it. |
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.
create_dims()for rank-1 datasets (step/time) returned an initial shapeof
{data_dim}(non-zero), while rank-2/3 value datasets started at{0,...}.As a result
id/stepandid/timewere seeded with one fill element at index 0,and every subsequent write landed at offset
extents[0]of the value dataset,misaligning the time axis by one frame for the entire trajectory.
Fix: return
{0ul}for rank-1 increate_dims(), matching the valuedatasets (
src/core/io/writer/h5md_core.cpp).Regression test:
test_time_step_alignmentadded toH5mdTestsintestsuite/python/h5md.py.Fixes bug #1 of the adversarial core bug sweep.