Zoltan2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Attributes | List of all members
Zoltan2::Machine< pcoord_t, part_t > Class Template Reference

MachineClass Base class for representing machine coordinates, networks, etc. More...

#include <Zoltan2_Machine.hpp>

Inheritance diagram for Zoltan2::Machine< pcoord_t, part_t >:
Inheritance graph
[legend]

Public Member Functions

 Machine (const Teuchos::Comm< int > &comm)
 Constructor MachineRepresentation Class. More...
 
virtual ~Machine ()
 
bool hasMachineCoordinates () const
 indicates whether or not the machine has coordinates More...
 
int getMachineDim () const
 returns the dimension (number of coords per node) in the machine More...
 
bool getMachineExtent (int *nxyz) const
 sets the number of unique coordinates in each machine dimension return true if coordinates are available More...
 
bool getMachineExtentWrapArounds (bool *wrap_around) const
 if the machine has a wrap-around tourus link in each dimension. return true if the information is available More...
 
bool getMyMachineCoordinate (pcoord_t *xyz) const
 getMyCoordinate function set the machine coordinate xyz of the current process return true if current process' coordinates are available More...
 
bool getMachineCoordinate (const int rank, pcoord_t *xyz) const
 getCoordinate function set the machine coordinate xyz of any rank process return true if coordinates are available by rank More...
 
bool getMachineCoordinate (const char *nodename, pcoord_t *xyz) const
 getCoordinate function set the machine coordinate xyz of any node by nodename return true if coordinates are available by nodename More...
 
bool getAllMachineCoordinatesView (pcoord_t **allCoords) const
 getProcDim function set the coordinates of all ranks allCoords[i][j], i=0,...,getMachineDim(), j=0,...,getNumRanks(), is the i-th dimensional coordinate for rank j. return true if coordinates are available for all ranks More...
 
int getNumRanks () const
 getNumRanks function return the number of ranks. More...
 
virtual bool getHopCount (int rank1, int rank2, pcoord_t &hops) const
 getHopCount function set hops between rank1 and rank2 return true if coordinates are available More...
 
virtual part_t getNumUniqueGroups () const
 getNumUniqueGroups function return the number of unique Dragonfly network groups in provided allocation. More...
 
virtual bool getGroupCount (part_t *grp_count) const
 getGroupCount function return the number of ranks in each group (RCA X-dim, e.g. first dim) More...
 

Protected Attributes

int numRanks
 
int myRank
 

Detailed Description

template<typename pcoord_t, typename part_t>
class Zoltan2::Machine< pcoord_t, part_t >

MachineClass Base class for representing machine coordinates, networks, etc.

Definition at line 21 of file Zoltan2_Machine.hpp.

Constructor & Destructor Documentation

template<typename pcoord_t , typename part_t >
Zoltan2::Machine< pcoord_t, part_t >::Machine ( const Teuchos::Comm< int > &  comm)
inline

Constructor MachineRepresentation Class.

Parameters
comm_Communication object.

Definition at line 32 of file Zoltan2_Machine.hpp.

template<typename pcoord_t , typename part_t >
virtual Zoltan2::Machine< pcoord_t, part_t >::~Machine ( )
inlinevirtual

Definition at line 36 of file Zoltan2_Machine.hpp.

Member Function Documentation

template<typename pcoord_t , typename part_t >
bool Zoltan2::Machine< pcoord_t, part_t >::hasMachineCoordinates ( ) const
inline

indicates whether or not the machine has coordinates

Definition at line 40 of file Zoltan2_Machine.hpp.

template<typename pcoord_t , typename part_t >
int Zoltan2::Machine< pcoord_t, part_t >::getMachineDim ( ) const
inline

returns the dimension (number of coords per node) in the machine

Definition at line 46 of file Zoltan2_Machine.hpp.

template<typename pcoord_t , typename part_t >
bool Zoltan2::Machine< pcoord_t, part_t >::getMachineExtent ( int *  nxyz) const
inline

sets the number of unique coordinates in each machine dimension return true if coordinates are available

Definition at line 53 of file Zoltan2_Machine.hpp.

template<typename pcoord_t , typename part_t >
bool Zoltan2::Machine< pcoord_t, part_t >::getMachineExtentWrapArounds ( bool *  wrap_around) const
inline

if the machine has a wrap-around tourus link in each dimension. return true if the information is available

Definition at line 60 of file Zoltan2_Machine.hpp.

template<typename pcoord_t , typename part_t >
bool Zoltan2::Machine< pcoord_t, part_t >::getMyMachineCoordinate ( pcoord_t *  xyz) const
inline

getMyCoordinate function set the machine coordinate xyz of the current process return true if current process' coordinates are available

Definition at line 68 of file Zoltan2_Machine.hpp.

template<typename pcoord_t , typename part_t >
bool Zoltan2::Machine< pcoord_t, part_t >::getMachineCoordinate ( const int  rank,
pcoord_t *  xyz 
) const
inline

getCoordinate function set the machine coordinate xyz of any rank process return true if coordinates are available by rank

Definition at line 76 of file Zoltan2_Machine.hpp.

template<typename pcoord_t , typename part_t >
bool Zoltan2::Machine< pcoord_t, part_t >::getMachineCoordinate ( const char *  nodename,
pcoord_t *  xyz 
) const
inline

getCoordinate function set the machine coordinate xyz of any node by nodename return true if coordinates are available by nodename

Definition at line 84 of file Zoltan2_Machine.hpp.

template<typename pcoord_t , typename part_t >
bool Zoltan2::Machine< pcoord_t, part_t >::getAllMachineCoordinatesView ( pcoord_t **  allCoords) const
inline

getProcDim function set the coordinates of all ranks allCoords[i][j], i=0,...,getMachineDim(), j=0,...,getNumRanks(), is the i-th dimensional coordinate for rank j. return true if coordinates are available for all ranks

Definition at line 94 of file Zoltan2_Machine.hpp.

template<typename pcoord_t , typename part_t >
int Zoltan2::Machine< pcoord_t, part_t >::getNumRanks ( ) const
inline

getNumRanks function return the number of ranks.

Definition at line 101 of file Zoltan2_Machine.hpp.

template<typename pcoord_t , typename part_t >
virtual bool Zoltan2::Machine< pcoord_t, part_t >::getHopCount ( int  rank1,
int  rank2,
pcoord_t &  hops 
) const
inlinevirtual
template<typename pcoord_t , typename part_t >
virtual part_t Zoltan2::Machine< pcoord_t, part_t >::getNumUniqueGroups ( ) const
inlinevirtual

getNumUniqueGroups function return the number of unique Dragonfly network groups in provided allocation.

Equals the length of group_count member data, if available, otherwise we consider the whole allocation to be one group.

Reimplemented in Zoltan2::MachineDragonflyRCA< pcoord_t, part_t >, and Zoltan2::MachineDragonflyRCAForTesting< pcoord_t, part_t >.

Definition at line 118 of file Zoltan2_Machine.hpp.

template<typename pcoord_t , typename part_t >
virtual bool Zoltan2::Machine< pcoord_t, part_t >::getGroupCount ( part_t grp_count) const
inlinevirtual

getGroupCount function return the number of ranks in each group (RCA X-dim, e.g. first dim)

Ex, 4 ranks with coord (3, 1, 1) and 8 ranks with coord (5, 2, 4), will produce grp_count = [0, 0, 0, 4, 0, 8, 0, ...] which is trimmed and returned as grp_count = [4, 8]

(Currently only for Zoltan2_MachineDragonflyRCA, and used for MultiJagged's first cut in "algorithms/partition/Zoltan2_TaskMapper.hpp" thru "problems/Zoltan2_MappingProblem.hpp". return true if group_count is available

Definition at line 137 of file Zoltan2_Machine.hpp.

Member Data Documentation

template<typename pcoord_t , typename part_t >
int Zoltan2::Machine< pcoord_t, part_t >::numRanks
protected

Definition at line 24 of file Zoltan2_Machine.hpp.

template<typename pcoord_t , typename part_t >
int Zoltan2::Machine< pcoord_t, part_t >::myRank
protected

Definition at line 25 of file Zoltan2_Machine.hpp.


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