Skip to content

Conversation

franzpoeschel
Copy link
Contributor

@franzpoeschel franzpoeschel commented Aug 8, 2025

In Series::snapshots(), the stateful container initialization is deferred, since IO accesses should occur only upon user request and not earlier. However, it currently had no constructor without deferring, leading to troubles when accessing the container as const, because initialization can only done as non-const.
This adds a non-deferred constructor, using deferred initialization only in such cases where IO accesses are actual deferred.

TODO:

  • Change some CI run to create a Debug build, this bug was uncovered by Pybind11 GIL checks activated in Debug builds

@franzpoeschel franzpoeschel force-pushed the fix-deferred-container-initialization branch from 35ee920 to e82be0d Compare August 8, 2025 12:24
@franzpoeschel franzpoeschel enabled auto-merge (squash) August 8, 2025 13:22
@franzpoeschel franzpoeschel merged commit 82eac56 into openPMD:dev Aug 8, 2025
30 checks passed
franzpoeschel added a commit to franzpoeschel/openPMD-api that referenced this pull request Sep 16, 2025
Accidentally merged this along with openPMD#1777
franzpoeschel added a commit that referenced this pull request Sep 16, 2025
Accidentally merged this along with #1777
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant