ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Parallel::ParaDiagWorld Class Reference

diag parallel domain: diagonalization group topology. More...

#include <para_diag_world.h>

Inheritance diagram for Parallel::ParaDiagWorld:
Collaboration diagram for Parallel::ParaDiagWorld:

Public Member Functions

 ParaDiagWorld ()
 Construct a serial diag domain (single-process group).
 ParaDiagWorld (const MPI_Comm &comm, int dcolor)
 Construct a diag domain from an existing communicator.
int dcolor () const
 Color used in MPI_Comm_split to create this diag group.
int drank () const
 Rank within the diag group (alias for rank()).
int dsize () const
 Number of processes in the diag group (alias for size()).
Public Member Functions inherited from Parallel::ParaWorld
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).

Private Attributes

int dcolor_ = 0

Additional Inherited Members

Static Public Member Functions inherited from Parallel::ParaWorld
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)
Protected Member Functions inherited from Parallel::ParaWorld
 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.

Detailed Description

diag parallel domain: diagonalization group topology.

Self-contained replacement for DIAG_WORLD + GlobalV::DRANK/DSIZE/DCOLOR. The diag domain is created by splitting MPI_COMM_WORLD into groups for parallel diagonalization (PEXSI, ScaLAPACK).

Tests only need this header; no parallel_comm.h or parallel_global.h.

Constructor & Destructor Documentation

◆ ParaDiagWorld() [1/2]

Parallel::ParaDiagWorld::ParaDiagWorld ( )

Construct a serial diag domain (single-process group).

Here is the call graph for this function:

◆ ParaDiagWorld() [2/2]

Parallel::ParaDiagWorld::ParaDiagWorld ( const MPI_Comm & comm,
int dcolor )

Construct a diag domain from an existing communicator.

Parameters
[in]commdiag communicator (e.g. DIAG_WORLD)
[in]dcolorcolor used in MPI_Comm_split to create this group
Here is the call graph for this function:

Member Function Documentation

◆ dcolor()

int Parallel::ParaDiagWorld::dcolor ( ) const
inline

Color used in MPI_Comm_split to create this diag group.

Here is the caller graph for this function:

◆ drank()

int Parallel::ParaDiagWorld::drank ( ) const
inline

Rank within the diag group (alias for rank()).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dsize()

int Parallel::ParaDiagWorld::dsize ( ) const
inline

Number of processes in the diag group (alias for size()).

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ dcolor_

int Parallel::ParaDiagWorld::dcolor_ = 0
private

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