[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

memory allocation error



Dear feffusers,

I just succeded in preventing feff 8.20 from crashing with a "memory allocation error" while writing out feffnnnn.dat files and thought I could communicate my findings tho this list in case anybody else also encounters this problem. Maybe someone can also comment on whether I did the right thing!?

What was happening?
I generated feffnnnn.dat files for a EXAFS analysis on a single crystal, ending up with more than 1000 paths because symmetries due to the threefold rotation axis in the plane I am looking at are not detected by feff. When the 1000 path limit is reached, feff throws a "memory allocation error" and dies.

I solved this problem by increasing the parameter npx from 1000 (or 1200 in a couple of subroutines) to 2000. Unfortunately this parameter is *not* included in the header file dim.h and undocumented (maybe this could be changed for the next version?!). I found npx being defined in the following subroutines and changed its value in each of them:
   feffdt
   ff2afs
   ff2chi
   ff2xmu
   dwadd
There also is a parameter npx=400000 in another subroutine (which I didn't change).
After recompiling, feff did not crash any more and wrote some 1300 path files.

Maybe it would a good thing to catch this error and issue a warning in a future release?

Best regards,
Peter

PS: When running FEFF in FMS mode there is always a message "Internal path finder limit exceeded -- path list may be incomplete." although (as I understand it) the pathfinder isn't used at all. Is this the intended behaviour???

--
--------------------------------------------------------------
Peter Pfalzer
Universitaet Augsburg                    Tel: +49-821-598-3215
Lehrstuhl fuer Experimentalphysik II     Fax: +49-821-598-3411
Universitaetsstr. 1
D-86135 Augsburg
Germany                   Peter.Pfalzer@physik.uni-augsburg.de
            http://www.physik.uni-augsburg.de/exp2
--------------------------------------------------------------