libSplash
Public Member Functions | List of all members
splash::ParallelDomainCollector Class Reference

#include <ParallelDomainCollector.hpp>

Inheritance diagram for splash::ParallelDomainCollector:
Inheritance graph
[legend]
Collaboration diagram for splash::ParallelDomainCollector:
Collaboration graph
[legend]

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)
 
DataContainerreadDomain (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)
 
- Public Member Functions inherited from splash::ParallelDataCollector
 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)
 
CollectionTypereadMeta (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)
 
- Public Member Functions inherited from splash::DataCollector
virtual ~DataCollector ()
 

Additional Inherited Members

- Public Types inherited from splash::IDomainCollector
enum  DomDataClass { UndefinedType = 0, PolyType = 10, GridType = 20 }
 
- Public Types inherited from splash::DataCollector
enum  FileAccType { FAT_CREATE, FAT_READ, FAT_READ_MERGED, FAT_WRITE }
 
typedef struct splash::DataCollector::_FileCreationAttr FileCreationAttr
 
typedef struct splash::DataCollector::_DCEntry DCEntry
 
- Static Public Member Functions inherited from splash::DataCollector
static void initFileCreationAttr (FileCreationAttr &attr)
 

Detailed Description

domains_parallel.jpg

Definition at line 35 of file ParallelDomainCollector.hpp.

Constructor & Destructor Documentation

◆ ParallelDomainCollector()

splash::ParallelDomainCollector::ParallelDomainCollector ( MPI_Comm  comm,
MPI_Info  info,
const Dimensions  topology,
uint32_t  maxFileHandles 
)

Constructor

Parameters
commThe communicator. All processes in this communicator must participate in accessing data.
infoThe MPI_Info object.
topologyNumber of MPI processes in each dimension.
maxFileHandlesMaximum number of concurrently opened file handles (0=infinite).

Definition at line 62 of file ParallelDomainCollector.cpp.

◆ ~ParallelDomainCollector()

splash::ParallelDomainCollector::~ParallelDomainCollector ( )
virtual

Destructor

Definition at line 68 of file ParallelDomainCollector.cpp.

Member Function Documentation

◆ getGlobalDomain()

Domain splash::ParallelDomainCollector::getGlobalDomain ( int32_t  id,
const char *  name 
)
throw (DCException
)
virtual

Returns the global domain information for a dataset.

Parameters
iddataset iteration
namedataset name
Returns
global domain

Implements splash::IDomainCollector.

Definition at line 72 of file ParallelDomainCollector.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLocalDomain()

Domain splash::ParallelDomainCollector::getLocalDomain ( int32_t  id,
const char *  name 
)
throw (DCException
)
virtual

Returns the local domain information for a dataset.

Parameters
iddataset iteration
namedataset name
Returns
global domain

Implements splash::IDomainCollector.

Definition at line 88 of file ParallelDomainCollector.cpp.

Here is the call graph for this function:

◆ readDomain()

DataContainer * splash::ParallelDomainCollector::readDomain ( int32_t  id,
const char *  name,
const Domain  domain,
DomDataClass dataClass,
bool  lazyLoad = false 
)
throw (DCException
)
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.

Parameters
idID of the iteration.
nameName of the dataset.
domainDomain for reading.
dataClassOptional domain type annotation, can be NULL.
lazyLoadSet to load only size information for each subdomain, data must be loaded later using IDomainCollector::readDomainLazy.
Returns
Returns a pointer to a newly allocated DataContainer holding all subdomains.

Implements splash::IDomainCollector.

Definition at line 350 of file ParallelDomainCollector.cpp.

Here is the call graph for this function:

◆ readDomainLazy()

void splash::ParallelDomainCollector::readDomainLazy ( DomainData domainData)
throw (DCException
)
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.

Parameters
domainDataPointer to subdomain loaded using lazyLoad == true.

Implements splash::IDomainCollector.

Definition at line 380 of file ParallelDomainCollector.cpp.

◆ reserveDomain() [1/2]

void splash::ParallelDomainCollector::reserveDomain ( int32_t  id,
const Dimensions  globalSize,
uint32_t  ndims,
const CollectionType type,
const char *  name,
const Domain  domain,
DomDataClass  dataClass 
)
throw (DCException
)
virtual

Reserves a dataset with annotated domain information for parallel access.

Parameters
idID for iteration.
globalSizeGlobal size for reserved dataset.
ndimsNumber of dimensions (1-3).
typeType information for data.
nameName for the dataset.
domainGlobal domain information.
dataClassSubdomain type annotation.

Implements splash::IParallelDomainCollector.

Definition at line 466 of file ParallelDomainCollector.cpp.

Here is the call graph for this function:

◆ reserveDomain() [2/2]

void splash::ParallelDomainCollector::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
)
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.

Parameters
idID for iteration.
sizeGlobal size for reserved dataset.
globalSizeReturns the global size of the dataset, can be NULL.
globalOffsetReturns the global offset for the calling process, can be NULL.
ndimsNumber of dimensions (1-3).
typeType information for data.
nameName for the dataset.
domainGlobal domain information.
dataClassSubdomain type annotation.

Implements splash::IParallelDomainCollector.

Definition at line 481 of file ParallelDomainCollector.cpp.

Here is the call graph for this function:

◆ writeDomain() [1/2]

void splash::ParallelDomainCollector::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
)
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.

◆ writeDomain() [2/2]

void splash::ParallelDomainCollector::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
)
virtual

Writes data with annotated domain information.

Parameters
idID for iteration.
globalSizeDimensions for global collective buffer.
globalOffset3D-offset in the globalSize-buffer this process writes to.
typeType information for data.
ndimsNumber of dimensions (1-3) of the buffer.
selectSelection in src buffer.
nameName of the dataset.
globalDomainGlobal domain information.
dataClassDomain type annotation.
bufBuffer with data.

Implements splash::IParallelDomainCollector.

Definition at line 448 of file ParallelDomainCollector.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: