Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends

LibGeoDecomp::MPIIOWriter< CELL_TYPE > Class Template Reference

This writer uses MPI I/O to dump simulation snapshots to disk. More...

#include <mpiiowriter.h>

Inherits Clonable< Writer< CELL_TYPE >, MPIIOWriter< CELL_TYPE > >.

Collaboration diagram for LibGeoDecomp::MPIIOWriter< CELL_TYPE >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Writer< CELL_TYPE >
::GridType 
GridType
typedef Writer< CELL_TYPE >
::Topology 
Topology

Public Member Functions

 MPIIOWriter (const std::string &prefix, const unsigned period, const unsigned maxSteps, const MPI_Comm &communicator=MPI_COMM_WORLD, MPI_Datatype mpiDatatype=Typemaps::lookup< CELL_TYPE >())
virtual void stepFinished (const GridType &grid, unsigned step, WriterEvent event)
 is called back from sim after each simulation step.

Static Public Attributes

static const int DIM = Topology::DIM

Private Member Functions

std::string filename (const unsigned &step) const

Private Attributes

unsigned maxSteps
MPI_Comm comm
MPI_Datatype datatype

Friends

class MPIIOWriterTest
class MPIIOInitializerTest

Detailed Description

template<typename CELL_TYPE>
class LibGeoDecomp::MPIIOWriter< CELL_TYPE >

This writer uses MPI I/O to dump simulation snapshots to disk.

Use MPIIOInitializer for restarting from a checkpoint. Also consider ParallelMPIIOWriter for large-scale runs.


Member Typedef Documentation

template<typename CELL_TYPE >
typedef Writer<CELL_TYPE>::GridType LibGeoDecomp::MPIIOWriter< CELL_TYPE >::GridType

Reimplemented from LibGeoDecomp::Writer< CELL_TYPE >.

template<typename CELL_TYPE >
typedef Writer<CELL_TYPE>::Topology LibGeoDecomp::MPIIOWriter< CELL_TYPE >::Topology

Reimplemented from LibGeoDecomp::Writer< CELL_TYPE >.


Constructor & Destructor Documentation

template<typename CELL_TYPE >
LibGeoDecomp::MPIIOWriter< CELL_TYPE >::MPIIOWriter ( const std::string &  prefix,
const unsigned  period,
const unsigned  maxSteps,
const MPI_Comm &  communicator = MPI_COMM_WORLD,
MPI_Datatype  mpiDatatype = Typemaps::lookup<CELL_TYPE>() 
) [inline]

Member Function Documentation

template<typename CELL_TYPE >
std::string LibGeoDecomp::MPIIOWriter< CELL_TYPE >::filename ( const unsigned step  )  const [inline, private]
template<typename CELL_TYPE >
virtual void LibGeoDecomp::MPIIOWriter< CELL_TYPE >::stepFinished ( const GridType grid,
unsigned  step,
WriterEvent  event 
) [inline, virtual]

is called back from sim after each simulation step.

event specifies the phase in which the simulation is currently in. This may be used for instance to open/close files at the beginning/end of the simulation.

Implements LibGeoDecomp::Writer< CELL_TYPE >.

References LibGeoDecomp::GridBase< CELL, DIMENSIONS >::boundingBox(), LibGeoDecomp::MPIIOWriter< CELL_TYPE >::comm, LibGeoDecomp::MPIIOWriter< CELL_TYPE >::datatype, LibGeoDecomp::GridBase< CELL, DIMENSIONS >::dimensions(), LibGeoDecomp::MPIIOWriter< CELL_TYPE >::filename(), and LibGeoDecomp::WRITER_STEP_FINISHED.


Friends And Related Function Documentation

template<typename CELL_TYPE >
friend class MPIIOInitializerTest [friend]
template<typename CELL_TYPE >
friend class MPIIOWriterTest [friend]

Member Data Documentation

template<typename CELL_TYPE >
MPI_Comm LibGeoDecomp::MPIIOWriter< CELL_TYPE >::comm [private]
template<typename CELL_TYPE >
MPI_Datatype LibGeoDecomp::MPIIOWriter< CELL_TYPE >::datatype [private]
template<typename CELL_TYPE >
const int LibGeoDecomp::MPIIOWriter< CELL_TYPE >::DIM = Topology::DIM [static]

Reimplemented from LibGeoDecomp::Writer< CELL_TYPE >.

template<typename CELL_TYPE >
unsigned LibGeoDecomp::MPIIOWriter< CELL_TYPE >::maxSteps [private]

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