[gpaw-users] recursion depth error

Ask Hjorth Larsen asklarsen at gmail.com
Mon Jul 23 16:56:55 CEST 2012


Hi

2012/7/20 Torsten Hahn <Torsten.Hahn at physik.tu-freiberg.de>:
> Hi all,
>
> if i run a lcao calculation with many atoms having a ghost-setup, i run into the following error:
>
> ===
>   File "/home/hahn/lib/python/gpaw/setup.py", line 115, in correct_for_charge
>     correct_for_charge(f_j, charge, degeneracy_j, True)
>   File "/home/hahn/lib/python/gpaw/setup.py", line 97, in correct_for_charge
>     if charge >= 0:
> RuntimeError: maximum recursion depth exceeded in cmp
> ===
>
> One solution would be to increase pythons global recursion limit with
>
> sys.setrecursionlimit()
>
> However, is this wise ? Is there a better workaround ?
>
> Best regards,
> Torsten.

That function is only used in the initialization, so even if it does
not work correctly it should not fundamentally break the calculation
once it gets past that phase.  That being said, I never was able to
understand the purpose of the "correct_for_charge" function in spite
of the fact that helpfully contains the comment "# correct for the
charge".

I would solve it by hacking my local copy until it works, then
complaining some more on the mailing list until someone who
understands what it is supposed to do fixes it.

Regards
Ask


More information about the gpaw-users mailing list