ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <parallel_orbitals.h>
Public Member Functions | |
Parallel_Orbitals () | |
~Parallel_Orbitals () | |
int | set_nloc_wfc_Eij (const int &N_A, std::ofstream &ofs_running, std::ofstream &ofs_warning) |
set the local size of wavefunction and Eij | |
void | set_desc_wfc_Eij (const int &nbasis, const int &nbands, const int &lld) |
set the desc[9] of the 2D-block-cyclic distribution of wavefunction and Eij | |
int | get_wfc_global_nbands () const |
int | get_wfc_global_nbasis () const |
void | set_atomic_trace (const int *iat2iwt, const int &nat, const int &nlocal) |
set row and col begin index for each atom it should be called after: | |
int | get_col_size () const |
dimension getters for 2D-block-cyclic division of Hamiltonian matrix get_col_size() : total number of columns of Hamiltonian matrix in this processor get_row_size() : total number of rows of Hamiltonian matrix in this processor get_col_size(iat) : number of columns of Hamiltonian matrix in atom iat get_row_size(iat) : number of rows of Hamiltonian matrix in atom iat | |
int | get_row_size () const |
int | get_col_size (int iat) const |
int | get_row_size (int iat) const |
int | get_nbands () const |
std::vector< int > | get_indexes_row () const |
gather global indexes of orbitals in this processor get_indexes_row() : global indexes (~NLOCAL) of rows of Hamiltonian matrix in this processor get_indexes_col() : global indexes (~NLOCAL) of columns of Hamiltonian matrix in this processor get_indexes_row(iat) : global indexes (~nw) of rows of Hamiltonian matrix in atom iat get_indexes_col(iat) : global indexes (~nw) of columns of Hamiltonian matrix in atom iat | |
std::vector< int > | get_indexes_col () const |
std::vector< int > | get_indexes_row (int iat) const |
std::vector< int > | get_indexes_col (int iat) const |
![]() | |
Parallel_2D ()=default | |
~Parallel_2D ()=default | |
Parallel_2D & | operator= (Parallel_2D &&rhs)=default |
Parallel_2D (Parallel_2D &&rhs)=default | |
int | get_row_size () const |
number of local rows | |
int | get_col_size () const |
number of local columns | |
int | get_global_row_size () const |
number of global rows | |
int | get_global_col_size () const |
number of global columns | |
int64_t | get_local_size () const |
number of local matrix elements | |
int | global2local_row (const int igr) const |
get the local index of a global index (row) | |
int | global2local_col (const int igc) const |
get the local index of a global index (col) | |
int | local2global_row (const int ilr) const |
get the global index of a local index (row) | |
int | local2global_col (const int ilc) const |
get the global index of a local index (col) | |
bool | in_this_processor (const int iw1_all, const int iw2_all) const |
check whether a global index is in this process | |
int | get_block_size () const |
side length of 2d square block | |
int | init (const int mg, const int ng, const int nb, const MPI_Comm comm, bool mode=false) |
Initialize a BLACS grid with the given MPI communicator and set up the info of a block-cyclic distribution. | |
int | set (const int mg, const int ng, const int nb, const int blacs_ctxt) |
Set up the info of a block-cyclic distribution using given BLACS context. | |
MPI_Comm | comm () const |
void | set_serial (const int mg, const int ng) |
Public Attributes | |
int | ncol_bands |
int | nrow_bands |
long | nloc_wfc |
ncol_bands*nrow | |
long | nloc_Eij |
int | lastband_in_proc |
int | lastband_number |
int | nnr =1 |
int * | nlocdim |
int * | nlocstart |
int | desc_wfc [9] |
int | desc_Eij [9] |
int | desc_wfc1 [9] |
int * | loc_sizes |
int | loc_size |
int | nbands |
std::vector< int > | atom_begin_row |
std::vector< int > | atom_begin_col |
const int * | iat2iwt_ = nullptr |
![]() | |
int | blacs_ctxt = -1 |
BLACS context. | |
int | desc [9] = {} |
ScaLAPACK descriptor. | |
int | nrow = 0 |
local size (nloc = nrow * ncol) | |
int | ncol = 0 |
int64_t | nloc = 0 |
int | nb = 1 |
block size | |
int | dim0 = 0 |
number of processes in each dimension of the MPI Cartesian grid | |
int | dim1 = 0 |
int | coord [2] = {-1, -1} |
process coordinate in the BLACS grid | |
bool | is_serial = false |
whether to use the serial mode | |
Additional Inherited Members | |
![]() | |
void | _init_proc_grid (const MPI_Comm comm, const bool mode) |
void | _set_dist_info (const int mg, const int ng, const int nb) |
![]() | |
std::vector< int > | global2local_row_ |
map from global index to local index | |
std::vector< int > | global2local_col_ |
std::vector< int > | local2global_row_ |
map from local index to global index | |
std::vector< int > | local2global_col_ |
This class packs the information of 2D-block-cyclic for LCAO code: parallel distribution of basis, wavefunction and matrix.
Parallel_Orbitals::Parallel_Orbitals | ( | ) |
Parallel_Orbitals::~Parallel_Orbitals | ( | ) |
|
inline |
dimension getters for 2D-block-cyclic division of Hamiltonian matrix get_col_size() : total number of columns of Hamiltonian matrix in this processor get_row_size() : total number of rows of Hamiltonian matrix in this processor get_col_size(iat) : number of columns of Hamiltonian matrix in atom iat get_row_size(iat) : number of rows of Hamiltonian matrix in atom iat
int Parallel_Orbitals::get_col_size | ( | int | iat | ) | const |
std::vector< int > Parallel_Orbitals::get_indexes_col | ( | ) | const |
std::vector< int > Parallel_Orbitals::get_indexes_col | ( | int | iat | ) | const |
std::vector< int > Parallel_Orbitals::get_indexes_row | ( | ) | const |
gather global indexes of orbitals in this processor get_indexes_row() : global indexes (~NLOCAL) of rows of Hamiltonian matrix in this processor get_indexes_col() : global indexes (~NLOCAL) of columns of Hamiltonian matrix in this processor get_indexes_row(iat) : global indexes (~nw) of rows of Hamiltonian matrix in atom iat get_indexes_col(iat) : global indexes (~nw) of columns of Hamiltonian matrix in atom iat
std::vector< int > Parallel_Orbitals::get_indexes_row | ( | int | iat | ) | const |
int Parallel_Orbitals::get_nbands | ( | ) | const |
|
inline |
int Parallel_Orbitals::get_row_size | ( | int | iat | ) | const |
int Parallel_Orbitals::get_wfc_global_nbands | ( | ) | const |
int Parallel_Orbitals::get_wfc_global_nbasis | ( | ) | const |
void Parallel_Orbitals::set_atomic_trace | ( | const int * | iat2iwt, |
const int & | nat, | ||
const int & | nlocal | ||
) |
set row and col begin index for each atom it should be called after:
iat2iwt | : the map from atom index to global oribtal indexes |
nat | : number of atoms |
nlocal | : number of global orbitals |
void Parallel_Orbitals::set_desc_wfc_Eij | ( | const int & | nbasis, |
const int & | nbands, | ||
const int & | lld | ||
) |
set the desc[9] of the 2D-block-cyclic distribution of wavefunction and Eij
int Parallel_Orbitals::set_nloc_wfc_Eij | ( | const int & | N_A, |
std::ofstream & | ofs_running, | ||
std::ofstream & | ofs_warning | ||
) |
set the local size of wavefunction and Eij
N_A | global row size |
std::vector<int> Parallel_Orbitals::atom_begin_col |
std::vector<int> Parallel_Orbitals::atom_begin_row |
int Parallel_Orbitals::desc_Eij[9] |
int Parallel_Orbitals::desc_wfc[9] |
int Parallel_Orbitals::desc_wfc1[9] |
const int* Parallel_Orbitals::iat2iwt_ = nullptr |
int Parallel_Orbitals::lastband_in_proc |
int Parallel_Orbitals::lastband_number |
int Parallel_Orbitals::loc_size |
int* Parallel_Orbitals::loc_sizes |
int Parallel_Orbitals::nbands |
int Parallel_Orbitals::ncol_bands |
local size of bands, used for 2d wavefunction must divided on dim1 because of elpa interface
long Parallel_Orbitals::nloc_Eij |
long Parallel_Orbitals::nloc_wfc |
ncol_bands*nrow
int* Parallel_Orbitals::nlocdim |
int* Parallel_Orbitals::nlocstart |
int Parallel_Orbitals::nnr =1 |
int Parallel_Orbitals::nrow_bands |