Perform buffered history I/O for a single type(really just output) on using HDF5.
More...
#include <TimeHistHDF.hpp>
|
| HDFHistIO (string const &filename, localIndex rank, std::vector< localIndex > const &dims, string const &name, std::type_index typeId, localIndex writeHead=0, localIndex initAlloc=1, localIndex overallocMultiple=2, MPI_Comm comm=MPI_COMM_GEOSX) |
| Constructor. More...
|
|
| HDFHistIO (string const &filename, const HistoryMetadata &spec, localIndex writeHead=0, localIndex initAlloc=1, localIndex overallocMultiple=2, MPI_Comm comm=MPI_COMM_GEOSX) |
| Constructor. More...
|
|
virtual | ~HDFHistIO () |
| Destructor.
|
|
virtual void | init (bool existsOkay) override |
| Perform and intialization needed for time-history output. More...
|
|
virtual void | write () override |
| Write the buffered history data to the output target. More...
|
|
virtual void | compressInFile () override |
| Ensure the repressentation of the data in the output target is dense and terse. More...
|
|
virtual void | updateCollectingCount (localIndex count) override |
| Update the number of items being stored for IO in this object. More...
|
|
virtual size_t | getRowBytes () override |
| Get the size in bytes the buffer is currently set to hold per collection operation. More...
|
|
| BufferedHistoryIO () |
| Constructor.
|
|
virtual | ~BufferedHistoryIO () |
| Destructor.
|
|
buffer_unit_type * | getBufferHead () |
| Get the head of the internal history storage buffer. More...
|
|
localIndex | getBufferedCount () |
| Query the number of history states currently stored in the internal buffer. More...
|
|
Perform buffered history I/O for a single type(really just output) on using HDF5.
Definition at line 107 of file TimeHistHDF.hpp.
◆ HDFHistIO() [1/2]
Constructor.
- Parameters
-
filename | The filename to perform history output to. |
rank | The rank of the history data being collected. |
dims | The dimensional extent for each dimension of the history data being collected. |
name | The name to use to create/modify the dataset for the history data. |
typeId | The std::type_index(typeid(T)) of the underlying data type. |
writeHead | How many time history states have been written to the file (used on restart and to compress data on exit). |
initAlloc | How many states to preallocate the internal buffer to hold. |
overallocMultiple | Integer to scale the internal buffer when we fill the existing space. |
comm | A communicator where every rank will participate in writting to the output file. |
◆ HDFHistIO() [2/2]
Constructor.
- Parameters
-
filename | The filename to perform history output to. |
spec | HistoryMetadata to use to call the other constructor. |
writeHead | How many time states have been written to the file (used on restart and to compress data on exit). |
initAlloc | How many states to preallocate the internal buffer to hold. |
overallocMultiple | Integer to scale the internal buffer when we fill the existing space. |
comm | A communicator where every rank will participate in writing to the output file. |
Definition at line 141 of file TimeHistHDF.hpp.
◆ compressInFile()
virtual void geosx::HDFHistIO::compressInFile |
( |
| ) |
|
|
overridevirtual |
Ensure the repressentation of the data in the output target is dense and terse.
- Note
- Typically the file will be oversized to receive data writes without constant resizing.
Implements geosx::BufferedHistoryIO.
◆ getRowBytes()
virtual size_t geosx::HDFHistIO::getRowBytes |
( |
| ) |
|
|
overridevirtual |
Get the size in bytes the buffer is currently set to hold per collection operation.
- Returns
- The size in bytes.
Implements geosx::BufferedHistoryIO.
◆ init()
virtual void geosx::HDFHistIO::init |
( |
bool |
existsOkay | ) |
|
|
overridevirtual |
Perform and intialization needed for time-history output.
- Parameters
-
existsOkay | Whether it is acceptable for the intended output target to already exist ( false on start from scratch, true on restart ). |
Implements geosx::BufferedHistoryIO.
◆ resizeFileIfNeeded()
void geosx::HDFHistIO::resizeFileIfNeeded |
( |
localIndex |
bufferedCount | ) |
|
|
protected |
Resize the dataspace in the target file if needed to perform the current write of buffered states.
- Parameters
-
bufferedCount | The number of buffered states to use to determine if the file needs to be resized. |
◆ setupPartition()
void geosx::HDFHistIO::setupPartition |
( |
globalIndex |
localIdxCount | ) |
|
|
protected |
Setup the parallel 'partitioning' of the data to allow dynamically sized output over time.
- Parameters
-
localIdxCount | The number of pieces of data associated with the local rank |
- Note
- This is collective over the communicator provided in the constructor
◆ updateCollectingCount()
virtual void geosx::HDFHistIO::updateCollectingCount |
( |
localIndex |
count | ) |
|
|
overridevirtual |
Update the number of items being stored for IO in this object.
- Parameters
-
count | [in] The new number of items being collected |
Implements geosx::BufferedHistoryIO.
◆ updateDatasetExtent()
void geosx::HDFHistIO::updateDatasetExtent |
( |
hsize_t |
rowLimit | ) |
|
|
protected |
Update the extent of the dataset in the target file.
- Parameters
-
rowLimit | The new discrete 'row' count (the first output dim) to extend the extent to. |
- Note
- The second dimension is set to the global index highwater ( the largest number of output pieces of data encountered during execution ).
◆ write()
virtual void geosx::HDFHistIO::write |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: