Open Cstandardlib opened 1 month ago
I add one line in cal_elem
, which is responsible to update scc
each iter:
setmem_complex_op()(this->ctx, this->scc, 0, nbase_x * nbase_x);
This line set scc to 0. All tests on david have passed.
Tests on some examples show an overall acceleration ratio of about 1.1 to 1.2 of HSolverPW. cal_elem
has been sped up by a factor of about 2, as follows:
Now that HSolver
module is undergoing a massive refactoring, and there is a lack of systematic testing for generalized eigenvalue problems on iterative diagonalization methods, this issue will be suspended until the above issues are resolved and the module is standardized.
Details
It seems that
scc
array is allocated, maintained but not accessed by actualdiag_zhegvx
procedure of reduced basis set.In
diago_david.cpp
,scc
is updated and referenced here:This is the actual diagonalization process:
where the
dnevx_op
is a wrapper forheevx
that only solves standard eigenproblem of Hermitian matrix, and we see onlyhcc
is passed here.Note that the time complexity of calculating the
scc
variable and that of the orthogonalization of the vector set are approximately the same. If this is not intended, it will significantly Slow Down the Davidson algorithm. Ifscc
is maintained, no ortho is needed andhegvx
should be called to solve the reduced generalized eigenproblem. This is what the new dav_subspace method implemented.Have you read FAQ on the online manual http://abacus.deepmodeling.com/en/latest/community/faq.html
Task list for Issue attackers (only for developers)