libSplash
|
#include <DomainCollector.hpp>
Public Member Functions | |
DomainCollector (uint32_t maxFileHandles) | |
virtual | ~DomainCollector () |
Domain | getGlobalDomain (int32_t id, const char *name) throw (DCException) |
Domain | getLocalDomain (int32_t id, const char *name) throw (DCException) |
DataContainer * | readDomain (int32_t id, const char *name, Domain domain, DomDataClass *dataClass, bool lazyLoad=false) throw (DCException) |
void | readDomainLazy (DomainData *domainData) throw (DCException) |
void | writeDomain (int32_t id, const CollectionType &type, uint32_t ndims, const Selection select, const char *name, const Domain localDomain, const Domain globalDomain, DomDataClass dataClass, const void *buf) throw (DCException) |
void | appendDomain (int32_t id, const CollectionType &type, size_t count, const char *name, const Domain localDomain, const Domain globalDomain, const void *buf) throw (DCException) |
void | appendDomain (int32_t id, const CollectionType &type, size_t count, size_t offset, size_t striding, const char *name, const Domain localDomain, const Domain globalDomain, const void *buf) throw (DCException) |
![]() | |
SerialDataCollector (uint32_t maxFileHandles) | |
virtual | ~SerialDataCollector () |
void | open (const char *filename, FileCreationAttr &attr) throw (DCException) |
void | close () |
int32_t | getMaxID () |
void | getMPISize (Dimensions &mpiSize) |
void | getEntryIDs (int32_t *ids, size_t *count) throw (DCException) |
void | getEntriesForID (int32_t id, DCEntry *entries, size_t *count) throw (DCException) |
void | write (int32_t id, const CollectionType &type, uint32_t ndims, const Selection select, const char *name, const void *data) throw (DCException) |
void | append (int32_t id, const CollectionType &type, size_t count, const char *name, const void *data) throw (DCException) |
void | append (int32_t id, const CollectionType &type, size_t count, size_t offset, size_t striding, const char *name, const void *data) throw (DCException) |
void | remove (int32_t id) throw (DCException) |
void | remove (int32_t id, const char *name) throw (DCException) |
void | createReference (int32_t srcID, const char *srcName, int32_t dstID, const char *dstName) throw (DCException) |
void | createReference (int32_t srcID, const char *srcName, int32_t dstID, const char *dstName, Dimensions count, Dimensions offset, Dimensions stride) throw (DCException) |
AttributeInfo | readGlobalAttributeInfo (int32_t id, const char *name, Dimensions *mpiPosition=NULL) throw (DCException) |
void | readGlobalAttribute (const char *name, void *data, Dimensions *mpiPosition=NULL) throw (DCException) |
void | writeGlobalAttribute (const CollectionType &type, const char *name, const void *data) throw (DCException) |
void | writeGlobalAttribute (const CollectionType &type, const char *name, uint32_t ndims, const Dimensions dims, const void *data) throw (DCException) |
AttributeInfo | readAttributeInfo (int32_t id, const char *dataName, const char *attrName, Dimensions *mpiPosition=NULL) throw (DCException) |
void | readAttribute (int32_t id, const char *dataName, const char *attrName, void *data, Dimensions *mpiPosition=NULL) throw (DCException) |
void | writeAttribute (int32_t id, const CollectionType &type, const char *dataName, const char *attrName, const void *data) throw (DCException) |
void | writeAttribute (int32_t id, const CollectionType &type, const char *dataName, const char *attrName, uint32_t ndims, const Dimensions dims, const void *data) throw (DCException) |
void | read (int32_t id, const char *name, Dimensions &sizeRead, void *data) throw (DCException) |
void | read (int32_t id, const char *name, const Dimensions dstBuffer, const Dimensions dstOffset, Dimensions &sizeRead, void *data) throw (DCException) |
CollectionType * | readMeta (int32_t id, const char *name, const Dimensions dstBuffer, const Dimensions dstOffset, Dimensions &sizeRead) throw (DCException) |
![]() | |
virtual | ~DataCollector () |
Additional Inherited Members | |
![]() | |
enum | DomDataClass { UndefinedType = 0, PolyType = 10, GridType = 20 } |
![]() | |
enum | FileAccType { FAT_CREATE, FAT_READ, FAT_READ_MERGED, FAT_WRITE } |
typedef struct splash::DataCollector::_FileCreationAttr | FileCreationAttr |
typedef struct splash::DataCollector::_DCEntry | DCEntry |
![]() | |
static void | initFileCreationAttr (FileCreationAttr &attr) |
DomainCollector extends SerialDataCollector with domain management features. A domain is a logical view to data in memory in or files, in contrast to the physical/memory view. DomainCollector allows to efficiently read subdomains (sub-partitions) from multi-process HDF5 files with entries annotated with domain information.
The following concept is used: Each process (of the MPI topology) annotates its local data with local and global domain information when writing. When reading from these files, data from all files can be accessed transparently as if in one single file. This global view uses the global domain information, created from all local subdomains.
Definition at line 51 of file DomainCollector.hpp.
splash::DomainCollector::DomainCollector | ( | uint32_t | maxFileHandles | ) |
Constructor
maxFileHandles | Maximum number of concurrently opened file handles (0=unlimited). |
Definition at line 38 of file DomainCollector.cpp.
|
virtual |
Destructor
Definition at line 43 of file DomainCollector.cpp.
|
virtual |
Appends 1D data with annotated domain information.
id | ID of iteration. |
type | Type information for data. |
count | Number of elements to append. |
name | Name for the dataset to create/append. |
localDomain | Local subdomain. |
globalDomain | Logical global domain. |
buf | Buffer with data. |
Implements splash::IDomainCollector.
Definition at line 740 of file DomainCollector.cpp.
|
virtual |
Appends 1D data with annotated domain information.
id | ID of iteration. |
type | Type information for data. |
count | Number of elements to append. |
offset | Offset in elements to start reading from. |
striding | Striding to be used for reading. Data must contain at least (striding * count) elements. 1 mean 'no striding'. |
name | Name for the dataset to create/append. |
localDomain | Local subdomain. |
globalDomain | Logical global domain. |
buf | Buffer with data. |
Implements splash::IDomainCollector.
Definition at line 752 of file DomainCollector.cpp.
|
virtual |
Returns the global domain that is spanned by all local datasets (subdomains) of the currently accessed files. The user is responsible to guarantee that the actual subdomains form a line/rectangle/cuboid.
id | ID of iteration. |
name | Name of the dataset. |
Implements splash::IDomainCollector.
Definition at line 47 of file DomainCollector.cpp.
|
virtual |
Returns the local domain for a dataset in currently accessed file.
id | ID of iteration. |
name | Name of the dataset. |
Implements splash::IDomainCollector.
Definition at line 73 of file DomainCollector.cpp.
|
virtual |
Efficiently reads domain-annotated data. In comparison to the standard read method, only data required for the requested partition is read. It passes back a DataContainer holding all subdomains or subdomain portions, respectively, which make up the requested partition. Data from the files is immediately copied to the DomainData objects in the container and DomainData buffers are dealloated when the DomainData object is deleted, which must be done by the user.
id | ID of the iteration. |
name | Name of the dataset. |
domain | Domain for reading. |
dataClass | Optional domain type annotation, can be NULL. |
lazyLoad | Set to load only size information for each subdomain, data must be loaded later using IDomainCollector::readDomainLazy. |
Implements splash::IDomainCollector.
Definition at line 452 of file DomainCollector.cpp.
|
virtual |
Reads a subdomain which has been loaded using readDomain with lazyLoad activated. The DomainCollector instance must not have been closed in between. Currently only supported for domain annotated data of type DomDataClass::PolyType.
domainData | Pointer to subdomain loaded using lazyLoad == true. |
Implements splash::IDomainCollector.
Definition at line 681 of file DomainCollector.cpp.
|
virtual |
Writes data with annotated domain information.
id | ID of the iteration for writing. |
type | Type information for data. |
ndims | Number of dimensions (1-3). |
select | Selection in src buffer. |
name | Name for the dataset to create/append. |
localDomain | Local subdomain. |
globalDomain | Logical global domain. |
dataClass | Subdomain type annotation. |
buf | Buffer with data. |
Implements splash::IDomainCollector.
Definition at line 725 of file DomainCollector.cpp.