Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openPMD plugin: Add option for Append mode in writing #5224

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

franzpoeschel
Copy link
Contributor

https://openpmd-api.readthedocs.io/en/0.16.0/usage/workflow.html#access-modes
The Append mode is more secure as it protects better against accidentally overwriting data, e.g. when restarting from a checkpoint. I'm hesitant to fully replace the Create mode with Append mode, since (1) overwriting could be intended and (2) there were bugs in the past that made it impossible to create new files in Append mode with ADIOS2 on some platforms (I think mostly a Windows issue).

TODO:

  • What should we set as the default?

@psychocoderHPC
Copy link
Member

IMO for PIConGPU the default should be that we create a new file. If you like to append we should perform this explicit.

@franzpoeschel
Copy link
Contributor Author

Just to make this clear: The only difference between both modes is when a file already exists. The current setting will truncate the file, the Append setting will add new Iterations, while leaving the old data intact.
If no file exists yet, both modes will create a new file.

I have no strong preference for either option, so if you prefer sticking with the current setting, then I'll leave this as it is now.

@psychocoderHPC psychocoderHPC added this to the 0.8.0 / Next stable milestone Nov 21, 2024
@psychocoderHPC psychocoderHPC added the component: plugin in PIConGPU plugin label Nov 21, 2024
@psychocoderHPC
Copy link
Member

IMO keeping the current behavior is better. If someone is restarting a simulation after a checkpoint lets say at step 1000 but the simulation before was running until 1500 and than crashed at 1700 before writing a new checkpoint at 2000.
If the output contains particles and we append data to the existing data at step 1500 we will have twice as many particles in the output. Thi will mean the output is broken because the data makes no sense.
IMO append should be controlled explicitly and only used where it is guaranteed to be save.

@PrometheusPi
Copy link
Member

@franzpoeschel and @psychocoderHPC what is the conclusion of your discussion and what is the status of this PR (is it reviewable)?

@psychocoderHPC psychocoderHPC marked this pull request as draft November 25, 2024 15:13
@psychocoderHPC
Copy link
Member

Let me move this into draft that it will not be merged. The feature to set the mode is very important for workflows we need to initialize bunches but append should not be the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: plugin in PIConGPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants