ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
diag_comm_info.h
Go to the documentation of this file.
1#ifndef DIAG_COMM
2#define DIAG_COMM
3
4#ifdef __MPI
5#include "mpi.h"
6#endif
7
8namespace hsolver
9{
10
12{
13
14 const int rank;
15 const int nproc;
16
17#ifndef __MPI
18 diag_comm_info(const int rank_in, const int nproc_in) : rank(rank_in), nproc(nproc_in)
19 {
20 }
21#else
22 const MPI_Comm comm;
23 diag_comm_info(const MPI_Comm& comm_in, const int rank_in, const int nproc_in)
24 : comm(comm_in), rank(rank_in), nproc(nproc_in)
25 {
26 }
27#endif
28};
29
30} // namespace hsolver
31
32#endif
Definition diag_comm_info.h:9
Definition diag_comm_info.h:12
const int rank
Definition diag_comm_info.h:14
diag_comm_info(const MPI_Comm &comm_in, const int rank_in, const int nproc_in)
Definition diag_comm_info.h:23
const int nproc
Definition diag_comm_info.h:15
const MPI_Comm comm
Definition diag_comm_info.h:22