SIRIUS 7.5.0
Electronic structure library and applications
Public Member Functions | Protected Attributes | List of all members
sirius::la::Eigensolver Class Reference

Interface to different eigen-solvers. More...

#include <eigensolver.hpp>

Inherited by sirius::la::Eigensolver_cuda, sirius::la::Eigensolver_dlaf, sirius::la::Eigensolver_elpa, sirius::la::Eigensolver_lapack, sirius::la::Eigensolver_magma, sirius::la::Eigensolver_magma_gpu, and sirius::la::Eigensolver_scalapack.

Public Member Functions

 Eigensolver (ev_solver_t type__, bool is_parallel__, sddk::memory_t host_memory_t__, sddk::memory_t data_memory_t__)
 Constructor. More...
 
virtual ~Eigensolver ()
 Destructor. More...
 
virtual int solve (ftn_int matrix_size__, dmatrix< double > &A__, double *eval__, dmatrix< double > &Z__)
 Solve a standard eigen-value problem for all eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, dmatrix< std::complex< double > > &A__, double *eval__, dmatrix< std::complex< double > > &Z__)
 Solve a standard eigen-value problem for all eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, dmatrix< float > &A__, float *eval__, dmatrix< float > &Z__)
 Solve a standard eigen-value problem for all eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, dmatrix< std::complex< float > > &A__, float *eval__, dmatrix< std::complex< float > > &Z__)
 Solve a standard eigen-value problem for all eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, ftn_int nev__, dmatrix< double > &A__, double *eval__, dmatrix< double > &Z__)
 Solve a standard eigen-value problem of a sub-matrix for N lowest eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, ftn_int nev__, dmatrix< std::complex< double > > &A__, double *eval__, dmatrix< std::complex< double > > &Z__)
 Solve a standard eigen-value problem of a sub-matrix for N lowest eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, ftn_int nev__, dmatrix< float > &A__, float *eval__, dmatrix< float > &Z__)
 Solve a standard eigen-value problem of a sub-matrix for N lowest eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, ftn_int nev__, dmatrix< std::complex< float > > &A__, float *eval__, dmatrix< std::complex< float > > &Z__)
 Solve a standard eigen-value problem of a sub-matrix for N lowest eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, dmatrix< double > &A__, dmatrix< double > &B__, double *eval__, dmatrix< double > &Z__)
 Solve a generalized eigen-value problem for all eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, dmatrix< std::complex< double > > &A__, dmatrix< std::complex< double > > &B__, double *eval__, dmatrix< std::complex< double > > &Z__)
 Solve a generalized eigen-value problem for all eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, dmatrix< float > &A__, dmatrix< float > &B__, float *eval__, dmatrix< float > &Z__)
 Solve a generalized eigen-value problem for all eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, dmatrix< std::complex< float > > &A__, dmatrix< std::complex< float > > &B__, float *eval__, dmatrix< std::complex< float > > &Z__)
 Solve a generalized eigen-value problem for all eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, ftn_int nev__, dmatrix< double > &A__, dmatrix< double > &B__, double *eval__, dmatrix< double > &Z__)
 Solve a generalized eigen-value problem for N lowest eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, ftn_int nev__, dmatrix< std::complex< double > > &A__, dmatrix< std::complex< double > > &B__, double *eval__, dmatrix< std::complex< double > > &Z__)
 Solve a generalized eigen-value problem for N lowest eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, ftn_int nev__, dmatrix< float > &A__, dmatrix< float > &B__, float *eval__, dmatrix< float > &Z__)
 Solve a generalized eigen-value problem for N lowest eigen-pairs. More...
 
virtual int solve (ftn_int matrix_size__, ftn_int nev__, dmatrix< std::complex< float > > &A__, dmatrix< std::complex< float > > &B__, float *eval__, dmatrix< std::complex< float > > &Z__)
 Solve a generalized eigen-value problem for N lowest eigen-pairs. More...
 
bool is_parallel () const
 Parallel or sequential solver. More...
 
sddk::memory_t host_memory_t () const
 Type of host memory, required by the solver. More...
 
sddk::memory_t data_memory_t () const
 Type of input memory for the solver. More...
 
ev_solver_t type () const
 Type of eigen-solver. More...
 

Protected Attributes

ev_solver_t ev_solver_type_
 Type of the eigen-value solver. More...
 
const std::string error_msg_not_implemented = "solver is not implemented"
 Common error message. More...
 
bool is_parallel_ {false}
 True if solver is MPI parallel. More...
 
sddk::memory_t host_memory_t_ {sddk::memory_t::none}
 Type of host memory needed for the solver. More...
 
sddk::memory_t data_memory_t_ {sddk::memory_t::none}
 Type of input data memory. More...
 

Detailed Description

Interface to different eigen-solvers.

Definition at line 80 of file eigensolver.hpp.

Constructor & Destructor Documentation

◆ Eigensolver()

sirius::la::Eigensolver::Eigensolver ( ev_solver_t  type__,
bool  is_parallel__,
sddk::memory_t  host_memory_t__,
sddk::memory_t  data_memory_t__ 
)
inline

Constructor.

Definition at line 99 of file eigensolver.hpp.

◆ ~Eigensolver()

virtual sirius::la::Eigensolver::~Eigensolver ( )
inlinevirtual

Destructor.

Definition at line 109 of file eigensolver.hpp.

Member Function Documentation

◆ solve() [1/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
dmatrix< double > &  A__,
double *  eval__,
dmatrix< double > &  Z__ 
)
inlinevirtual

Solve a standard eigen-value problem for all eigen-pairs.

Reimplemented in sirius::la::Eigensolver_lapack, sirius::la::Eigensolver_elpa, and sirius::la::Eigensolver_scalapack.

Definition at line 114 of file eigensolver.hpp.

◆ solve() [2/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
dmatrix< std::complex< double > > &  A__,
double *  eval__,
dmatrix< std::complex< double > > &  Z__ 
)
inlinevirtual

Solve a standard eigen-value problem for all eigen-pairs.

Reimplemented in sirius::la::Eigensolver_lapack, sirius::la::Eigensolver_elpa, and sirius::la::Eigensolver_scalapack.

Definition at line 121 of file eigensolver.hpp.

◆ solve() [3/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
dmatrix< float > &  A__,
float *  eval__,
dmatrix< float > &  Z__ 
)
inlinevirtual

Solve a standard eigen-value problem for all eigen-pairs.

Reimplemented in sirius::la::Eigensolver_lapack, and sirius::la::Eigensolver_scalapack.

Definition at line 129 of file eigensolver.hpp.

◆ solve() [4/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
dmatrix< std::complex< float > > &  A__,
float *  eval__,
dmatrix< std::complex< float > > &  Z__ 
)
inlinevirtual

Solve a standard eigen-value problem for all eigen-pairs.

Reimplemented in sirius::la::Eigensolver_lapack, and sirius::la::Eigensolver_scalapack.

Definition at line 136 of file eigensolver.hpp.

◆ solve() [5/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
ftn_int  nev__,
dmatrix< double > &  A__,
double *  eval__,
dmatrix< double > &  Z__ 
)
inlinevirtual

Solve a standard eigen-value problem of a sub-matrix for N lowest eigen-pairs.

Reimplemented in sirius::la::Eigensolver_lapack, sirius::la::Eigensolver_elpa, and sirius::la::Eigensolver_scalapack.

Definition at line 144 of file eigensolver.hpp.

◆ solve() [6/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
ftn_int  nev__,
dmatrix< std::complex< double > > &  A__,
double *  eval__,
dmatrix< std::complex< double > > &  Z__ 
)
inlinevirtual

Solve a standard eigen-value problem of a sub-matrix for N lowest eigen-pairs.

Reimplemented in sirius::la::Eigensolver_lapack, sirius::la::Eigensolver_elpa, and sirius::la::Eigensolver_scalapack.

Definition at line 151 of file eigensolver.hpp.

◆ solve() [7/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
ftn_int  nev__,
dmatrix< float > &  A__,
float *  eval__,
dmatrix< float > &  Z__ 
)
inlinevirtual

Solve a standard eigen-value problem of a sub-matrix for N lowest eigen-pairs.

Reimplemented in sirius::la::Eigensolver_lapack, and sirius::la::Eigensolver_scalapack.

Definition at line 158 of file eigensolver.hpp.

◆ solve() [8/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
ftn_int  nev__,
dmatrix< std::complex< float > > &  A__,
float *  eval__,
dmatrix< std::complex< float > > &  Z__ 
)
inlinevirtual

Solve a standard eigen-value problem of a sub-matrix for N lowest eigen-pairs.

Reimplemented in sirius::la::Eigensolver_lapack, and sirius::la::Eigensolver_scalapack.

Definition at line 165 of file eigensolver.hpp.

◆ solve() [9/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
dmatrix< double > &  A__,
dmatrix< double > &  B__,
double *  eval__,
dmatrix< double > &  Z__ 
)
inlinevirtual

Solve a generalized eigen-value problem for all eigen-pairs.

Reimplemented in sirius::la::Eigensolver_elpa, and sirius::la::Eigensolver_cuda.

Definition at line 172 of file eigensolver.hpp.

◆ solve() [10/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
dmatrix< std::complex< double > > &  A__,
dmatrix< std::complex< double > > &  B__,
double *  eval__,
dmatrix< std::complex< double > > &  Z__ 
)
inlinevirtual

Solve a generalized eigen-value problem for all eigen-pairs.

Reimplemented in sirius::la::Eigensolver_elpa, and sirius::la::Eigensolver_cuda.

Definition at line 180 of file eigensolver.hpp.

◆ solve() [11/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
dmatrix< float > &  A__,
dmatrix< float > &  B__,
float *  eval__,
dmatrix< float > &  Z__ 
)
inlinevirtual

Solve a generalized eigen-value problem for all eigen-pairs.

Reimplemented in sirius::la::Eigensolver_cuda.

Definition at line 188 of file eigensolver.hpp.

◆ solve() [12/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
dmatrix< std::complex< float > > &  A__,
dmatrix< std::complex< float > > &  B__,
float *  eval__,
dmatrix< std::complex< float > > &  Z__ 
)
inlinevirtual

Solve a generalized eigen-value problem for all eigen-pairs.

Reimplemented in sirius::la::Eigensolver_cuda.

Definition at line 196 of file eigensolver.hpp.

◆ solve() [13/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
ftn_int  nev__,
dmatrix< double > &  A__,
dmatrix< double > &  B__,
double *  eval__,
dmatrix< double > &  Z__ 
)
inlinevirtual

Solve a generalized eigen-value problem for N lowest eigen-pairs.

Reimplemented in sirius::la::Eigensolver_lapack, sirius::la::Eigensolver_elpa, and sirius::la::Eigensolver_scalapack.

Definition at line 204 of file eigensolver.hpp.

◆ solve() [14/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
ftn_int  nev__,
dmatrix< std::complex< double > > &  A__,
dmatrix< std::complex< double > > &  B__,
double *  eval__,
dmatrix< std::complex< double > > &  Z__ 
)
inlinevirtual

Solve a generalized eigen-value problem for N lowest eigen-pairs.

Reimplemented in sirius::la::Eigensolver_lapack, sirius::la::Eigensolver_elpa, and sirius::la::Eigensolver_scalapack.

Definition at line 212 of file eigensolver.hpp.

◆ solve() [15/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
ftn_int  nev__,
dmatrix< float > &  A__,
dmatrix< float > &  B__,
float *  eval__,
dmatrix< float > &  Z__ 
)
inlinevirtual

Solve a generalized eigen-value problem for N lowest eigen-pairs.

Reimplemented in sirius::la::Eigensolver_lapack, and sirius::la::Eigensolver_scalapack.

Definition at line 220 of file eigensolver.hpp.

◆ solve() [16/16]

virtual int sirius::la::Eigensolver::solve ( ftn_int  matrix_size__,
ftn_int  nev__,
dmatrix< std::complex< float > > &  A__,
dmatrix< std::complex< float > > &  B__,
float *  eval__,
dmatrix< std::complex< float > > &  Z__ 
)
inlinevirtual

Solve a generalized eigen-value problem for N lowest eigen-pairs.

Reimplemented in sirius::la::Eigensolver_lapack, and sirius::la::Eigensolver_scalapack.

Definition at line 228 of file eigensolver.hpp.

◆ is_parallel()

bool sirius::la::Eigensolver::is_parallel ( ) const
inline

Parallel or sequential solver.

Definition at line 236 of file eigensolver.hpp.

◆ host_memory_t()

sddk::memory_t sirius::la::Eigensolver::host_memory_t ( ) const
inline

Type of host memory, required by the solver.

Definition at line 242 of file eigensolver.hpp.

◆ data_memory_t()

sddk::memory_t sirius::la::Eigensolver::data_memory_t ( ) const
inline

Type of input memory for the solver.

Definition at line 248 of file eigensolver.hpp.

◆ type()

ev_solver_t sirius::la::Eigensolver::type ( ) const
inline

Type of eigen-solver.

Definition at line 254 of file eigensolver.hpp.

Member Data Documentation

◆ ev_solver_type_

ev_solver_t sirius::la::Eigensolver::ev_solver_type_
protected

Type of the eigen-value solver.

Definition at line 84 of file eigensolver.hpp.

◆ error_msg_not_implemented

const std::string sirius::la::Eigensolver::error_msg_not_implemented = "solver is not implemented"
protected

Common error message.

Definition at line 86 of file eigensolver.hpp.

◆ is_parallel_

bool sirius::la::Eigensolver::is_parallel_ {false}
protected

True if solver is MPI parallel.

Definition at line 88 of file eigensolver.hpp.

◆ host_memory_t_

sddk::memory_t sirius::la::Eigensolver::host_memory_t_ {sddk::memory_t::none}
protected

Type of host memory needed for the solver.

Some solvers, for example MAGMA, require host pilnned memory.

Definition at line 91 of file eigensolver.hpp.

◆ data_memory_t_

sddk::memory_t sirius::la::Eigensolver::data_memory_t_ {sddk::memory_t::none}
protected

Type of input data memory.

CPU solvers start from host memory, MAGMA can start from host or device memory, cuSolver starts from device memory.

Definition at line 95 of file eigensolver.hpp.


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