-
Notifications
You must be signed in to change notification settings - Fork 131
Unclear handling of attributes in BP4/BP5 #4471
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
Comments
Some things about this example surprise me and some do not. There is a fundamental difference between BP4 and BP5 surrounding the more explicit separation between "streaming" and "random access" read modes. In BP4 these were somewhat blurred. BP4 loads all file metadata immediately upon Open() regardless of access mode. However in the default Adios.Mode.Read, BP5 loads each timesteps metadata only upon BeginStep. Therefore there are no attributes available before BeginStep, and the attributes are added cumulatively as you read additional steps. So, the BP5 output above looks reasonable for those semantics. (You should get different semantics if you specify Mode.ReadRandomAccess.) I'm a little fuzzier why you're not seeing "b" in the BP4 output. @pnorbert ? |
This makes a big difference for my applications, as I've assumed that
Having to define these for each write step is not something I can do for my applications, as write steps are not assoicated with time steps, and the data evolves over time (One first might write a mesh, then some function data, then some markers, then function data for a different time step). Suddenly the divide between |
Mode.Read is setup to match semantics that ADIOS can provide in a streaming situation. That is, one in which the writer and reader are running simultaneously and data flows directly from one to another over the network. In this circumstance time-independence is impossible. Possibly you want Mode.ReadRandomAccess? You can't use BeginStep/EndStep with that in BP5, but if you structure your code so that instead you use SetStepSelection for the variables that you read then your code will work with both BP4 and BP5 and all attributes will be available immediately upon Open(). The downside of that approach is higher Open() cost and memory utilization because all file metadata is read immediately. (Higher as compared to BP5 Mode.Read. BP4 always has those higher costs and memory utilization). (The BP4 engine and prior versions of ADIOS in general didn't have a strict differentiation between Read and ReadRandomAccess and provided inconsistent semantics in streaming vs. non-streaming situations. BP5 tries to enforce a stronger line between access methods with clearer semantics.) The most obvious difference between Attribute and Variable is that Attributes are persistent on the reader side, where variables are not. That is, once set and Attribute is always available to query regardless of timestep. They used to be immutable as well, but ADIOS has now introduced mutable attributes to accommodate user requests. |
As a note on the BP4 test, I don't understand why but it does not work as expected. Even though this high-level python API example (which uses the bindings as the example above) works as expected.
|
The following minimal example using the ADIOS2 Python interface (2.10.2), shows a difference in how variables are handled in the
BP4
andBP5
formats.This yields:
Which makes the handling of both formats within Python very hard to maintain.
Is this a change that was made on purpose or a bug?
The text was updated successfully, but these errors were encountered: