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

LibGeoDecomp::MPIIOInitializer< CELL_TYPE > Class Template Reference

This class can set up a simulation from a snapshot generated by MPIIOWriter/ParallelMPIIOWriter. More...

#include <mpiioinitializer.h>

Inherits Initializer< CELL_TYPE >.

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

List of all members.

Public Types

typedef
APITraits::SelectTopology
< CELL_TYPE >::Value 
Topology

Public Member Functions

 MPIIOInitializer (const std::string &filename, const MPI_Datatype &mpiDatatype=Typemaps::lookup< CELL_TYPE >(), const MPI_Comm &comm=MPI_COMM_WORLD)
virtual void grid (GridBase< CELL_TYPE, DIM > *target)
 initializes all cells of the grid at target
virtual Coord< DIMgridDimensions () const
 returns the size of the gridBox().
virtual unsigned maxSteps () const
 gives the time step at which the simulation should terminate.
virtual unsigned startStep () const
 yields the logical time step at which the simulation should start

Static Public Attributes

static const int DIM = Topology::DIM

Private Attributes

std::string file
MPI_Datatype datatype
MPI_Comm communicator
unsigned currentStep
unsigned maximumSteps
Coord< DIMdimensions

Detailed Description

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

This class can set up a simulation from a snapshot generated by MPIIOWriter/ParallelMPIIOWriter.

This is especially useful for long-running jobs which might either be shot down because of wall clock limitations or node failures: here checkpoints can save captital amounts of compute time.


Member Typedef Documentation

template<typename CELL_TYPE >
typedef APITraits::SelectTopology<CELL_TYPE>::Value LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::Topology

Constructor & Destructor Documentation

template<typename CELL_TYPE >
LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::MPIIOInitializer ( const std::string &  filename,
const MPI_Datatype &  mpiDatatype = Typemaps::lookup<CELL_TYPE>(),
const MPI_Comm &  comm = MPI_COMM_WORLD 
) [inline, explicit]

Member Function Documentation

template<typename CELL_TYPE >
virtual void LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::grid ( GridBase< CELL_TYPE, DIM > *  target  )  [inline, virtual]
template<typename CELL_TYPE >
virtual Coord<DIM> LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::gridDimensions (  )  const [inline, virtual]
template<typename CELL_TYPE >
virtual unsigned LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::maxSteps (  )  const [inline, virtual]

gives the time step at which the simulation should terminate.

Example: if startStep is 0 and maxSteps is 10, then the Simulator should start at t=0, update to t=1, update to t=2, ... until it has updated to t=10.

If startStep is 5 and maxSteps is 8, then the Simulator is expected to init at t=5, update to t=6, update to t=7, and finally update to t=8.

Implements LibGeoDecomp::Initializer< CELL_TYPE >.

References LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::maximumSteps.

template<typename CELL_TYPE >
virtual unsigned LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::startStep (  )  const [inline, virtual]

yields the logical time step at which the simulation should start

Implements LibGeoDecomp::Initializer< CELL_TYPE >.

References LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::currentStep.


Member Data Documentation

template<typename CELL_TYPE >
MPI_Comm LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::communicator [private]
template<typename CELL_TYPE >
unsigned LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::currentStep [private]
template<typename CELL_TYPE >
MPI_Datatype LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::datatype [private]
template<typename CELL_TYPE >
const int LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::DIM = Topology::DIM [static]
template<typename CELL_TYPE >
Coord<DIM> LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::dimensions [private]
template<typename CELL_TYPE >
std::string LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::file [private]
template<typename CELL_TYPE >
unsigned LibGeoDecomp::MPIIOInitializer< CELL_TYPE >::maximumSteps [private]

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