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

Optimization of num_cg_steps #363

Open
sponce24 opened this issue Apr 6, 2021 · 1 comment
Open

Optimization of num_cg_steps #363

sponce24 opened this issue Apr 6, 2021 · 1 comment

Comments

@sponce24
Copy link
Contributor

sponce24 commented Apr 6, 2021

Hello,

This is a suggestions of improvement (I think I do not have the required credential to add Labels apparently, so could someone add the correct label please?).

The default value for num_cg_steps is 5 and is most likely too small for most systems.

To showcase this, here is the relative difference on the spread (i.e. value of the spread minus the converged value) on a logscale
for Si with SOC.
The x-axis is the number of iterations (by step of 10 so from 0 to 20,000 iterations).
As you can see it takes 20,000 iterations (purple points) to reach convergence (conv_tol = 1E-12) using the default value of num_cg_steps while it takes only 1320 iterations using num_cg_steps = 100 (green points):

image

The best would be to have an adaptative algorithm which makes the num_cg_steps small when the difference between the
predicted and the calculated value of the spread after a step is large and make num_cg_steps large when the difference is small.

In addition, one could add some small numerical noise to make sure that there are projections in all unexpected
directions where to move and to avoid long plateau due to high symmetry solutions.

Best,
Samuel

@giovannipizzi
Copy link
Member

Thanks @sponce24 - we should probably do some tests on some tens of systems to see if this behaviour is confirmed; in this case, we should think to change the default. Pinging @qiaojunfeng so he knows and can check the impact in his calculations.

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

No branches or pull requests

5 participants