ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
para_diag_world.h
Go to the documentation of this file.
1#ifndef PARA_DIAG_WORLD_H
2#define PARA_DIAG_WORLD_H
3
4#include "para_world.h"
5
6namespace Parallel
7{
8
19{
20public:
25
26#ifdef __MPI
33 ParaDiagWorld(const MPI_Comm& comm, int dcolor);
34#endif
35
37 int dcolor() const { return dcolor_; }
38
40 int drank() const { return rank(); }
41
43 int dsize() const { return size(); }
44
45private:
46 int dcolor_ = 0;
47};
48
49} // namespace Parallel
50
51#endif // PARA_DIAG_WORLD_H
int dcolor() const
Color used in MPI_Comm_split to create this diag group.
Definition para_diag_world.h:37
int dsize() const
Number of processes in the diag group (alias for size()).
Definition para_diag_world.h:43
ParaDiagWorld()
Construct a serial diag domain (single-process group).
Definition para_diag_world.cpp:6
int dcolor_
Definition para_diag_world.h:46
int drank() const
Rank within the diag group (alias for rank()).
Definition para_diag_world.h:40
MPI_Comm comm() const
Underlying MPI communicator (MPI builds only).
Definition para_world.h:60
int rank() const
Rank of this process inside the domain (0 in serial builds).
Definition para_world.h:39
ParaWorld(const std::string &tag)
Construct a serial (single-process) domain.
Definition para_world.cpp:6
int size() const
Number of processes in the domain (1 in serial builds).
Definition para_world.h:45
Definition para_band_output.cpp:11