[gpaw-users] Wavefunction convergence problem
Marcin Dulak
Marcin.Dulak at fysik.dtu.dk
Wed Jul 16 17:56:32 CEST 2014
Hi,
On 07/16/2014 05:33 PM, Ask Hjorth Larsen wrote:
> Hi Gaël
>
> (gpaw-users re-added)
>
> I would still guess that you need at least another k-point in the
> short (periodic) directions. 1x2x2 or so.
>
> The reason why strange things work (like adding much vacuum) is
> probably that it's essentially random whether it converges.
>
> The diagonalize error is somewhat more nasty. I don't think it
> happens unless things are already somehow nasty. I wouldn't really
> know why though. Hmmm...
we definitely need your script.
Some time ago we had problems with randomly non-converging,
non-reproducible runs and davidson eigensolver crashes:
http://listserv.fysik.dtu.dk/pipermail/gpaw-users/2014-March/002605.html
I hope you don't use atlas or intel-mkl :)
We had the impression davidson has stabilized after last commits (and it
looks to me you use a rather new GPAW),
but maybe your example shows the contrary.
Best regards,
Marcin
>
> The rmm-diis or cg might avoid this particular problem though.
>
> Best regards
> Ask
>
> 2014-07-16 17:03 GMT+02:00 Gaël Donval <gael.donval at cnrs-imn.fr>:
>> Sorry, it took a while because I unfortunately had to change the slab.
>>
>> But whatever, here are all the files for a similar slab that is also
>> very hard to converge. I've not been able to perform 2 relaxation steps
>> with it: it fails giving the following error:
>>
>> Traceback (most recent call last):
>> File "submit.py", line 34, in <module>
>> relax.run(fmax=0.05, steps=50)
>> File "/u/gdonval/optpy/src/ase-svn/ase/optimize/optimize.py", line 114, in run
>> f = self.atoms.get_forces()
>> File "/u/gdonval/optpy/src/ase-svn/ase/atoms.py", line 711, in get_forces
>> forces = self._calc.get_forces(self)
>> File "/u/gdonval/optpy/src/gpaw/gpaw/aseinterface.py", line 68, in get_forces
>> force_call_to_set_positions=force_call_to_set_positions)
>> File "/u/gdonval/optpy/src/gpaw/gpaw/paw.py", line 263, in calculate
>> self.occupations):
>> File "/u/gdonval/optpy/src/gpaw/gpaw/scf.py", line 46, in run
>> wfs.eigensolver.iterate(hamiltonian, wfs)
>> File "/u/gdonval/optpy/src/gpaw/gpaw/eigensolvers/eigensolver.py", line 64, in iterate
>> e, psit_nG = self.iterate_one_k_point(hamiltonian, wfs, kpt)
>> File "/u/gdonval/optpy/src/gpaw/gpaw/eigensolvers/davidson.py", line 179, in iterate_one_k_point
>> general_diagonalize(H_2n2n, eps_2n, S_2n2n)
>> File "/u/gdonval/optpy/src/gpaw/gpaw/utilities/lapack.py", line 84, in general_diagonalize
>> raise RuntimeError('general_diagonalize error: %d' % info)
>> RuntimeError: general_diagonalize error: 575
>> GPAW CLEANUP (node 0): <type 'exceptions.RuntimeError'> occurred. Calling MPI_Abort!
>>
>>
>> This time, adding vacuum changed nothing.
>>
>> Gaël
>>
>> Le mercredi 16 juillet 2014 à 15:39 +0200, Ask Hjorth Larsen a écrit :
>>> The standard log. Actually I would recommend always attaching script + logfile.
>>>
>>> Best regards
>>> Ask
>>>
>>> 2014-07-16 15:38 GMT+02:00 Gaël Donval <gael.donval at cnrs-imn.fr>:
>>>> Le mercredi 16 juillet 2014 à 15:17 +0200, Ask Hjorth Larsen a écrit :
>>>>> Hello Gaël
>>>>>
>>>>> How about (always :)) sending the log file to check whether anything
>>>>> else might be acting up? This does not normally happen in exactly
>>>>> that way. I think.
>>>> By log file, you mean the output file or something more verbose?
>>>>
>>>>
>>>>> Best regards
>>>>> Ask
>>>>>
>>>>> 2014-07-16 15:09 GMT+02:00 Gaël Donval <gael.donval at cnrs-imn.fr>:
>>>>>> Increasing the amount of vacuum did the trick: my structure is now
>>>>>> relaxed. I thought vacuum was needed only to achieve total energy
>>>>>> convergence, it appears that it also helps for the SCF convergence.
>>>>>>
>>>>>> I'm surprised that such a large vacuum is needed. I reduced the vacuum
>>>>>> to 7A and observed a similar error oscillation after a few atomic
>>>>>> relaxation cycles which corresponded to the expansion of the slab along
>>>>>> the non periodic direction which induced a reduction of the total vacuum
>>>>>> space.
>>>>>>
>>>>>> At least the error oscillation is easy to spot.
>>>>>>
>>>>>> Thanks for your suggestions Ask.
>>>>>>
>>>>>> Gaël
>>>>>>
>>>>>> Le mercredi 16 juillet 2014 à 12:45 +0200, Gaël Donval a écrit :
>>>>>>> Nope, didn't work. The error is still oscillating. To GPAW's defense,
>>>>>>> the system is really tricky and VASP took a *lot* of iterations to reach
>>>>>>> convergence.
>>>>>>>
>>>>>>> I also tried to decrease the grid spacing to 0.12. It's very low, I
>>>>>>> know, but at least I'm sure this won't be a problem.
>>>>>>>
>>>>>>> I think I may have found the culprit. I had put 5 A of vacuum in the
>>>>>>> non-periodic direction. By raising this amount to 10 A, I could make the
>>>>>>> wavefunction converge. That's a shame that empty space is not free :)
>>>>>>>
>>>>>>> Gaël
>>>>>>>
>>>>>>> Le mercredi 16 juillet 2014 à 11:56 +0200, Ask Hjorth Larsen a écrit :
>>>>>>>> Okay. I would recommend another k point in the short direction then.
>>>>>>>> El 16/07/2014 11:55, "Gaël Donval" <gael.donval at cnrs-imn.fr> escribió:
>>>>>>>>
>>>>>>>>> Hi Ask,
>>>>>>>>>
>>>>>>>>> The smearing temperature is 0.1 eV.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Gaël
>>>>>>>>>
>>>>>>>>> Le mercredi 16 juillet 2014 à 11:46 +0200, Ask Hjorth Larsen a écrit :
>>>>>>>>>> Hi Gaël
>>>>>>>>>>
>>>>>>>>>> What is the smearing temperature?
>>>>>>>>>>
>>>>>>>>>> Best regards
>>>>>>>>>> Ask
>>>>>>>>>> El 16/07/2014 10:37, "Gaël Donval" <gael.donval at cnrs-imn.fr> escribió:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> I have generated a quite a big slab (80 atoms, time reversal symmetry
>>>>>>>>>>> only) with ASE and try to perform structure optimization on it.
>>>>>>>>>>>
>>>>>>>>>>> Unit Cell:
>>>>>>>>>>> Periodic X Y Z Points
>>>>>>>>>>> Spacing
>>>>>>>>>>>
>>>>>>>>>>> --------------------------------------------------------------------
>>>>>>>>>>> 1. axis: no 23.278154 0.000000 0.000000 128
>>>>>>>>>>> 0.1819
>>>>>>>>>>> 2. axis: yes 0.000000 7.679180 0.000000 40
>>>>>>>>>>> 0.1920
>>>>>>>>>>> 3. axis: yes 0.000000 0.000000 8.145000 48
>>>>>>>>>>> 0.1697
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I use only one k-point (gamma).
>>>>>>>>>>>
>>>>>>>>>>> When I first tried to get SCF convergence, I couldn't even converge to
>>>>>>>>>>> anything, even with very low mixing parameters. I had to remove bands
>>>>>>>>>>> (from nelectron to 25 unoccupied bands) to get the convergence that you
>>>>>>>>>>> will see bellow.
>>>>>>>>>>>
>>>>>>>>>>> At the first relaxation step, in the SCF calculation, everything
>>>>>>>>>>> converges smoothly down to some point then hits a limit: the error on
>>>>>>>>>>> the density stays around 10^-4 and the error on the wavefunction is
>>>>>>>>>>> switching between two values. For instance:
>>>>>>>>>>>
>>>>>>>>>>> iter: 47 10:02:07 -3.19 -4.20 -356.939274 2 2
>>>>>>>>>>> iter: 48 10:02:09 -3.11 -4.13 -356.938830 2 3
>>>>>>>>>>> iter: 49 10:02:12 -3.19 -4.43 -356.938031 2 2
>>>>>>>>>>> iter: 50 10:02:14 -3.11 -4.49 -356.937563 2 2
>>>>>>>>>>> iter: 51 10:02:17 -3.19 -4.60 -356.937381 1 1
>>>>>>>>>>> iter: 52 10:02:20 -3.11 -4.57 -356.937543 1 1
>>>>>>>>>>> iter: 53 10:02:22 -3.19 -4.59 -356.938149 1 1
>>>>>>>>>>> iter: 54 10:02:25 -3.11 -4.56 -356.937988 1 1
>>>>>>>>>>> iter: 55 10:02:27 -3.19 -4.53 -356.938700 2 2
>>>>>>>>>>> ...
>>>>>>>>>>> iter: 283 10:12:19 -3.15 -3.84 -356.893178 2 2
>>>>>>>>>>> iter: 284 10:12:22 -3.08 -4.34 -356.882750 1 1
>>>>>>>>>>> iter: 285 10:12:24 -3.15 -4.55 -356.858456 2 2
>>>>>>>>>>> iter: 286 10:12:27 -3.08 -4.24 -356.864220 2 1
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> If I consider that this is enough and stop there, then I got the same
>>>>>>>>>>> behavior in the second step with the error on the density converging to
>>>>>>>>>>> ~10^-4 *but* the error on the wavefunctions stays at ~10^-1.4 (same
>>>>>>>>>>> behavior, switches between two values).
>>>>>>>>>>>
>>>>>>>>>>> I followed the recommandations on the "Convergence issues" web page,
>>>>>>>>>>> without success. I also tried different mixers and eigensolvers.
>>>>>>>>>>>
>>>>>>>>>>> Does anyone has an idea about that?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> gpaw-users mailing list
>>>>>>>>>>> gpaw-users at listserv.fysik.dtu.dk
>>>>>>>>>>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> gpaw-users mailing list
>>>>>>> gpaw-users at listserv.fysik.dtu.dk
>>>>>>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
>>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> gpaw-users mailing list
>>>>>> gpaw-users at listserv.fysik.dtu.dk
>>>>>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
>>>>
>>
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
--
***********************************
Marcin Dulak
Technical University of Denmark
Department of Physics
Building 307, Room 229
DK-2800 Kongens Lyngby
Denmark
Tel.: (+45) 4525 3157
Fax.: (+45) 4593 2399
email: Marcin.Dulak at fysik.dtu.dk
***********************************
More information about the gpaw-users
mailing list