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

ELPA parallel eigenvalue solver wrapper. More...

#include <elpa_solver.h>

Collaboration diagram for ELPA_Solver:

Public Member Functions

 ELPA_Solver (const bool isReal, const MPI_Comm comm, const int nev, const int narows, const int nacols, const int *desc, const bool reuse_handle_0=true)
 ELPA_Solver (const bool isReal, const MPI_Comm comm, const int nev, const int narows, const int nacols, const int *desc, const int *otherParameter)
int eigenvector (double *A, double *EigenValue, double *EigenVector)
int generalized_eigenvector (double *A, double *B, int &DecomposedState, double *EigenValue, double *EigenVector)
int eigenvector (std::complex< double > *A, double *EigenValue, std::complex< double > *EigenVector)
int generalized_eigenvector (std::complex< double > *A, std::complex< double > *B, int &DecomposedState, double *EigenValue, std::complex< double > *EigenVector)
void setLoglevel (int loglevel)
void setKernel (bool isReal, int Kernel)
void setQR (int useQR)
void outputParameters ()
void verify (double *A, double *EigenValue, double *EigenVector, double &maxRemain, double &meanRemain)
void verify (double *A, double *B, double *EigenValue, double *EigenVector, double &maxRemain, double &meanRemain)
void verify (std::complex< double > *A, double *EigenValue, std::complex< double > *EigenVector, double &maxError, double &meanError)
void verify (std::complex< double > *A, std::complex< double > *B, double *EigenValue, std::complex< double > *EigenVector, double &maxError, double &meanError)
void exit ()

Private Member Functions

int read_cpuflag ()
int read_real_kernel ()
int read_complex_kernel ()
int allocate_work ()
int decomposeRightMatrix (double *B, double *EigenValue, double *EigenVector, int &DecomposedState)
int decomposeRightMatrix (std::complex< double > *B, double *EigenValue, std::complex< double > *EigenVector, int &DecomposedState)
int composeEigenVector (int DecomposedState, double *B, double *EigenVector)
int composeEigenVector (int DecomposedState, std::complex< double > *B, std::complex< double > *EigenVector)
void timer (int myid, const char function[], const char step[], double &t0)

Private Attributes

const int CHOLESKY_CRITICAL_SIZE = 1000
bool isReal
MPI_Comm comm
int nFull
int nev
int narows
int nacols
int desc [9]
int method
int kernel_id
int cblacs_ctxt
int nblk
int lda
std::vector< double > dwork
std::vector< std::complex< double > > zwork
int myid
int nprows
int npcols
int myprow
int mypcol
int useQR
int wantDebug
int loglevel
std::ofstream logfile
int comm_f
int mpi_comm_rows
int mpi_comm_cols
int handle_id

Detailed Description

ELPA parallel eigenvalue solver wrapper.

Note
The BLACS context (desc[1]) is borrowed from the caller (typically Parallel_Blkcyclic). This class does NOT take ownership. The context must remain valid for the lifetime of this object.

Constructor & Destructor Documentation

◆ ELPA_Solver() [1/2]

ELPA_Solver::ELPA_Solver ( const bool isReal,
const MPI_Comm comm,
const int nev,
const int narows,
const int nacols,
const int * desc,
const bool reuse_handle_0 = true )
Parameters
descScaLAPACK descriptor array. desc[1] must contain a valid BLACS context created by Parallel_Blkcyclic::init() or Cblacs_gridinit(). The context must remain valid for the lifetime of this object. This class does NOT take ownership of the BLACS context.
Here is the call graph for this function:

◆ ELPA_Solver() [2/2]

ELPA_Solver::ELPA_Solver ( const bool isReal,
const MPI_Comm comm,
const int nev,
const int narows,
const int nacols,
const int * desc,
const int * otherParameter )
Here is the call graph for this function:

Member Function Documentation

◆ allocate_work()

int ELPA_Solver::allocate_work ( )
private
Here is the caller graph for this function:

◆ composeEigenVector() [1/2]

int ELPA_Solver::composeEigenVector ( int DecomposedState,
double * B,
double * EigenVector )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ composeEigenVector() [2/2]

int ELPA_Solver::composeEigenVector ( int DecomposedState,
std::complex< double > * B,
std::complex< double > * EigenVector )
private
Here is the call graph for this function:

◆ decomposeRightMatrix() [1/2]

int ELPA_Solver::decomposeRightMatrix ( double * B,
double * EigenValue,
double * EigenVector,
int & DecomposedState )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decomposeRightMatrix() [2/2]

int ELPA_Solver::decomposeRightMatrix ( std::complex< double > * B,
double * EigenValue,
std::complex< double > * EigenVector,
int & DecomposedState )
private
Here is the call graph for this function:

◆ eigenvector() [1/2]

int ELPA_Solver::eigenvector ( double * A,
double * EigenValue,
double * EigenVector )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ eigenvector() [2/2]

int ELPA_Solver::eigenvector ( std::complex< double > * A,
double * EigenValue,
std::complex< double > * EigenVector )
Here is the call graph for this function:

◆ exit()

void ELPA_Solver::exit ( )
Here is the caller graph for this function:

◆ generalized_eigenvector() [1/2]

int ELPA_Solver::generalized_eigenvector ( double * A,
double * B,
int & DecomposedState,
double * EigenValue,
double * EigenVector )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ generalized_eigenvector() [2/2]

int ELPA_Solver::generalized_eigenvector ( std::complex< double > * A,
std::complex< double > * B,
int & DecomposedState,
double * EigenValue,
std::complex< double > * EigenVector )
Here is the call graph for this function:

◆ outputParameters()

void ELPA_Solver::outputParameters ( )

◆ read_complex_kernel()

int ELPA_Solver::read_complex_kernel ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_cpuflag()

int ELPA_Solver::read_cpuflag ( )
private
Here is the caller graph for this function:

◆ read_real_kernel()

int ELPA_Solver::read_real_kernel ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setKernel()

void ELPA_Solver::setKernel ( bool isReal,
int Kernel )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLoglevel()

void ELPA_Solver::setLoglevel ( int loglevel)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setQR()

void ELPA_Solver::setQR ( int useQR)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ timer()

void ELPA_Solver::timer ( int myid,
const char function[],
const char step[],
double & t0 )
private
Here is the caller graph for this function:

◆ verify() [1/4]

void ELPA_Solver::verify ( double * A,
double * B,
double * EigenValue,
double * EigenVector,
double & maxRemain,
double & meanRemain )
Here is the call graph for this function:

◆ verify() [2/4]

void ELPA_Solver::verify ( double * A,
double * EigenValue,
double * EigenVector,
double & maxRemain,
double & meanRemain )
Here is the call graph for this function:

◆ verify() [3/4]

void ELPA_Solver::verify ( std::complex< double > * A,
double * EigenValue,
std::complex< double > * EigenVector,
double & maxError,
double & meanError )
Here is the call graph for this function:

◆ verify() [4/4]

void ELPA_Solver::verify ( std::complex< double > * A,
std::complex< double > * B,
double * EigenValue,
std::complex< double > * EigenVector,
double & maxError,
double & meanError )
Here is the call graph for this function:

Member Data Documentation

◆ cblacs_ctxt

int ELPA_Solver::cblacs_ctxt
private

◆ CHOLESKY_CRITICAL_SIZE

const int ELPA_Solver::CHOLESKY_CRITICAL_SIZE = 1000
private

◆ comm

MPI_Comm ELPA_Solver::comm
private

◆ comm_f

int ELPA_Solver::comm_f
private

◆ desc

int ELPA_Solver::desc[9]
private

◆ dwork

std::vector<double> ELPA_Solver::dwork
private

◆ handle_id

int ELPA_Solver::handle_id
private

◆ isReal

bool ELPA_Solver::isReal
private

◆ kernel_id

int ELPA_Solver::kernel_id
private

◆ lda

int ELPA_Solver::lda
private

◆ logfile

std::ofstream ELPA_Solver::logfile
private

◆ loglevel

int ELPA_Solver::loglevel
private

◆ method

int ELPA_Solver::method
private

◆ mpi_comm_cols

int ELPA_Solver::mpi_comm_cols
private

◆ mpi_comm_rows

int ELPA_Solver::mpi_comm_rows
private

◆ myid

int ELPA_Solver::myid
private

◆ mypcol

int ELPA_Solver::mypcol
private

◆ myprow

int ELPA_Solver::myprow
private

◆ nacols

int ELPA_Solver::nacols
private

◆ narows

int ELPA_Solver::narows
private

◆ nblk

int ELPA_Solver::nblk
private

◆ nev

int ELPA_Solver::nev
private

◆ nFull

int ELPA_Solver::nFull
private

◆ npcols

int ELPA_Solver::npcols
private

◆ nprows

int ELPA_Solver::nprows
private

◆ useQR

int ELPA_Solver::useQR
private

◆ wantDebug

int ELPA_Solver::wantDebug
private

◆ zwork

std::vector<std::complex<double> > ELPA_Solver::zwork
private

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