Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions source/source_hsolver/diago_lapack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void DiagoLapack<std::complex<double>>::diag(hamilt::Hamilt<std::complex<double>
Real* eigenvalue_in,
MPI_Comm& comm)
{
ModuleBase::TITLE("DiagoScalapack", "diag_pool");
ModuleBase::TITLE("DiagoLapack", "diag_pool");
assert(h_mat.col == s_mat.col && h_mat.row == s_mat.row && h_mat.desc == s_mat.desc);
std::vector<double> eigen(PARAM.globalv.nlocal, 0.0);
this->dsygvx_diag(h_mat.col, h_mat.row, h_mat.p, s_mat.p, eigen.data(), psi);
Expand All @@ -72,7 +72,7 @@ void DiagoLapack<std::complex<double>>::diag(hamilt::Hamilt<std::complex<double>
Real* eigenvalue_in,
MPI_Comm& comm)
{
ModuleBase::TITLE("DiagoScalapack", "diag_pool");
ModuleBase::TITLE("DiagoLapack", "diag_pool");
assert(h_mat.col == s_mat.col && h_mat.row == s_mat.row && h_mat.desc == s_mat.desc);
std::vector<double> eigen(PARAM.globalv.nlocal, 0.0);
this->zhegvx_diag(h_mat.col, h_mat.row, h_mat.p, s_mat.p, eigen.data(), psi);
Expand Down Expand Up @@ -207,9 +207,7 @@ std::pair<int, std::vector<int>> DiagoLapack<T>::zhegvx_once(const int ncol,
const int itype = 1, il = 1, iu = PARAM.inp.nbands, one = 1;
int M = 0, NZ = 0, lwork = -1, lrwork = -1, liwork = -1, info = 0;
const double abstol = 0, orfac = -1;
//Note: pzhegvx_ has a bug
// We must give vl,vu a value, although we do not use range 'V'
// We must give rwork at least a memory of sizeof(double) * 3

const double vl = 0, vu = 0;
std::vector<std::complex<double>> work(1, 0);
std::vector<double> rwork(3, 0);
Expand Down
7 changes: 6 additions & 1 deletion source/source_hsolver/hsolver_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void HSolverLCAO<TK, Device>::solve(hamilt::Hamilt<TK>* pHamilt,
}else
#endif
if (PARAM.globalv.kpar_lcao > 1
&& (this->method == "genelpa" || this->method == "elpa" || this->method == "scalapack_gvx"))
&& (this->method == "genelpa" || this->method == "elpa" || this->method == "scalapack_gvx" || this->method == "lapack"))
{
this->parakSolve(pHamilt, psi, pes, PARAM.globalv.kpar_lcao);
} else
Expand Down Expand Up @@ -254,6 +254,11 @@ void HSolverLCAO<T, Device>::parakSolve(hamilt::Hamilt<T>* pHamilt,
DiagoScalapack<T> sa;
sa.diag_pool(hk_pool, sk_pool, psi_pool, &(pes->ekb(ik_global, 0)), k2d.POOL_WORLD_K2D);
}
else if (this->method == "lapack")
{
DiagoLapack<T> la;
la.diag_pool(hk_pool, sk_pool, psi_pool, &(pes->ekb(ik_global, 0)), k2d.POOL_WORLD_K2D);
}
#ifdef __ELPA
else if (this->method == "genelpa")
{
Expand Down
Loading