Commit 5451b70
Fix(hsolver): sync d_eigenvalue before GPU refresh in Diago_DavSubspace (#7743)
The GPU path of Diago_DavSubspace::refresh() reads this->d_eigenvalue
which was last synchronized in cal_grad() — before diag_zhegvx()
computed the latest eigenvalues. This caused the restarted subspace
Hamiltonian to receive stale diagonal entries on GPU, leading to:
- Davidson eigenvalue oscillation and divergence
- Non-positive-definite overlap matrix
- zhegvx failure and zeroed wavefunctions
The CPU path already used the up-to-date eigenvalue_in_hsolver argument.
Fix the GPU path to re-sync d_eigenvalue from eigenvalue_in_hsolver.
Bug introduced by 8f7d319 (PR #6493).
Co-authored-by: dyzheng <zhengdy@bjaisi.com>1 parent 2c6ce39 commit 5451b70
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
795 | 795 | | |
796 | 796 | | |
797 | 797 | | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
798 | 801 | | |
799 | 802 | | |
800 | 803 | | |
| |||
0 commit comments