openPMD / openPMD-api

:floppy_disk: C++ & Python API for Scientific I/O
https://openpmd-api.readthedocs.io
GNU Lesser General Public License v3.0
134 stars 51 forks source link

Workaround for independent writes to Iterations in parallel, better detection of BP5 which in turn uncovers more instances of the first issue #1619

Closed franzpoeschel closed 2 weeks ago

franzpoeschel commented 1 month ago

This somewhat fixes #1616 until we add a better solution. With this PR: seriesFlush() will always flush the containing Iteration if called from within an Iteration (and will ignore missing dirty annotations).

At the same time, I added a better detection for BP5-specific features. Since this means that adios2::Engine::PerformDataWrite() is used automatically more often, this uncovers further parallel flushing bugs. So, these two items are treated together in this PR.

In a follow-up PR later on, as a more breaking change, we would also flush all open iterations in MPI-parallel contexts on series.flush(), but for this we will first need functionality to reopen iterations after close #1592.

TODO: