dceresoli / qe-gipaw

QE-GIPAW for Quantum-Espresso (official repository)
GNU General Public License v2.0
30 stars 11 forks source link

Diagonalization methods mixed up? #4

Closed kangaroocry closed 5 years ago

kangaroocry commented 5 years ago

I noticed that if no diagonalization is set in the input file, the output file says isolve=0 which should mean diagonalization = 'david' since this is the standard. So far ok. However, if I explicitly set diagonalization = 'david' in the input, the output says isolve=1 and for diagonalization = 'cg' in the input, the output says isolve=0. If I'm not mistaken, this should be the other way around, shouldn't it? The respective assignment should come from gipaw_routines.f90 (line 85 ff.). So, did I overlook something or is there a problem?

dceresoli commented 5 years ago

You're right. I'm sorry for such a trivial mistake! Now it's fixed and diagonalization='david' (isolve=0) is faster w.r.t. CG

kangaroocry commented 5 years ago

Ah ok, this is why I kept getting the famous "cholesky" error although I changed diagonalization to cg. Accounting for this, now it works but, as you mentioned, is much slower. It is even slower than using david with -ndiag 1 (which also works without cholesky problems).

kangaroocry commented 5 years ago

According to the documentation the standard value for diagonalization is 'david' but actually it is 'cg'. Before the fix it was indeed effectively the case because it turned diagonalization = 'cg' wrongly to isolve = 0 but now it is turning it to isolve = 1. So either the documentation or the code is wrong, am I right?

dceresoli commented 5 years ago

Hi, yes, I had mixed up. But right now, davidson is he default. D.

On 7/5/19 1:11 PM, Daniel Pinkal wrote:

According to the documentation the standard value for |diagonalization| is |'david'| but actually it is |'cg'|. Before the fix https://github.com/dceresoli/qe-gipaw/commit/12be1bbfca280f5e20669a6b50904f4a6cc47fc4 it was indeed effectively the case because it turned |diagonalization = 'cg'| wrongly to |isolve = 0| but now it is turning it to |isolve = 1|. So either the documentation or the code is wrong, am I right?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/dceresoli/qe-gipaw/issues/4?email_source=notifications&email_token=AAC7CGCNP7WYNU5OFHIQRH3P54T7JA5CNFSM4FWENNVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZJIK6A#issuecomment-508724600, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC7CGGETPIEFECD7MXURFDP54T7JANCNFSM4FWENNVA.

--

Davide Ceresoli, PhD -- http://sites.google.com/site/dceresoli

kangaroocry commented 5 years ago

But when I write nothing at all into the input file then the output file says "isolve = 1" for version 6.4.1 while for version 6.3 it says "isolve = 0". Could this come from the following line? https://github.com/dceresoli/qe-gipaw/blob/7bbe28d3ed54eab30dd730f48c2b066d050f1599/src/gipaw_routines.f90#L61 See also: https://github.com/dceresoli/qe-gipaw/commit/e840a63af83d8f13ec58659452bb6e69437f0d0c