Skip to content

Conversation

franzpoeschel
Copy link
Contributor

When using writeIterations(), the currently active Iteration should be flushed regardless if it is dirty (unless it has been closed).

#1655, @guj

@franzpoeschel franzpoeschel force-pushed the workaround-bug-1655-writeIterations branch from 118ca5d to ca6237b Compare March 4, 2025 13:49
@guj
Copy link
Contributor

guj commented Mar 4, 2025

originally writeIterations()[timestep] was created to serve for adios streaming steps. The file based write iterations were still using series->iterations[timestep]. As we discussed yesterday, sounds like the distinction is not there anymore. I just want to double check. An iteration will either be from writeIterations() or readIterations()?

@guj
Copy link
Contributor

guj commented Mar 4, 2025

By the way, thanks for putting the test in.

@ax3l ax3l added this to the 0.16.2 milestone Mar 5, 2025
@ax3l ax3l requested review from ax3l and guj March 5, 2025 01:08
Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@ax3l ax3l merged commit 516dc44 into openPMD:dev Mar 5, 2025
31 checks passed
@franzpoeschel
Copy link
Contributor Author

originally writeIterations()[timestep] was created to serve for adios streaming steps. The file based write iterations were still using series->iterations[timestep]. As we discussed yesterday, sounds like the distinction is not there anymore. I just want to double check. An iteration will either be from writeIterations() or readIterations()?

writeIterations() was always usable both for streaming and file writing, see the documentation:

The writing end of the streaming API enforces further restrictions that become necessary through the nature of streaming. It can be used to write any kind of openPMD-compatible dataset, stream-based and filesystem-based alike.

writeIterations() is necessary to create ADIOS2 output that uses steps; but it never mattered if that output were files or a stream. (Other backends can be used, too, where steps will then just be ignored)

Copy link
Contributor

@guj guj left a comment

Choose a reason for hiding this comment

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

Out of curiosity, if I use iterations() instead of writeIterations,
will this fix still work?

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