1 #ifndef _ZOLTAN2_MACHINEREPRESENTATION_HPP_ 2 #define _ZOLTAN2_MACHINEREPRESENTATION_HPP_ 4 #include <Teuchos_Comm.hpp> 5 #include <Teuchos_StandardParameterEntryValidators.hpp> 6 #include <Teuchos_ParameterList.hpp> 24 template <
typename pcoord_t,
typename part_t>
39 #if defined(HAVE_ZOLTAN2_RCALIB) 40 #if defined(ZOLTAN2_MACHINE_TORUS) 42 #elif defined(ZOLTAN2_MACHINE_DRAGONFLY) 48 #elif defined(HAVE_ZOLTAN2_TOPOMANAGER) 49 #if defined(ZOLTAN2_MACHINE_TORUS) 55 #elif defined(HAVE_ZOLTAN2_BGQTEST) 56 #if defined(ZOLTAN2_MACHINE_TORUS) 63 #if defined(ZOLTAN2_MACHINE_TORUS) 65 #elif defined(ZOLTAN2_MACHINE_DRAGONFLY) 82 const Teuchos::ParameterList &pl) :
133 pcoord_t *xyz)
const {
142 pcoord_t *xyz)
const {
162 inline bool getHopCount(
int rank1,
int rank2, pcoord_t &hops)
const {
200 pl.set(
"Machine_Optimization_Level", 10,
201 "Machine Coordinate Transformation Method",
205 RCP<Teuchos::FileNameValidator> file_not_required_validator =
206 Teuchos::rcp(
new Teuchos::FileNameValidator(
false) );
209 pl.set(
"Input_RCA_Machine_Coords",
"",
210 "Input File for input machine coordinates",
211 file_not_required_validator);
A Machine Class for testing only A more realistic machine should be used for task mapping...
Created by mbenlioglu on Aug 31, 2020.
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 ...
bool getHopCount(int rank1, int rank2, pcoord_t &hops) const
return the hop count between rank1 and rank2
static void getValidParameters(Teuchos::ParameterList &pl)
Set up validators specific to this Problem.
virtual part_t getNumUniqueGroups() const
getNumUniqueGroups function return the number of unique Dragonfly network groups in provided allocati...
bool getMachineCoordinate(const int rank, pcoord_t *xyz) const
getCoordinate function set the machine coordinate xyz of any rank process return true if coordinates ...
A Dragonfly (e.g. Cori, Trinity, Theta) Machine Class for testing only. A more realistic machine shou...
A TopoManager Machine Class (Torus Networks) for testing only A more realistic machine should be used...
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) ...
MachineRepresentation(const Teuchos::Comm< int > &comm, const Teuchos::ParameterList &pl)
int getMachineDim() const
MachineRepresentation(const Teuchos::Comm< int > &comm)
Constructor MachineRepresentation Class.
bool getMyMachineCoordinate(pcoord_t *xyz) const
getMyCoordinate function set the machine coordinate xyz of the current process return true if current...
bool hasMachineCoordinates() const
A TopoManager Machine Class on Torus Networks.
SparseMatrixAdapter_t::part_t part_t
bool getMachineExtent(int *nxyz) const
bool getMachineExtentWrapArounds(bool *wrap_around) const
if the machine has a wrap-around tourus link in each dimension.
int getMachineDim() const
returns the dimension (number of coords per node) in the machine
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
static RCP< Teuchos::AnyNumberParameterEntryValidator > getAnyIntValidator()
Exists to make setting up validators less cluttered.
MachineRepresentation Class Base class for representing machine coordinates, networks, etc.
bool getMachineCoordinate(const int rank, pcoord_t *xyz)
Defines the Environment class.
bool getMachineExtent(int *nxyz) const
sets the number of unique coordinates in each machine dimension
pcoord_t machine_pcoord_t
int getNumRanks() const
return the number of ranks.
int getNumRanks() const
getNumRanks function return the number of ranks.
MachineForTesting< pcoord_t, part_t > machine_t
An RCA Machine Class (Torus Networks) for testing only A more realistic machine should be used for ta...
bool getMachineExtentWrapArounds(bool *wrap_around) const
if the machine has a wrap-around tourus link in each dimension. return true if the information is ava...
bool getMyMachineCoordinate(pcoord_t *xyz)
An RCA Machine class on Torus Networks.
bool getMachineCoordinate(const char *nodename, pcoord_t *xyz) const
getCoordinate function set the machine coordinate xyz of any node by nodename return true if coordina...
bool getGroupCount(part_t *grp_count) const
return the number of ranks in each group (RCA X-dim, e.g. first dim)
bool hasMachineCoordinates() const
indicates whether or not the machine has coordinates
part_t getNumUniqueGroups() const
getNumUniqueGroups function return the number of unique Dragonfly network groups in provided allocati...
A Dragonfly (e.g. Cori, Trinity, & Theta) Machine Class for task mapping.
bool getAllMachineCoordinatesView(pcoord_t **&allCoords) const