libSplash
|
#include <ParallelDomainCollector.hpp>
Public Member Functions | |
ParallelDomainCollector (MPI_Comm comm, MPI_Info info, const Dimensions topology, uint32_t maxFileHandles) | |
virtual | ~ParallelDomainCollector () |
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, const Domain requestDomain, 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 | writeDomain (int32_t id, const Dimensions globalSize, const Dimensions globalOffset, const CollectionType &type, uint32_t ndims, const Selection select, const char *name, const Domain globalDomain, DomDataClass dataClass, const void *buf) throw (DCException) |
void | reserveDomain (int32_t id, const Dimensions globalSize, uint32_t ndims, const CollectionType &type, const char *name, const Domain domain, DomDataClass dataClass) throw (DCException) |
void | reserveDomain (int32_t id, const Dimensions size, Dimensions *globalSize, Dimensions *globalOffset, uint32_t ndims, const CollectionType &type, const char *name, const Domain domain, DomDataClass dataClass) throw (DCException) |
![]() | |
ParallelDataCollector (MPI_Comm comm, MPI_Info info, const Dimensions topology, uint32_t maxFileHandles) | |
virtual | ~ParallelDataCollector () |
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 rank, const Selection select, const char *name, const void *buf) throw (DCException) |
void | write (int32_t id, const Dimensions globalSize, const Dimensions globalOffset, const CollectionType &type, uint32_t rank, const Selection select, const char *name, const void *buf) |
void | reserve (int32_t id, const Dimensions globalSize, uint32_t rank, const CollectionType &type, const char *name) throw (DCException) |
void | reserve (int32_t id, const Dimensions size, Dimensions *globalSize, Dimensions *globalOffset, uint32_t rank, const CollectionType &type, const char *name) throw (DCException) |
void | append (int32_t id, const Dimensions size, uint32_t rank, const Dimensions globalOffset, const char *name, const void *buf) |
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) |
AttributeInfo | readGlobalAttributeInfo (int32_t id, const char *name, Dimensions *mpiPosition=NULL) throw (DCException) |
void | readGlobalAttribute (int32_t id, const char *name, void *buf) throw (DCException) |
void | writeGlobalAttribute (int32_t id, const CollectionType &type, const char *name, const void *buf) throw (DCException) |
void | writeGlobalAttribute (int32_t id, const CollectionType &type, const char *name, uint32_t ndims, const Dimensions dims, const void *buf) 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 *buf, Dimensions *mpiPosition=NULL) throw (DCException) |
void | writeAttribute (int32_t id, const CollectionType &type, const char *dataName, const char *attrName, const void *buf) throw (DCException) |
void | writeAttribute (int32_t id, const CollectionType &type, const char *dataName, const char *attrName, uint32_t ndims, const Dimensions dims, const void *buf) throw (DCException) |
void | read (int32_t id, const char *name, Dimensions &sizeRead, void *buf) throw (DCException) |
void | read (int32_t id, const char *name, const Dimensions dstBuffer, const Dimensions dstOffset, Dimensions &sizeRead, void *buf) throw (DCException) |
CollectionType * | readMeta (int32_t id, const char *name, const Dimensions dstBuffer, const Dimensions dstOffset, Dimensions &sizeRead) throw (DCException) |
void | read (int32_t id, const Dimensions localSize, const Dimensions globalOffset, const char *name, Dimensions &sizeRead, void *buf) throw (DCException) |
void | read (int32_t id, const Dimensions localSize, const Dimensions globalOffset, const char *name, const Dimensions dstBuffer, const Dimensions dstOffset, Dimensions &sizeRead, void *buf) throw (DCException) |
void | finalize (void) |
![]() | |
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) |
Definition at line 35 of file ParallelDomainCollector.hpp.
splash::ParallelDomainCollector::ParallelDomainCollector | ( | MPI_Comm | comm, |
MPI_Info | info, | ||
const Dimensions | topology, | ||
uint32_t | maxFileHandles | ||
) |
Constructor
comm | The communicator. All processes in this communicator must participate in accessing data. |
info | The MPI_Info object. |
topology | Number of MPI processes in each dimension. |
maxFileHandles | Maximum number of concurrently opened file handles (0=infinite). |
Definition at line 62 of file ParallelDomainCollector.cpp.
|
virtual |
Destructor
Definition at line 68 of file ParallelDomainCollector.cpp.
|
virtual |
Returns the global domain information for a dataset.
id | dataset iteration |
name | dataset name |
Implements splash::IDomainCollector.
Definition at line 72 of file ParallelDomainCollector.cpp.
|
virtual |
Returns the local domain information for a dataset.
id | dataset iteration |
name | dataset name |
Implements splash::IDomainCollector.
Definition at line 88 of file ParallelDomainCollector.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 350 of file ParallelDomainCollector.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 380 of file ParallelDomainCollector.cpp.
|
virtual |
Reserves a dataset with annotated domain information for parallel access.
id | ID for iteration. |
globalSize | Global size for reserved dataset. |
ndims | Number of dimensions (1-3). |
type | Type information for data. |
name | Name for the dataset. |
domain | Global domain information. |
dataClass | Subdomain type annotation. |
Implements splash::IParallelDomainCollector.
Definition at line 466 of file ParallelDomainCollector.cpp.
|
virtual |
Reserves a dataset with annotated domain information for parallel access.
The global size and the global offset for the calling process are determined automatically via MPI among all participating processes. Note: This is not possible when writing 2D data with a 3D MPI topology.
id | ID for iteration. |
size | Global size for reserved dataset. |
globalSize | Returns the global size of the dataset, can be NULL. |
globalOffset | Returns the global offset for the calling process, can be NULL. |
ndims | Number of dimensions (1-3). |
type | Type information for data. |
name | Name for the dataset. |
domain | Global domain information. |
dataClass | Subdomain type annotation. |
Implements splash::IParallelDomainCollector.
Definition at line 481 of file ParallelDomainCollector.cpp.
|
virtual |
The global size and the write offset for the calling process are determined automatically via MPI among all participating processes. Note: This is not possible when writing 2D data with a 3D MPI topology.
The global domain size and the domain offset for the calling process are determined automatically via MPI among all participating processes.
Implements splash::IParallelDomainCollector.
Definition at line 429 of file ParallelDomainCollector.cpp.
|
virtual |
Writes data with annotated domain information.
id | ID for iteration. |
globalSize | Dimensions for global collective buffer. |
globalOffset | 3D-offset in the globalSize-buffer this process writes to. |
type | Type information for data. |
ndims | Number of dimensions (1-3) of the buffer. |
select | Selection in src buffer. |
name | Name of the dataset. |
globalDomain | Global domain information. |
dataClass | Domain type annotation. |
buf | Buffer with data. |
Implements splash::IParallelDomainCollector.
Definition at line 448 of file ParallelDomainCollector.cpp.