-
Notifications
You must be signed in to change notification settings - Fork 29
IterationEncoding: variableBased #250
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
base: upcoming-2.0.0
Are you sure you want to change the base?
Changes from 3 commits
367efba
c81864a
cee7330
2a6938c
34f9cc7
a285b69
1f5aa32
d7f3d59
3f202a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -32,3 +32,28 @@ Output from `bpls -A` for a boolean attribute `pybool` stored in the location of | |||||||
|
||||||||
There is no convention yet for a unique representation of ADIOS2 variables with boolean type. | ||||||||
Thus, implementations should cast the data to and from `unsigned char` instead. | ||||||||
|
||||||||
## `stepBased` Encoding of Iterations | ||||||||
|
||||||||
The `iterationEncoding` mode `stepBased` must be implemented via ADIOS steps. | ||||||||
|
The `iterationEncoding` mode `stepBased` must be implemented via ADIOS steps. | |
The `iterationEncoding` mode `variableBased` must be implemented via a backend's feature to describe *variable* datasets and attributes. | |
This means that such datasets and attributes are present in different versions with different contents. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I missed here that this file was ADIOS-specific.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This describes the ADIOS2 schema that we will abolish
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, we will stick with a schema that is similar to the current schema (datasets and attributes are distinguished by using different backend features (variables and attributes)), but with two additions:
- Attributes can be variable now too
- We will use some protocol for identifying if a group is active in the current step
Since that updated schema is not yet implemented, I'd suggest we don't describe this just yet. I would not like to standardize something that in the end turns out to not work well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've started exploring that new schema here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "further below" mean in this context?
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@franzpoeschel raised this is currently implemented that way and I think since we don't need to change the type of attributes over time, we can keep it so:
openPMD **attributes** stored as ADIOS `Variables` at the location where they would usually be stored. | |
openPMD **attributes** stored as ADIOS `Variables` at the location where they would usually be stored. | |
The `__is_boolean__/...` qualifiers are still stored as ADIOS `Attribute`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openPMD attributes stored as ADIOS
Variables
Is this outdated? We will remove the new ADIOS2 schema where this happens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outdated. Since the old ADIOS2 schema does not yet support variable-based iteration encoding, we currently only have this kind of experimental implementation.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -48,7 +48,9 @@ for changes in keywords). | |||||
Hierarchy of the Data File | ||||||
-------------------------- | ||||||
|
||||||
The used hierarchical data file format must provide the capability to | ||||||
For simplicity, we call the storage concept of a specific data format that implements the openPMD hierarchy "files", even if they are implemented in-memory or by other means. | ||||||
|
||||||
The used hierarchical data format must provide the capability to | ||||||
|
||||||
- create groups and sub-groups (in-file directories) | ||||||
- create multi-dimensional, homogeneous array-based data structures | ||||||
|
@@ -85,7 +87,10 @@ Each file's *root* group (path `/`) must at least contain the attributes: | |||||
to create a real path from it replace all occurrences | ||||||
of `%T` with the integer value of the iteration, e.g., | ||||||
`/data/%T` becomes `/data/100` | ||||||
- allowed value: fixed to `/data/%T/` for this version of the standard | ||||||
- allowed values: | ||||||
- see *Iterations and Time Series* below | ||||||
- for `fileBased` and `groupBased`, this is fixed to `/data/%T/` | ||||||
- for `stepBased` this is fixed to `/data/` | ||||||
|
- for `stepBased` this is fixed to `/data/` | |
- for `variableBased` this is fixed to `/data/` |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `stepBased` (one file with internal encoding for iterations, if supported by the data format) | |
- `variableBased` (one file with internal encoding for iterations, if supported by the data format) |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- for `stepBased`: (fixed value) | |
- for `variableBased`: (fixed value) |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### `stepBased` Encoding of Iterations | |
### `variableBased` Encoding of Iterations |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to correlate openPMD iterations with an index of data-format internal updates/steps or an index in the slowest varying dimension of an array, the *root* group (path `/`) must contain an additional variable once `stepBased` is chosen for `iterationEncoding`: | |
In order to correlate openPMD iterations with an index of data-format internal updates/steps or an index in the slowest varying dimension of an array, the *root* group (path `/`) must contain an additional variable once `variableBased` is chosen for `iterationEncoding`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: we could allow to skip this if only one iteration (snapshot) is written.
In that case, the implied value should be 0
and there must be exactly one update/step in the data format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what the other backends actually do when that iteration encoding is chosen, see the variableBasedSingleIteration
test. The snapshot
attribute is not written.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the current state of openPMD/openPMD-api#949, the snapshot
attribute is always written, but not required at read-time (then assumed to be 0). I should add a test somehow to ensure that reading without snapshot
works as intended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now tested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently not implemented as an array, but as a scalar variable that changes across steps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation actually accepts arrays at read-time, but I should test that it works. At write time, the API currently only produces scalars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now tested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: A similar situation can occur when using Append mode: An iteration is then present multiple times with redundant definitions. This will either be solved by truncation or by reading only the first/last instance of that iteration.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to holding information about the iteration, each series of files (`fileBased`), series of groups (`groupBased`) or internally encoded iterations (`stepBased`) should have attributes that describe the current time and the last time step. | |
In addition to holding information about the iteration, each series of files (`fileBased`), series of groups (`groupBased`) or internally encoded iterations (`variableBased`) should have attributes that describe the current time and the last time step. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename: I am not sure why, but for some reason we now call this
variableBased
in openPMD/openPMD-api#855@franzpoeschel let's clarify what we pick, shall I update the standard PR to be named
variableBased
, too?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, we discussed this a while ago and came to the conclusion to call it variable-based since steps are an ADIOS2-specific feature, but this encoding generally relies on a backend's ability to have variable datasets.