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 > >.
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 |
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!
typedef DistributedSimulator<CELL_TYPE>::GridType LibGeoDecomp::CollectingWriter< CELL_TYPE >::SimulatorGridType |
typedef DisplacedGrid<CELL_TYPE, Topology> LibGeoDecomp::CollectingWriter< CELL_TYPE >::StorageGridType |
typedef ParallelWriter<CELL_TYPE>::Topology LibGeoDecomp::CollectingWriter< CELL_TYPE >::Topology |
Reimplemented from LibGeoDecomp::ParallelWriter< 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] |
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] |
References LibGeoDecomp::CoordBox< DIM >::beginStreak(), LibGeoDecomp::GridBase< CELL, DIMENSIONS >::boundingBox(), LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::boundingBox(), LibGeoDecomp::CollectingWriter< CELL_TYPE >::datatype, LibGeoDecomp::CoordBox< DIM >::endStreak(), LibGeoDecomp::GridBase< CELL, DIMENSIONS >::get(), LibGeoDecomp::GridBase< CELL, DIMENSIONS >::getEdge(), LibGeoDecomp::CollectingWriter< CELL_TYPE >::globalGrid, LibGeoDecomp::CollectingWriter< CELL_TYPE >::mpiLayer, LibGeoDecomp::Streak< DIM >::origin, LibGeoDecomp::MPILayer::PARALLEL_MEMORY_WRITER, LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::paste(), LibGeoDecomp::MPILayer::rank(), LibGeoDecomp::MPILayer::recvRegion(), LibGeoDecomp::MPILayer::recvUnregisteredRegion(), LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::resize(), LibGeoDecomp::CollectingWriter< CELL_TYPE >::root, LibGeoDecomp::MPILayer::sendRegion(), LibGeoDecomp::MPILayer::sendUnregisteredRegion(), LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::setEdge(), LibGeoDecomp::MPILayer::size(), LibGeoDecomp::Writer< CELL_TYPE >::stepFinished(), LibGeoDecomp::DisplacedGrid< CELL_TYPE, TOPOLOGY, TOPOLOGICALLY_CORRECT >::vanillaGrid(), and LibGeoDecomp::MPILayer::waitAll().
MPI_Datatype LibGeoDecomp::CollectingWriter< CELL_TYPE >::datatype [private] |
Referenced by LibGeoDecomp::CollectingWriter< CELL_TYPE >::stepFinished().
const int LibGeoDecomp::CollectingWriter< CELL_TYPE >::DIM = Topology::DIM [static] |
StorageGridType LibGeoDecomp::CollectingWriter< CELL_TYPE >::globalGrid [private] |
Referenced by LibGeoDecomp::CollectingWriter< CELL_TYPE >::stepFinished().
MPILayer LibGeoDecomp::CollectingWriter< CELL_TYPE >::mpiLayer [private] |
int LibGeoDecomp::CollectingWriter< CELL_TYPE >::root [private] |
boost::shared_ptr<Writer<CELL_TYPE> > LibGeoDecomp::CollectingWriter< CELL_TYPE >::writer [private] |