Skip to content

Commit b9158a6

Browse files
committed
Some more documentation
1 parent e15ab8c commit b9158a6

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

docs/source/usage/concepts.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ openPMD-api implements various file-formats (backends) and encoding strategies f
4848
**Iteration encoding:** The openPMD-api can encode iterations in different ways.
4949
The method ``Series::setIterationEncoding()`` (C++) or ``Series.set_iteration_encoding()`` (Python) may be used in writing for selecting one of the following encodings explicitly:
5050

51-
* **group-based iteration encoding:** This encoding is the default.
51+
* **group-based iteration encoding:** This encoding is the default for HDF5 and JSON. In ADIOS2, variable-based encoding is preferred when possible due to better performance characteristics, see below.
5252
It creates a separate group in the hierarchy of the openPMD standard for each iteration.
5353
As an example, all data pertaining to iteration 0 may be found in group ``/data/0``, for iteration 100 in ``/data/100``.
5454
* **file-based iteration encoding:** A unique file on the filesystem is created for each iteration.
@@ -57,6 +57,7 @@ The method ``Series::setIterationEncoding()`` (C++) or ``Series.set_iteration_en
5757
A padding may be specified by ``"series_%06T.json"`` to create files ``series_000000.json``, ``series_000100.json`` and ``series_000200.json``.
5858
The inner group layout of each file is identical to that of the group-based encoding.
5959
* **variable-based iteration encoding:** This experimental encoding uses a feature of some backends (i.e., ADIOS2) to maintain datasets and attributes in several versions (i.e., iterations are stored inside *variables*).
60+
When creating an ADIOS2 Series with steps (e.g. via ``series.writeIterations()`` / ``series.write_iterations()``), this encoding will be picked as a default instead of group-based encoding due to bad performance characteristics of group-based encoding in ADIOS2.
6061
No iteration-specific groups are created and the corresponding layer is dropped from the openPMD hierarchy.
6162
In backends that do not support this feature, a series created with this encoding can only contain one iteration.
6263

include/openPMD/IO/IOTask.hpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#include "openPMD/backend/ParsePreference.hpp"
3333

3434
#include <cstddef>
35-
#include <map>
3635
#include <memory>
36+
#include <optional>
3737
#include <string>
3838
#include <utility>
3939
#include <variant>
@@ -677,10 +677,18 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::ADVANCE>
677677
std::optional<size_t> step;
678678
};
679679

680-
//! input parameter
680+
// input parameters
681+
/**
682+
* AdvanceMode: Is one of BeginStep/EndStep. Used during writing and in
683+
* linear read mode to step sequentially through steps.
684+
* StepSelection: Used in random-access read mode, jump to the specified
685+
* step. Can be nullopt in order to reset the backend to read
686+
* step-agnostically, e.g. for reading global datasets such as
687+
* /rankTable.
688+
*/
681689
std::variant<AdvanceMode, StepSelection> mode;
682690
bool isThisStepMandatory = false;
683-
//! output parameter
691+
// output parameter
684692
std::shared_ptr<AdvanceStatus> status =
685693
std::make_shared<AdvanceStatus>(AdvanceStatus::OK);
686694
};

0 commit comments

Comments
 (0)