matrix parallel domain: 2D block-cyclic distribution.
More...
#include <para_matrix_world.h>
|
| | ParaMatrixWorld () |
| | Construct a serial matrix domain (1x1 process grid).
|
| | ParaMatrixWorld (const MPI_Comm &comm) |
| | Construct a matrix domain on an existing communicator.
|
| int | dim0 () const |
| | Process grid row count.
|
| int | dim1 () const |
| | Process grid column count.
|
| int | coord_row () const |
| | Row coordinate of this process in the grid.
|
| int | coord_col () const |
| | Column coordinate of this process in the grid.
|
| virtual | ~ParaWorld ()=default |
| const std::string & | tag () const |
| | Domain tag string.
|
| int | rank () const |
| | Rank of this process inside the domain (0 in serial builds).
|
| int | size () const |
| | Number of processes in the domain (1 in serial builds).
|
| bool | valid () const |
| | True if this process belongs to the domain.
|
| MPI_Comm | comm () const |
| | Underlying MPI communicator (MPI builds only).
|
|
| static ParaWorld | serial (const std::string &tag) |
| | Build a serial (size=1, rank=0) domain for the given tag.
|
| static std::unique_ptr< ParaWorld > | make_serial (const std::string &tag) |
| | Build a serial domain as a heap-allocated unique_ptr.
|
| static ParaWorld | make_mpi (const std::string &tag, const MPI_Comm &comm) |
| | Build a domain wrapping an MPI communicator.
|
| static std::unique_ptr< ParaWorld > | make_mpi_ptr (const std::string &tag, const MPI_Comm &comm) |
| | ParaWorld (const std::string &tag) |
| | Construct a serial (single-process) domain.
|
| | ParaWorld (const std::string &tag, const MPI_Comm &comm) |
| | Construct a domain wrapping an existing MPI communicator.
|
matrix parallel domain: 2D block-cyclic distribution.
Self-contained wrapper for the matrix-level parallel topology. Replaces the process-grid part of Parallel_Blkcyclic (dim0/dim1/coord) with a cleaner interface. The actual ScaLAPACK descriptor and BLACS context management stay in Parallel_Blkcyclic; this class only holds the process grid dimensions and coordinates.
Tests only need this header.
◆ ParaMatrixWorld() [1/2]
| Parallel::ParaMatrixWorld::ParaMatrixWorld |
( |
| ) |
|
Construct a serial matrix domain (1x1 process grid).
◆ ParaMatrixWorld() [2/2]
| Parallel::ParaMatrixWorld::ParaMatrixWorld |
( |
const MPI_Comm & | comm | ) |
|
Construct a matrix domain on an existing communicator.
The process grid is computed automatically: dim0 = largest divisor of nproc with dim0 >= dim1 (square-ish), dim1 = nproc / dim0.
- Parameters
-
| [in] | comm | matrix communicator (e.g. DIAG_WORLD or MPI_COMM_WORLD) |
◆ compute_proc_grid()
| void Parallel::ParaMatrixWorld::compute_proc_grid |
( |
| ) |
|
|
private |
◆ coord_col()
| int Parallel::ParaMatrixWorld::coord_col |
( |
| ) |
const |
|
inline |
Column coordinate of this process in the grid.
◆ coord_row()
| int Parallel::ParaMatrixWorld::coord_row |
( |
| ) |
const |
|
inline |
Row coordinate of this process in the grid.
◆ dim0()
| int Parallel::ParaMatrixWorld::dim0 |
( |
| ) |
const |
|
inline |
◆ dim1()
| int Parallel::ParaMatrixWorld::dim1 |
( |
| ) |
const |
|
inline |
Process grid column count.
◆ coord_col_
| int Parallel::ParaMatrixWorld::coord_col_ = 0 |
|
private |
◆ coord_row_
| int Parallel::ParaMatrixWorld::coord_row_ = 0 |
|
private |
◆ dim0_
| int Parallel::ParaMatrixWorld::dim0_ = 1 |
|
private |
◆ dim1_
| int Parallel::ParaMatrixWorld::dim1_ = 1 |
|
private |
The documentation for this class was generated from the following files:
- /home/runner/work/abacus-develop/abacus-develop/source/source_base/module_parallel/para_matrix_world.h
- /home/runner/work/abacus-develop/abacus-develop/source/source_base/module_parallel/para_matrix_world.cpp