Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: A different convTest #57

Open
lightpeak008 opened this issue Jan 7, 2022 · 0 comments
Open

Feature Request: A different convTest #57

lightpeak008 opened this issue Jan 7, 2022 · 0 comments

Comments

@lightpeak008
Copy link

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:

  1. As this is an SCF iteration, the accuracy of the eigenvectors for the first few iterations may not be as important.
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant