Zoltan2
Toggle main menu visibility
Loading...
Searching...
No Matches
Zoltan2_Machine.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Zoltan2: A package of combinatorial algorithms for scientific computing
4
//
5
// Copyright 2012 NTESS and the Zoltan2 contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef _ZOLTAN2_MACHINE_HPP_
11
#define _ZOLTAN2_MACHINE_HPP_
12
13
#include <Teuchos_Comm.hpp>
14
#include <Zoltan2_config.h>
15
namespace
Zoltan2
{
16
20
template
<
typename
pcoord_t,
typename
part_t>
21
class
Machine
{
22
23
protected
:
24
int
numRanks
;
25
int
myRank
;
26
27
public
:
31
32
Machine
(
const
Teuchos::Comm<int> &comm) :
33
numRanks
(comm.getSize()),
myRank
(comm.getRank())
34
{ }
35
36
virtual
~Machine
(){ }
37
40
bool
hasMachineCoordinates
()
const
{
41
return
false
;
// Coordinates not available in this machine
42
}
43
46
int
getMachineDim
()
const
{
47
return
0;
// Coordinates not available in this machine
48
}
49
53
bool
getMachineExtent
(
int
*nxyz)
const
{
54
return
false
;
// Extent not available in this machine
55
}
56
60
bool
getMachineExtentWrapArounds
(
bool
*wrap_around)
const
{
61
return
false
;
// Extent not available in this machine
62
}
63
68
bool
getMyMachineCoordinate
(pcoord_t *xyz)
const
{
69
return
false
;
// Coordinates not available in this machine
70
}
71
76
bool
getMachineCoordinate
(
const
int
rank, pcoord_t *xyz)
const
{
77
return
false
;
// Coordinates not available by rank
78
}
79
84
bool
getMachineCoordinate
(
const
char
*nodename, pcoord_t *xyz)
const
{
85
return
false
;
// Coordinates not available by nodename
86
}
87
94
bool
getAllMachineCoordinatesView
(pcoord_t **allCoords)
const
{
95
return
false
;
// Coordinates not available in this machine
96
}
97
101
int
getNumRanks
()
const
{
return
numRanks
; }
102
107
virtual
bool
getHopCount
(
int
rank1,
int
rank2, pcoord_t &hops)
const
{
108
return
false
;
109
}
110
118
virtual
part_t
getNumUniqueGroups
()
const
{
119
return
1;
120
}
121
137
virtual
bool
getGroupCount
(
part_t
*grp_count)
const
{
138
return
false
;
139
}
140
141
// KDD TODO: Add Graph interface and methods supporting full LDMS interface.
142
143
};
144
}
145
#endif
Zoltan2::Machine::getAllMachineCoordinatesView
bool getAllMachineCoordinatesView(pcoord_t **allCoords) const
getProcDim function set the coordinates of all ranks allCoords[i][j], i=0,...,getMachineDim(),...
Definition
Zoltan2_Machine.hpp:94
Zoltan2::Machine::getNumUniqueGroups
virtual part_t getNumUniqueGroups() const
getNumUniqueGroups function return the number of unique Dragonfly network groups in provided allocati...
Definition
Zoltan2_Machine.hpp:118
Zoltan2::Machine::getMyMachineCoordinate
bool getMyMachineCoordinate(pcoord_t *xyz) const
getMyCoordinate function set the machine coordinate xyz of the current process return true if current...
Definition
Zoltan2_Machine.hpp:68
Zoltan2::Machine::getMachineCoordinate
bool getMachineCoordinate(const int rank, pcoord_t *xyz) const
getCoordinate function set the machine coordinate xyz of any rank process return true if coordinates ...
Definition
Zoltan2_Machine.hpp:76
Zoltan2::Machine::getGroupCount
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)
Definition
Zoltan2_Machine.hpp:137
Zoltan2::Machine::getMachineExtent
bool getMachineExtent(int *nxyz) const
sets the number of unique coordinates in each machine dimension return true if coordinates are availa...
Definition
Zoltan2_Machine.hpp:53
Zoltan2::Machine::Machine
Machine(const Teuchos::Comm< int > &comm)
Constructor MachineRepresentation Class.
Definition
Zoltan2_Machine.hpp:32
Zoltan2::Machine::myRank
int myRank
Definition
Zoltan2_Machine.hpp:25
Zoltan2::Machine::getNumRanks
int getNumRanks() const
getNumRanks function return the number of ranks.
Definition
Zoltan2_Machine.hpp:101
Zoltan2::Machine::getMachineDim
int getMachineDim() const
returns the dimension (number of coords per node) in the machine
Definition
Zoltan2_Machine.hpp:46
Zoltan2::Machine::getMachineExtentWrapArounds
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...
Definition
Zoltan2_Machine.hpp:60
Zoltan2::Machine::numRanks
int numRanks
Definition
Zoltan2_Machine.hpp:24
Zoltan2::Machine::~Machine
virtual ~Machine()
Definition
Zoltan2_Machine.hpp:36
Zoltan2::Machine::hasMachineCoordinates
bool hasMachineCoordinates() const
indicates whether or not the machine has coordinates
Definition
Zoltan2_Machine.hpp:40
Zoltan2::Machine::getMachineCoordinate
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...
Definition
Zoltan2_Machine.hpp:84
Zoltan2::Machine::getHopCount
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
Definition
Zoltan2_Machine.hpp:107
Zoltan2
Created by mbenlioglu on Aug 31, 2020.
Definition
Zoltan2_AlgHybrid2GL.hpp:47
Zoltan2::part_t
core
src
environment
Zoltan2_Machine.hpp
Generated by
1.17.0