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

LibGeoDecomp::CollectingWriter< CELL_TYPE > Class Template Reference

Adapter class whose purpose is to use legacy Writer objects together with a DistributedSimulator. More...

#include <collectingwriter.h>

Inherits Clonable< ParallelWriter< CELL_TYPE >, CollectingWriter< CELL_TYPE > >.

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

List of all members.

Public Types

typedef ParallelWriter
< CELL_TYPE >::Topology 
Topology
typedef DisplacedGrid
< CELL_TYPE, Topology
StorageGridType
typedef DistributedSimulator
< CELL_TYPE >::GridType 
SimulatorGridType

Public Member Functions

 CollectingWriter (Writer< CELL_TYPE > *writer, int root=0, MPI_Comm communicator=MPI_COMM_WORLD, MPI_Datatype mpiDatatype=APITraits::SelectMPIDataType< CELL_TYPE >::value())
virtual void stepFinished (const SimulatorGridType &grid, const Region< DIM > &validRegion, const Coord< DIM > &globalDimensions, unsigned step, WriterEvent event, std::size_t rank, bool lastCall)

Static Public Attributes

static const int DIM = Topology::DIM

Private Attributes

boost::shared_ptr< Writer
< CELL_TYPE > > 
writer
MPILayer mpiLayer
int root
StorageGridType globalGrid
MPI_Datatype datatype

Detailed Description

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

Adapter class whose purpose is to use legacy Writer objects together with a DistributedSimulator.

Good for testing, but doesn't scale, as all memory is concentrated on one node and IO is serialized to that node. Use with care!


Member Typedef Documentation

template<typename CELL_TYPE >
typedef DistributedSimulator<CELL_TYPE>::GridType LibGeoDecomp::CollectingWriter< CELL_TYPE >::SimulatorGridType
template<typename CELL_TYPE >
typedef DisplacedGrid<CELL_TYPE, Topology> LibGeoDecomp::CollectingWriter< CELL_TYPE >::StorageGridType
template<typename CELL_TYPE >
typedef ParallelWriter<CELL_TYPE>::Topology LibGeoDecomp::CollectingWriter< CELL_TYPE >::Topology

Constructor & Destructor Documentation

template<typename CELL_TYPE >
LibGeoDecomp::CollectingWriter< CELL_TYPE >::CollectingWriter ( Writer< CELL_TYPE > *  writer,
int  root = 0,
MPI_Comm  communicator = MPI_COMM_WORLD,
MPI_Datatype  mpiDatatype = APITraits::SelectMPIDataType<CELL_TYPE>::value() 
) [inline, explicit]

Member Function Documentation

template<typename CELL_TYPE >
virtual void LibGeoDecomp::CollectingWriter< CELL_TYPE >::stepFinished ( const SimulatorGridType grid,
const Region< DIM > &  validRegion,
const Coord< DIM > &  globalDimensions,
unsigned  step,
WriterEvent  event,
std::size_t  rank,
bool  lastCall 
) [inline, virtual]

Member Data Documentation

template<typename CELL_TYPE >
MPI_Datatype LibGeoDecomp::CollectingWriter< CELL_TYPE >::datatype [private]
template<typename CELL_TYPE >
const int LibGeoDecomp::CollectingWriter< CELL_TYPE >::DIM = Topology::DIM [static]
template<typename CELL_TYPE >
StorageGridType LibGeoDecomp::CollectingWriter< CELL_TYPE >::globalGrid [private]
template<typename CELL_TYPE >
MPILayer LibGeoDecomp::CollectingWriter< CELL_TYPE >::mpiLayer [private]
template<typename CELL_TYPE >
int LibGeoDecomp::CollectingWriter< CELL_TYPE >::root [private]
template<typename CELL_TYPE >
boost::shared_ptr<Writer<CELL_TYPE> > LibGeoDecomp::CollectingWriter< CELL_TYPE >::writer [private]

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