Print the condition number every iteration. Something like:
DIIS Linear System Condition Number is: 1.e-7
If the condition number is below an arbitrary cutoff (proposal: 1e-7) additionally print the following warning:
Warning: DIIS Linear System Condition Number below threshold of 1.e-7. Examine stability and consider switching to damping for future iterations.
In my LCIIS code I actually had a switch, but from a programmer's perspective it is not clear when exactly the instability occurs. It is not as simple as a bad condition number.
My code prints the condition number.
I accumulated experience by running more calculations. It looks like instabilities occur when changes in energy are around 1e-7 or smaller. This is when I can recommend switching to damping. This is not a very common type of calculation since such tight thresholds are rarely used for solids. I used 1e-7 to evaluate small energy differences in oxides.
The round-off errors in CDIIS show up because the commutators become very small near convergence. You can see it if you read my paper about it. Several DIIS implementations that I saw actually switched to damping in this regime because the linear system gains a bad condition number.
I checked migrated DIIS/CDIIS against the old code.
I can confirm that they both work in single core and mpi cases. I noticed that the residual for CDIIS is much more susceptible to roundoff errors than conventional DIIS.
I will put small description on green web-site later today.
This is to keep track of our discussion Pavel/Sergei/Emanuel regarding possible instabilities.
Proposed course of action: I would just print warning if overlap is ill conditioned. With suggestion to switch to damping
I would just print warning if overlap is ill conditioned. With suggestion to switch to damping
On Tue, 2 Apr 2024 at 11:11, Emanuel Gull [egull@umich.edu](mailto:egull@umich.edu) wrote: Right.
Proposed course of action? Do nothing?