Search Results
Documentation
A 2D processor grid.
ProcGrid attempts to create a near optimal 2D grid of P processes for an MxN grid of tiles. The size of the grid is optimized such that the total communication time required for SUMMA and the number of unused processes is minimized. The total communication time of SUMMA is given by:
where is the number of process rows;
,
, and
are the number of tile rows and columns in a matrix product with average tiles sizes of
,
, and
, respectively;
is the number or available processes;
is the message latency; and
is the message data rate. If we evaluate
and assume that
, the expression simplifies to:
where the positive, real root of give the optimal optimal communication time.
Definition at line 58 of file proc_grid.h.
Public Types | |
typedef uint_fast32_t size_type | |
Public Member Functions | |
ProcGrid () | |
Default constructor. More... | |
ProcGrid (World &world, const size_type rows, const size_type cols, const std::size_t row_size, const std::size_t col_size) | |
Construct a process grid. More... | |
ProcGrid (const ProcGrid &other) | |
Copy constructor. More... | |
ProcGrid & operator= (const ProcGrid &other) | |
Copy assignment operator. More... | |
size_type rows () const | |
Element row count accessor. More... | |
size_type cols () const | |
Element column count accessor. More... | |
size_type size () const | |
Element count accessor. More... | |
size_type local_rows () const | |
Local element row count accessor. More... | |
size_type local_cols () const | |
Local element column count accessor. More... | |
size_type local_size () const | |
Local element count accessor. More... | |
ProcessID rank_row () const | |
Rank row accessor. More... | |
ProcessID rank_col () const | |
Rank row accessor. More... | |
size_type proc_rows () const | |
Process row count accessor. More... | |
size_type proc_cols () const | |
Process column count accessor. More... | |
size_type proc_size () const | |
Process grid size accessor. More... | |
madness::Group make_row_group (const madness::DistributedID &did) const | |
Construct a row group. More... | |
madness::Group make_col_group (const madness::DistributedID &did) const | |
Construct a column group. More... | |
ProcessID map_row (const size_type row) const | |
Map a row to the process in this process's column. More... | |
ProcessID map_col (const size_type col) const | |
Map a column to the process in this process's row. More... | |
std::shared_ptr< Pmap > make_pmap () const | |
Construct a cyclic process. More... | |
std::shared_ptr< Pmap > make_col_phase_pmap (const size_type rows) const | |
Construct column phased a cyclic process. More... | |
std::shared_ptr< Pmap > make_row_phase_pmap (const size_type cols) const | |
Construct row phased a cyclic process. More... | |
Member Typedef Documentation
◆ size_type
typedef uint_fast32_t TiledArray::detail::ProcGrid::size_type |
Definition at line 60 of file proc_grid.h.
Constructor & Destructor Documentation
◆ ProcGrid() [1/3]
|
inline |
◆ ProcGrid() [2/3]
|
inline |
Construct a process grid.
- Parameters
-
world The world where the process grid will live rows The number of tile rows cols The number of tile columns row_size The number of element rows col_size The number of element columns
Definition at line 277 of file proc_grid.h.
◆ ProcGrid() [3/3]
|
inline |
Copy constructor.
- Parameters
-
other The other process grid to be copied
Definition at line 349 of file proc_grid.h.
Member Function Documentation
◆ cols()
|
inline |
Element column count accessor.
- Returns
- The number of element columns
Definition at line 391 of file proc_grid.h.

◆ local_cols()
|
inline |
Local element column count accessor.
- Returns
- The number of element columns
Definition at line 406 of file proc_grid.h.
◆ local_rows()
|
inline |
Local element row count accessor.
- Returns
- The number of element rows
Definition at line 401 of file proc_grid.h.
◆ local_size()
|
inline |
Local element count accessor.
- Returns
- The number of elements assigned to this process
Definition at line 411 of file proc_grid.h.
◆ make_col_group()
|
inline |
Construct a column group.
- Parameters
-
did The distributed id for the result group
- Returns
- A
Group
object that includes all processes inrank_col
Definition at line 469 of file proc_grid.h.
◆ make_col_phase_pmap()
|
inline |
Construct column phased a cyclic process.
Construct a cyclic process map where the column phase of the process matches that of this process grid.
- Parameters
-
rows The number of rows in the process map
- Returns
- Cyclic process map with matching column phase
Definition at line 528 of file proc_grid.h.


◆ make_pmap()
|
inline |
Construct a cyclic process.
Construct a cyclic process map with the same phase as the process grid.
- Returns
- Cyclic process map
Definition at line 515 of file proc_grid.h.

◆ make_row_group()
|
inline |
Construct a row group.
- Parameters
-
did The distributed id for the result group
- Returns
- A
Group
object that includes all processes inrank_row
Definition at line 443 of file proc_grid.h.
◆ make_row_phase_pmap()
|
inline |
Construct row phased a cyclic process.
Construct a cyclic process map where the column phase of the process matches that of this process grid.
- Parameters
-
cols The number of columns in the process map
- Returns
- Cyclic process map with matching column phase
Definition at line 541 of file proc_grid.h.


◆ map_col()
|
inline |
Map a column to the process in this process's row.
- Parameters
-
col The column to be mapped
- Returns
- The process the corresponds to the process coordinate
(rank_row,col)
Definition at line 506 of file proc_grid.h.
◆ map_row()
|
inline |
Map a row to the process in this process's column.
- Parameters
-
row The row to be mapped
- Returns
- The process the corresponds to the process coordinate
(row,rank_col)
Definition at line 496 of file proc_grid.h.
◆ operator=()
Copy assignment operator.
- Parameters
-
other The other process grid to be copied
Definition at line 366 of file proc_grid.h.
◆ proc_cols()
|
inline |
Process column count accessor.
- Returns
- The number of columns in the process grid
Definition at line 431 of file proc_grid.h.

◆ proc_rows()
|
inline |
Process row count accessor.
- Returns
- The number of rows in the process grid
Definition at line 426 of file proc_grid.h.

◆ proc_size()
|
inline |
Process grid size accessor.
- Returns
- The number of processes included in the process grid (may be less than the number of process in world).
Definition at line 437 of file proc_grid.h.
◆ rank_col()
|
inline |
Rank row accessor.
- Returns
- The column of this process in the process grid
Definition at line 421 of file proc_grid.h.
◆ rank_row()
|
inline |
Rank row accessor.
- Returns
- The row of this process in the process grid
Definition at line 416 of file proc_grid.h.
◆ rows()
|
inline |
Element row count accessor.
- Returns
- The number of element rows
Definition at line 386 of file proc_grid.h.

◆ size()
|
inline |
Element count accessor.
- Returns
- The total number of elements
Definition at line 396 of file proc_grid.h.
The documentation for this class was generated from the following file:
- TiledArray/proc_grid.h