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

LibGeoDecomp::PartitionManager< TOPOLOGY > Class Template Reference

#include <partitionmanager.h>

Collaboration diagram for LibGeoDecomp::PartitionManager< TOPOLOGY >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  AccessCode { OUTGROUP = -1 }
typedef TOPOLOGY Topology
typedef std::map< int,
std::vector< Region< DIM > > > 
RegionVecMap

Public Member Functions

 PartitionManager (const CoordBox< DIM > &simulationArea=CoordBox< DIM >())
void resetRegions (const CoordBox< DIM > &newSimulationArea, boost::shared_ptr< Partition< DIM > > newPartition, unsigned newRank, unsigned newGhostZoneWidth)
 resets the domain decomposition.
void resetGhostZones (const std::vector< CoordBox< DIM > > &newBoundingBoxes)
RegionVecMapgetOuterGhostZoneFragments ()
RegionVecMapgetInnerGhostZoneFragments ()
const Region< DIM > & getInnerOutgroupGhostZoneFragment ()
const Region< DIM > & getOuterOutgroupGhostZoneFragment ()
const Region< DIM > & getRegion (int node, unsigned expansionWidth)
const Region< DIM > & ownRegion (unsigned expansionWidth=0)
const Region< DIM > & ownExpandedRegion ()
const Region< DIM > & rim (unsigned dist)
 Rim describes the node's inner ghost zone and those surrounding coordinates required to update those.
const Region< DIM > & innerSet (unsigned dist)
 inner set refers to that part of a node's domain which are required to update the kernel.
const std::vector< CoordBox
< DIM > > & 
getBoundingBoxes () const
unsigned getGhostZoneWidth () const
const Region< DIM > & getOuterRim () const
 outer rim is the union of all outer ghost zone fragments.
const Region< DIM > & getVolatileKernel () const
 The volatile kernel is the part of the kernel which may be overwritten while updating the inner ghost zone.
const Region< DIM > & getInnerRim () const
 The inner rim is the part of the kernel which is required for updating the own rims.
const std::vector< std::size_t > & getWeights () const

Static Public Attributes

static const int DIM = Topology::DIM

Private Member Functions

void fillRegion (unsigned node)
void fillOwnRegion ()
void intersect (unsigned node)

Private Attributes

boost::shared_ptr< Partition
< DIM > > 
partition
CoordBox< DIMsimulationArea
Region< DIMouterRim
Region< DIMvolatileKernel
Region< DIMinnerRim
RegionVecMap regions
RegionVecMap outerGhostZoneFragments
RegionVecMap innerGhostZoneFragments
std::vector< Region< DIM > > ownRims
std::vector< Region< DIM > > ownInnerSets
unsigned rank
unsigned ghostZoneWidth
std::vector< CoordBox< DIM > > boundingBoxes

Friends

class PartitionManagerTest
class HiParSimulator::VanillaStepperTest

template<typename TOPOLOGY>
class LibGeoDecomp::PartitionManager< TOPOLOGY >


Member Typedef Documentation

template<typename TOPOLOGY>
typedef std::map<int, std::vector<Region<DIM> > > LibGeoDecomp::PartitionManager< TOPOLOGY >::RegionVecMap
template<typename TOPOLOGY>
typedef TOPOLOGY LibGeoDecomp::PartitionManager< TOPOLOGY >::Topology

Member Enumeration Documentation

template<typename TOPOLOGY>
enum LibGeoDecomp::PartitionManager::AccessCode
Enumerator:
OUTGROUP 

Constructor & Destructor Documentation

template<typename TOPOLOGY>
LibGeoDecomp::PartitionManager< TOPOLOGY >::PartitionManager ( const CoordBox< DIM > &  simulationArea = CoordBox<DIM>()  )  [inline, explicit]

Member Function Documentation

template<typename TOPOLOGY>
void LibGeoDecomp::PartitionManager< TOPOLOGY >::fillOwnRegion (  )  [inline, private]
template<typename TOPOLOGY>
void LibGeoDecomp::PartitionManager< TOPOLOGY >::fillRegion ( unsigned  node  )  [inline, private]
template<typename TOPOLOGY>
const std::vector<CoordBox<DIM> >& LibGeoDecomp::PartitionManager< TOPOLOGY >::getBoundingBoxes (  )  const [inline]
template<typename TOPOLOGY>
unsigned LibGeoDecomp::PartitionManager< TOPOLOGY >::getGhostZoneWidth (  )  const [inline]
template<typename TOPOLOGY>
RegionVecMap& LibGeoDecomp::PartitionManager< TOPOLOGY >::getInnerGhostZoneFragments (  )  [inline]
template<typename TOPOLOGY>
const Region<DIM>& LibGeoDecomp::PartitionManager< TOPOLOGY >::getInnerOutgroupGhostZoneFragment (  )  [inline]
template<typename TOPOLOGY>
const Region<DIM>& LibGeoDecomp::PartitionManager< TOPOLOGY >::getInnerRim (  )  const [inline]

The inner rim is the part of the kernel which is required for updating the own rims.

Its similar to the outer ghost zone, but to the inner side. It usually includes just one stencil diameter more cells than the volatile kernel.

template<typename TOPOLOGY>
RegionVecMap& LibGeoDecomp::PartitionManager< TOPOLOGY >::getOuterGhostZoneFragments (  )  [inline]
template<typename TOPOLOGY>
const Region<DIM>& LibGeoDecomp::PartitionManager< TOPOLOGY >::getOuterOutgroupGhostZoneFragment (  )  [inline]
template<typename TOPOLOGY>
const Region<DIM>& LibGeoDecomp::PartitionManager< TOPOLOGY >::getOuterRim (  )  const [inline]

outer rim is the union of all outer ghost zone fragments.

template<typename TOPOLOGY>
const Region<DIM>& LibGeoDecomp::PartitionManager< TOPOLOGY >::getRegion ( int  node,
unsigned  expansionWidth 
) [inline]
template<typename TOPOLOGY>
const Region<DIM>& LibGeoDecomp::PartitionManager< TOPOLOGY >::getVolatileKernel (  )  const [inline]

The volatile kernel is the part of the kernel which may be overwritten while updating the inner ghost zone.

template<typename TOPOLOGY>
const std::vector<std::size_t>& LibGeoDecomp::PartitionManager< TOPOLOGY >::getWeights (  )  const [inline]
template<typename TOPOLOGY>
const Region<DIM>& LibGeoDecomp::PartitionManager< TOPOLOGY >::innerSet ( unsigned  dist  )  [inline]

inner set refers to that part of a node's domain which are required to update the kernel.

template<typename TOPOLOGY>
void LibGeoDecomp::PartitionManager< TOPOLOGY >::intersect ( unsigned  node  )  [inline, private]
template<typename TOPOLOGY>
const Region<DIM>& LibGeoDecomp::PartitionManager< TOPOLOGY >::ownExpandedRegion (  )  [inline]
template<typename TOPOLOGY>
const Region<DIM>& LibGeoDecomp::PartitionManager< TOPOLOGY >::ownRegion ( unsigned  expansionWidth = 0  )  [inline]
template<typename TOPOLOGY>
void LibGeoDecomp::PartitionManager< TOPOLOGY >::resetGhostZones ( const std::vector< CoordBox< DIM > > &  newBoundingBoxes  )  [inline]
template<typename TOPOLOGY>
void LibGeoDecomp::PartitionManager< TOPOLOGY >::resetRegions ( const CoordBox< DIM > &  newSimulationArea,
boost::shared_ptr< Partition< DIM > >  newPartition,
unsigned  newRank,
unsigned  newGhostZoneWidth 
) [inline]

resets the domain decomposition.

The simulation space is described by newSimulationArea, the decomposition scheme by newPartition. newRank will usually correspond to the MPI rank and identifies the current process. newGhostZoneWidth specifies after how many steps the halo should be synchronized. Higher values mean that the halo will be wider, which requires fewer synchronizations, but the syncs need to communicate more data. This is primarily to combat high latency datapaths (e.g. network latency or if the data needs to go to remote accelerators).

template<typename TOPOLOGY>
const Region<DIM>& LibGeoDecomp::PartitionManager< TOPOLOGY >::rim ( unsigned  dist  )  [inline]

Rim describes the node's inner ghost zone and those surrounding coordinates required to update those.


Friends And Related Function Documentation

template<typename TOPOLOGY>
friend class HiParSimulator::VanillaStepperTest [friend]
template<typename TOPOLOGY>
friend class PartitionManagerTest [friend]

Member Data Documentation

template<typename TOPOLOGY>
std::vector<CoordBox<DIM> > LibGeoDecomp::PartitionManager< TOPOLOGY >::boundingBoxes [private]
template<typename TOPOLOGY>
const int LibGeoDecomp::PartitionManager< TOPOLOGY >::DIM = Topology::DIM [static]
template<typename TOPOLOGY>
unsigned LibGeoDecomp::PartitionManager< TOPOLOGY >::ghostZoneWidth [private]
template<typename TOPOLOGY>
RegionVecMap LibGeoDecomp::PartitionManager< TOPOLOGY >::innerGhostZoneFragments [private]
template<typename TOPOLOGY>
Region<DIM> LibGeoDecomp::PartitionManager< TOPOLOGY >::innerRim [private]
template<typename TOPOLOGY>
RegionVecMap LibGeoDecomp::PartitionManager< TOPOLOGY >::outerGhostZoneFragments [private]
template<typename TOPOLOGY>
Region<DIM> LibGeoDecomp::PartitionManager< TOPOLOGY >::outerRim [private]
template<typename TOPOLOGY>
std::vector<Region<DIM> > LibGeoDecomp::PartitionManager< TOPOLOGY >::ownInnerSets [private]
template<typename TOPOLOGY>
std::vector<Region<DIM> > LibGeoDecomp::PartitionManager< TOPOLOGY >::ownRims [private]
template<typename TOPOLOGY>
boost::shared_ptr<Partition<DIM> > LibGeoDecomp::PartitionManager< TOPOLOGY >::partition [private]
template<typename TOPOLOGY>
unsigned LibGeoDecomp::PartitionManager< TOPOLOGY >::rank [private]
template<typename TOPOLOGY>
RegionVecMap LibGeoDecomp::PartitionManager< TOPOLOGY >::regions [private]
template<typename TOPOLOGY>
CoordBox<DIM> LibGeoDecomp::PartitionManager< TOPOLOGY >::simulationArea [private]
template<typename TOPOLOGY>
Region<DIM> LibGeoDecomp::PartitionManager< TOPOLOGY >::volatileKernel [private]

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