You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been working on a Python code to determine the solution of the Kohn-Sham Equations, which requires Self-Consistent Field (SCF) iteration routines. The code is based on QuantumESPRESSO's PWscf module, which uses Classical Davidson Method to determine the eigenstates. And I have used PRIMME eigsh()'s PRIMME_GD_plusK method for the same.
On analyzing the performance of my code, I have noticed that a lot more calls were made to matrixMatvec functions. The difference, I believe, is due to the way each code determines convergence. While PRIMME uses the 2-norm of the residual, the QE code uses the difference in the eigenvalues calculated between iterations.
I think the reason behind this convergence criteria is motivated by the following reasons:
As this is an SCF iteration, the accuracy of the eigenvectors for the first few iterations may not be as important.
The vector elements are Fourier components, while the SCF calculation's convergence involves comparing input and output quantities in real-grid. So, the 2-norm may not be an accurate measure of the error in this application.
I do not see a way to construct a convTest to implement this from the documentation. It requires knowing which eigenpair is being checked for convergence, which is not available in any interfaces. Although it may be possible to implement convTest with associated memory and logic to infer which eigenpair from the input, the implementation would not be clean or reliable, especially for degenerate states.
I would like to know your thoughts regarding the discrepancy in performance observed here and the feasibility of the solution proposed above.
The text was updated successfully, but these errors were encountered:
I have been working on a Python code to determine the solution of the Kohn-Sham Equations, which requires Self-Consistent Field (SCF) iteration routines. The code is based on QuantumESPRESSO's PWscf module, which uses Classical Davidson Method to determine the eigenstates. And I have used PRIMME
eigsh()
'sPRIMME_GD_plusK
method for the same.On analyzing the performance of my code, I have noticed that a lot more calls were made to
matrixMatvec
functions. The difference, I believe, is due to the way each code determines convergence. While PRIMME uses the 2-norm of the residual, the QE code uses the difference in the eigenvalues calculated between iterations.I think the reason behind this convergence criteria is motivated by the following reasons:
I do not see a way to construct a
convTest
to implement this from the documentation. It requires knowing which eigenpair is being checked for convergence, which is not available in any interfaces. Although it may be possible to implementconvTest
with associated memory and logic to infer which eigenpair from the input, the implementation would not be clean or reliable, especially for degenerate states.I would like to know your thoughts regarding the discrepancy in performance observed here and the feasibility of the solution proposed above.
The text was updated successfully, but these errors were encountered: