Code Variables and Dimensions

From FEFF

Appendix D: Code Variables and Dimensions

For historical reasons feff is currently a mix of older fortran77 code and newer fortran90 code. Hence the most important array dimensions are treated dynamically, while some others are set at compilation time. If you need to run larger problems than the dimension statements in the code allow, simply change the dimensions in the file `feff90/src/COMMON/m dimsmod.f90' and recompile. If you need help to modify the feff code, please contact the authors.

The following parameters are supported for dynamical treatment :

c number of atoms for FMS. Reduce nclusx for a smaller executable.
integer nclusx
c highest orbital momentum for FMS module.
integer lx

For these parameters, the module rdinp will determine from user input what array size is needed, eg. to fit all atoms of the cluster and all orbital momentum values. These will be truncated to a precompiled upper limit to protect exceeding available memory (which might result in nasty errors that would be problematic especially on large computing systems where tasks have to go through a queue and crashes cannot be immediately rectified) ; optionally, the user can set these truncation values using the DIMS card.

For all static parameters below, all arrays will be allocated with a fixed dimension regardless of the problem at hand. These parameters are :

c max number of spins: 1 for spin average; 2 for spin-dep
parameter (nspx=1)
c max number of atoms in problem for the pathfinder
parameter (natx =1000)
c max number of atoms in problem for the rdinp and ffsort
parameter (nattx =10000)
c max number of unique potentials (potph) (nphx must be ODD to
c avoid compilation warnings about alignment in COMMON blocks)
parameter (nphx = 7)
c max number of ang mom (arrays 1:ltot+1)
parameter (ltot = 24)
c Loucks r grid used through overlap and in phase work arrays
parameter (nrptx = 1251)
c Number of energy points genfmt, etc.
parameter (nex = 450)
c Max number of distinct lambda's for genfmt
c 15 handles iord 2 and exact ss
parameter (lamtot=15)
c vary mmax and nmax independently
parameter (mtot=4, ntot=2)
c max number of path atoms, used in path finder, NOT in genfmt
parameter (npatx = 8)
c matches path finder, used in GENFMT
parameter (legtot=npatx+1)
c max number of overlap shells (OVERLAP card)
parameter (novrx=8)
c max number of header lines
parameter (nheadx=30)

Care should be taken in changing these parameters. Whenever the expected length of an array changes, errors, or, worse, unphysical results may occur when feff then reads intermediate files produced before the changes. In practise, this means that

  • whenever one changes user input (`feff.inp') or the hardwired truncation limits for the

dynamical dimension parameters such that the length of any arrays in the calculation will change, all affected parts of the calculation must be rerun before continuing or reusing parts of it.

  • whenever one changes any of the static parameters, all intermediate files containing arrays

dimensioned by the affected parameter will become useless and the calculation must be rerun to regenerate these files before they can be used. Of course, it is entirely possible to have more than one compiled version of feff on your system, as long as you don't mix them up and always use the same version for a given calculation.

It should also be noted here that there is an internal limit on the number of paths (set to 1200) that will be read from `feff.bin'. This limit was chosen to handle any reasonable problem without using an excessive amount of memory. If you must use more paths, change the parameter npx in the feff source in subroutine ff2x to whatever you need. This will require more memory. We have not had a case where the filter criteria were not able to solve the problem with fewer than 1200 paths.



(E) Trouble-Shooting FEFF Problems and Bug Reports

Back to FEFF Document Contents

developer's resources