Skip to content

Conversation

franzpoeschel
Copy link
Contributor

@franzpoeschel franzpoeschel commented Mar 5, 2025

Check:

In a test simulation with PIConGPU, this canceled the simulation after step 999, creating output that was still readable, but had already accumulated ~1GB of metadata.

TODO:

  • Add an environment variable to allow the user to set this

OPENPMD_BP5_GROUPENCODING_MAX_STEPS=1000
@franzpoeschel franzpoeschel requested a review from ax3l March 6, 2025 12:13
@ax3l ax3l self-assigned this Mar 11, 2025
@ax3l ax3l requested a review from guj March 11, 2025 17:40
``OPENPMD_ADIOS2_BP5_NumSubFiles`` ``0`` ADIOS2 BP5 engine: num of subfiles
``OPENPMD_ADIOS2_BP5_NumAgg`` ``0`` ADIOS2 BP5 engine: num of aggregators
``OPENPMD_ADIOS2_BP5_TypeAgg`` *empty* ADIOS2 BP5 engine: aggregation type. (EveryoneWrites, EveryoneWritesSerial, TwoLevelShm)
``OPENPMD_BP5_GROUPENCODING_MAX_STEPS`` ``1000`` ADIOS2 BP5 engine: max number of allowed output steps in group encoding.
Copy link
Member

Choose a reason for hiding this comment

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

Let's lower to 100 or 200 by default, to cover more meta-data heavy cases safer by default.

@guj
Copy link
Contributor

guj commented Mar 11, 2025

Is it possible to automatically switch to file based after this OPENPMD_BP5_GROUPENCODING_MAX_STEP ?

I will find it annoying to have to restart the simulation due to this limit.

@franzpoeschel
Copy link
Contributor Author

I will find it annoying to have to restart the simulation due to this limit.

If you have simulations that run into this limit, that means that you are probably already creating amounts of metadata with a size orders of magnitude more than in a "good" configuration for BP5.
We printed warnings for this until now, but the behavior is serious enough to switch to a clear error.

Switching to file encoding during a running simulation might be possible, but more effort than it is worth. The proper solution will be to use variable encoding for this kind of setup automatically and I prefer putting my time into making that work properly.

@franzpoeschel franzpoeschel force-pushed the fix-limit-bp5-steps-to-1000 branch from 0dea887 to 9b821d4 Compare March 12, 2025 09:50
@guj
Copy link
Contributor

guj commented Mar 12, 2025

I will find it annoying to have to restart the simulation due to this limit.

If you have simulations that run into this limit, that means that you are probably already creating amounts of metadata with a size orders of magnitude more than in a "good" configuration for BP5. We printed warnings for this until now, but the behavior is serious enough to switch to a clear error.

Switching to file encoding during a running simulation might be possible, but more effort than it is worth. The proper solution will be to use variable encoding for this kind of setup automatically and I prefer putting my time into making that work properly.

OK. Thanks

@franzpoeschel franzpoeschel changed the title BP5+groupbased: allow only up to 1000 steps BP5+groupbased: allow only up to 100 steps Mar 13, 2025
@franzpoeschel franzpoeschel merged commit 8b52502 into openPMD:dev Mar 13, 2025
31 checks passed
franzpoeschel added a commit to franzpoeschel/openPMD-api that referenced this pull request Jun 3, 2025
* BP5+groupbased: allow only up to 1000 steps

* Configure this via env variable

OPENPMD_BP5_GROUPENCODING_MAX_STEPS=1000

* Add documentation

* Lower limit to 100
franzpoeschel added a commit to franzpoeschel/openPMD-api that referenced this pull request Jun 3, 2025
* BP5+groupbased: allow only up to 1000 steps

* Configure this via env variable

OPENPMD_BP5_GROUPENCODING_MAX_STEPS=1000

* Add documentation

* Lower limit to 100
franzpoeschel added a commit that referenced this pull request Jun 4, 2025
* Fix: Late unique_ptr puts without CLOSE_FILE or ADVANCE operations (#1744)

* Add failing test

* Add failing test

* Revert "Add failing test"

This reverts commit 5e04ece.

* Reactivate writing from unique_ptr in finalize()

* BP5+groupbased: allow only up to 100 steps (#1732)

* BP5+groupbased: allow only up to 1000 steps

* Configure this via env variable

OPENPMD_BP5_GROUPENCODING_MAX_STEPS=1000

* Add documentation

* Lower limit to 100

* Add compile-time check for #1720 (#1722)

* WarpX: Repo Moved (#1733)

Update a link to WarpX.

* Fix zero-sized storeChunk for Span API in Python (#1738)

* working around an unusual encounter when the joined_dim has actual value "max::size_t - 1" (#1740)

* working around an unusal encounter when the joined_dim has actual
value "max::size_t - 1"

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add test for redundant resetDataset()

* Merge check into above logic

* Better error messages in verifyDataset

* Add further safety guards to createDataset and extendDataset tasks

* Move joinedDim logic into middle-end for extendDataset

* Update include/openPMD/IO/ADIOS/ADIOS2IOHandler.hpp

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Franz Pöschel <[email protected]>

* ADIOS2 bugfix: Always use CurrentStep() in mode::Read (#1749)

* Always use CurrentStep() in mode::Read

* Remove manual step counting

m_currentStep only necessary for SetStepSelection, it seems

* Clean up logic that is no longer needed

* Add test

---------

Co-authored-by: Axel Huebl <[email protected]>
Co-authored-by: Junmin Gu <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

3 participants