-
Notifications
You must be signed in to change notification settings - Fork 127
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
BP5: RemoveAttribute() leaves traces of the removed attributes, redefinition with changed type impossible #3413
Comments
This probably requires higher-level conceptual discussion. ADIOS doesn't allow type changes in variables from step to step and the API essentially relies upon this property (particularly for the random access mode where you can inquire a type-specific variable and then select what step you want to read). It doesn't (yet) have a similar interface for attributes, simply because attributes were previously unchangeable. So, how attributes behave in random access mode vs. streaming mode is ill-defined. It's also the case that most of BP5's performance improvements over BP4 are due to exploiting things that don't change from timestep to timestep. The more dynamism we allow, the more potential to compromise those performance gains. IMHO, I'd probably come down on the side of not supporting type dynamism in attributes (and throwing an appropriate error), but I'm interested in hearing other opinions. |
And, as I've written in the "Additional context" part, the cleanest solution would be to avoid overwriting attributes, which is on us to fix. |
Yikes! I didn't realize RemoveAttribute() was even in the external API. "Supported" might be a strong word in this context. I put it more in the "I can think of situations where this might work as one might expect and not blow things up". Adding an attribute and removing it again before anything happens that might make ADIOS look at it is one of those. It looks like that's what is tested, as well as define-remove-define, but this seems like a case where the particular API's potential for abuse outweighs its actual utility. |
So, you are saying that this is no bug? |
It's more that the semantics behind attributes are a lot fuzzier than I (at least) would like... This particularly applies to changing attributes because there are likely things that depend upon them not changing (or at least behaves in a way that might be unexpected or ill-defined if they do. So, yeah, IMHO this falls into a corner case and it might be best to avoid it if you can. |
Alright, then we'll rather figure out a solution on our side. |
Describe the bug
Our workflow is to define default attributes that are automatically set, but can also be specified manually by users. This might lead to a situation where an attribute has already been defined, but must later in the same step be changed again to adhere to user input.
We then remove the old attribute, and define another attribute with the same name within the same IO step.
With BP5, this is fundamentally possible, but leads to errors when the attribute is redefined with another type.
To Reproduce
This creates a file
data.bp
which cannot be opened:data.bp.zip
Expected behavior
Expected behavior can be seen when setting
IO.SetEngine("bp4")
in the above code:Desktop (please complete the following information):
Additional context
Following up
Was the issue fixed? Please report back.
The text was updated successfully, but these errors were encountered: