forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Labels
RefactorRefactor ABACUS codesRefactor ABACUS codes
Description
Describe the Code Quality Issue
- Now the interfaces of standard/generalized eig driver, i.e. {he,sy}ev[d,r,x] & {he,sy}gv[d,r,x] are used in
HSolverto solve dense eigenvalue & eigenvector problem. - In
HSolver, iteration methods (CG, Davidson, etc.) use these LAPACK routines encapsulated in the filehegvd_op.h. - Now that
lapackConnectorhas been moved to a uniform interface insource/source_base/module_container/base/third_party/lapack.h, high-level interfaces are supposed to be placed insource/source_base/module_container/ATen/kernels/lapack.h. And the hegvd_op should be moved there.
Note
- The original interfaces in (including
lapack_heevdandlapack_hegvddefined insource/source_base/module_container/base/third_party/lapack.h, never referenced) does not support different order of the matrices and leading dimension, which is essential. Therefore, they will also be refactored.
Uniform design of work memory
The original LAPACK routine will destroy/overwrite input matrix A and B.
There are now two ways to resolve this:
- To manually recover the inut matrix memory after calling LAPACK routines. (as Dav_Subspace does)
- To use an inner auxiliary memory block to store the INPUT MATRIX as referred by LAPACK. (as Davidson does)
The latter is preferred, and after this refactoring it should be unified to this one.
Metadata
Metadata
Assignees
Labels
RefactorRefactor ABACUS codesRefactor ABACUS codes