Data members for Series. More...
#include <Series.hpp>
Classes | |
| struct | NoSourceSpecified |
| struct | RankTableData |
| struct | SourceSpecifiedManually |
| struct | SourceSpecifiedViaJSON |
Public Types | |
| using | IterationIndex_t = Iteration::IterationIndex_t |
| using | IterationsContainer_t = Container<Iteration, IterationIndex_t> |
Public Member Functions | |
| SeriesData (SeriesData const &)=delete | |
| SeriesData (SeriesData &&)=delete | |
| SeriesData & | operator= (SeriesData const &)=delete |
| SeriesData & | operator= (SeriesData &&)=delete |
| void | close () |
Public Member Functions inherited from openPMD::internal::AttributableData | |
| AttributableData (SharedAttributableData *) | |
| AttributableData (AttributableData const &)=delete | |
| AttributableData (AttributableData &&)=delete | |
| AttributableData & | operator= (AttributableData const &)=delete |
| AttributableData & | operator= (AttributableData &&)=delete |
| void | cloneFrom (AttributableData const &other) |
| template<typename T> | |
| T | asInternalCopyOf () |
| auto | attributes () -> A_MAP & |
| auto | attributes () const -> A_MAP const & |
| auto | readAttribute (std::string const &name) const -> Attribute const & |
Public Attributes | |
| IterationsContainer_t | iterations {} |
| std::unique_ptr< StatefulIterator > | m_sharedStatefulIterator |
| Series::readIterations() returns an iterator type that modifies the state of the Series (by proceeding through IO steps). | |
| std::set< IterationIndex_t > | m_currentlyActiveIterations |
| For writing: Remember which iterations have been written in the currently active output step. | |
| std::unordered_map< IterationIndex_t, size_t > | m_snapshotToStep |
| For reading: In which IO step do I need to look for an Iteration? | |
| std::unordered_map< IterationIndex_t, std::string > | m_iterationFilenames |
| This map contains the filenames of those Iterations which were found on the file system upon opening the Series for reading in file-based encoding. | |
| std::optional< std::string > | m_overrideFilebasedFilename |
| Needed if reading a single iteration of a file-based series. | |
| std::string | m_name |
| Name of the iteration without filename suffix. | |
| std::string | m_filenamePrefix |
| Filename leading up to the expansion pattern. | |
| std::string | m_filenamePostfix |
| Filename after the expansion pattern without filename extension. | |
| std::string | m_filenameExtension |
| Filename extension as specified by the user. | |
| int | m_filenamePadding = -1 |
| The padding in file-based iteration encoding. | |
| IterationEncoding | m_iterationEncoding {} |
| The iteration encoding used in this series. | |
| default_or_explicit | m_iterationEncodingSetExplicitly |
| Format | m_format |
| Detected IO format (backend). | |
| StepStatus | m_stepStatus = StepStatus::NoStep |
| Whether a step is currently active for this iteration. | |
| bool | m_parseLazily = false |
| True if a user opts into lazy parsing. | |
| uint64_t | m_hintLazyParsingAfterTimeout = 20 |
| bool | m_wroteAtLeastOneIOStep = false |
| In variable-based encoding, all backends except ADIOS2 can only write one single iteration. | |
| std::optional< ParsePreference > | m_parsePreference |
| Remember the preference that the backend specified for parsing. | |
| std::optional< std::function< AbstractIOHandler *(Series &)> > | m_deferred_initialization = std::nullopt |
| std::optional< MPI_Comm > | m_communicator |
| RankTableData | m_rankTable |
Data members for Series.
Pinned at one memory location.
(Not movable or copyable)
Class is final since our std::shared_ptr<Data_t> pattern has the little disadvantage that child constructors overwrite the parent constructors. Since the SeriesData constructor does some initialization, making this class final avoids stumbling over this pitfall.
| std::set<IterationIndex_t> openPMD::internal::SeriesData::m_currentlyActiveIterations |
For writing: Remember which iterations have been written in the currently active output step.
Use this later when writing the snapshot attribute.
| std::string openPMD::internal::SeriesData::m_filenameExtension |
Filename extension as specified by the user.
(Not necessarily the backend's default suffix)
| int openPMD::internal::SeriesData::m_filenamePadding = -1 |
The padding in file-based iteration encoding.
0 if no padding is given (T pattern). -1 if no expansion pattern has been parsed.
| std::string openPMD::internal::SeriesData::m_filenamePrefix |
Filename leading up to the expansion pattern.
Only used for file-based iteration encoding.
| default_or_explicit openPMD::internal::SeriesData::m_iterationEncodingSetExplicitly |
| std::unordered_map<IterationIndex_t, std::string> openPMD::internal::SeriesData::m_iterationFilenames |
This map contains the filenames of those Iterations which were found on the file system upon opening the Series for reading in file-based encoding.
It is only written to by readFileBased(). Other files that we create anew have names generated live by iterationFilename(), but files that existed previously might have different padding. This information is required for re-opening Iterations after closing. Since ADIOS2 has no read-write mode, this is important in our own READ_WRITE mode when re-opening a closed file in file-based encoding: A file that existed previously is re-opened in Read mode and will not support updating its contents. (Note that this is NOT a restriction of re-opening, this is fundamentally a restriction of R/W in ADIOS2. Files can be written XOR read.) A file that we created anew is re-opened in Append mode to continue writing data to it. Using adios2.engine.parameters.FlattenSteps = "ON" is recommended in this case.
| std::string openPMD::internal::SeriesData::m_name |
Name of the iteration without filename suffix.
In case of file-based iteration encoding, with expansion pattern. E.g.: simData.bp -> simData simData_%06T.h5 -> simData_%06T
| std::optional<std::string> openPMD::internal::SeriesData::m_overrideFilebasedFilename |
Needed if reading a single iteration of a file-based series.
Users may specify the concrete filename of one iteration instead of the file-based expansion pattern. In that case, the filename must not be constructed from prefix, infix and suffix as usual in file-based iteration encoding. Instead, the user-specified filename should be used directly. Store that filename in the following Option to indicate this situation.
| std::optional<ParsePreference> openPMD::internal::SeriesData::m_parsePreference |
Remember the preference that the backend specified for parsing.
Not used in file-based iteration encoding, empty then. In linear read mode, parsing only starts after calling Series::readIterations(), empty before that point.
| std::unique_ptr<StatefulIterator> openPMD::internal::SeriesData::m_sharedStatefulIterator |
Series::readIterations() returns an iterator type that modifies the state of the Series (by proceeding through IO steps).
Hence, we need to make sure that there is only one of them, otherwise they will both make modifications to the Series that the other iterator is not aware of.
Plan: At some point, we should add a second iterator type that does not change the state. Series::readIterations() should then return either this or that iterator depending on read mode (linear or random-access) and backend capabilities.
Due to include order, this member needs to be a pointer instead of an optional.
| StepStatus openPMD::internal::SeriesData::m_stepStatus = StepStatus::NoStep |
Whether a step is currently active for this iteration.
Used for group-based iteration layout, see SeriesData.hpp for iteration-based layout. Access via stepStatus() method to automatically select the correct one among both flags.
| bool openPMD::internal::SeriesData::m_wroteAtLeastOneIOStep = false |
In variable-based encoding, all backends except ADIOS2 can only write one single iteration.
So, we remember if we already had a step, and if yes, Parameter<Operation::ADVANCE>::isThisStepMandatory is set as true in variable-based encoding. The backend will then throw if it has no support for steps.