Mutable Attributes: Allow redefining attributes. BP4 stream reading will provide the late… #2827
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…st definition at a given step. BP4 file reading provides the last definition even if BeginStep/EndStep is attempted. BP3 does not support changing attributes, it always presents the first definition of the attribute (although, in the encoded data blocks newer attributes appear but the metadata does not change).
Caveat: Modifying an attribute on non-zero rank process will have no effect as the change is not registered on the metadata aggregator.
$ ctest -R Engine.BP.BPWriteReadAttributes.WriteReadStreamMutable.BP4.Serial
Test project /home/adios/ADIOS2/build.debug
Start 258: Engine.BP.BPWriteReadAttributes.WriteReadStreamMutable.BP4.Serial
1/1 Test #258: Engine.BP.BPWriteReadAttributes.WriteReadStreamMutable.BP4.Serial ... Passed 0.01 sec
Stream reading:
$ ./bin/bpls -lta testing/adios2/engine/bp/bp4/foo/AttributesWriteReadMutable.bp/
Step 0:
int32_t var1 scalar
double var1\dArray attr = {0.1, 0.2, 0.3}
uint32_t var1\i32Value attr = 0
int32_t var2 {8}
double var2\dArray attr = {0.1, 0.2, 0.3}
uint32_t var2\i32Value attr = 0
Step 1:
int32_t var1 scalar
double var1\dArray attr = {1.1, 1.2, 1.3} -- modified value of attribute
uint32_t var1\i32Value attr = 1 -- modified value of attribute
double var2\dArray attr = {0.1, 0.2, 0.3} -- attribute was not modified so last value appears
uint32_t var2\i32Value attr = 0 -- attribute was not modified so last value appears
Step 2:
int32_t var1 scalar
double var1\dArray attr = {2.1, 2.2, 2.3}
uint32_t var1\i32Value attr = 2
int32_t var2 {8}
double var2\dArray attr = {2.1, 2.2, 2.3}
uint32_t var2\i32Value attr = 2
File reading:
$ ./bin/bpls -lA testing/adios2/engine/bp/bp4/foo/AttributesWriteReadMutable.bp/
double var1\dArray attr = {2.1, 2.2, 2.3} -- last definition appears
uint32_t var1\i32Value attr = 2
double var2\dArray attr = {2.1, 2.2, 2.3}
uint32_t var2\i32Value attr = 2