You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wish to access the last iteration in a series saved to disk with "iteration_encoding": "variable_based" option and writeIterations().
To access the first iteration, I figured out the following example:
SeriesIterator it_it = series.readIterations().begin();
IndexedIteration it = *it_it;
Is there a way to access the last iteration in a similar way?
Is there a way to have a reverse iterator (e.g. std::vector::rbegin) for the cases when a simulation creates checkpoints using "iteration_encoding": "variable_based" and needs to restore from the latest useful iteration?
Software Environment:
version of openPMD-api: 0.15.1
installed openPMD-api via: from source
The text was updated successfully, but these errors were encountered:
Hello @stefurnic
You have found one of the main reasons why variable-based encoding is still considered experimental. The current implementation is not yet complete and focuses on streaming workflows where reverse iteration naturally does not work.
Closing the gap between streaming and random-access is currently WIP, I'm currently working on this in #1592, which prepares the API changes and adds other features like re-opening closed iterations, that are currently missing.
Since random-accessing IO steps in ADIOS2 requires a different way of interacting with the dataset, what you are asking for will be yet another PR after #1592.
So, the answer is: This is planned, but not there yet. Variable-based iteration encoding can be used today, but the workflows are restricted. If you want the full flexibility, the recommendation until then is file-based encoding.
I wish to access the last iteration in a series saved to disk with "iteration_encoding": "variable_based" option and writeIterations().
To access the first iteration, I figured out the following example:
Software Environment:
The text was updated successfully, but these errors were encountered: