[Ifeffit] maximum argument length?
newville at cars.uchicago.edu
Mon Jan 5 17:45:25 CST 2004
Sorry for the delay... Christmas/New Year's holidays. I'll be back
for real later this week.
On Tue, 23 Dec 2003, Peter Southon wrote:
> Is there a limit on the total length of arguments that follow an Ifeffit
> command? If so, is there a way of expanding the limit?
Yes, there is a limit. Actually, there are several limits that can
affect how long the command line can be. The length limit on the
strings in the code are 2048 characters, but the strings get passed
back and forth enough times that I wouldn't claim that a single
command with 2047 characters will always work. More importantly,
there are various limits on different parts of the command length,
which is what I think you're seeing.
> I've constructed a rather complicated model which uses 37 paths (mostly
> multiple scattering). Furthermore, quite a few of these paths are sensitive
> to scattering angle, so I have calculated FEFF files for three versions
> each of most paths (each for a different scattering angle), as suggested in
> the course "EXAFS Analysis with FEFF and FEFFIT" and the old Feffit manual.
> Thus the final Ifeffit command calls on a lot of FEFF paths, each
> specifically numbered according to path and angle.
> Unfortunately, after adding a few extra paths I get error messages when
> running the feffit command: "feffit:unknown key" followed by a list of
> paths about halfway through my list, and also "feffit: no chi(k) data
> array?". I assume that this is because ifeffit will only swallow half the
> command, which is:
> 37, 3800,3810,3820,3900,3910,3920,4000,4010,4020,4100,4110,4120,
> chi = data15.chi, macro = plot_fit)
> Short of actually renumbering all my paths so that they run sequentially,
> is there any solution...?
Eek. This is my mistake, and I'll have to send repaired code for
this to work, which could be as soon as the end of this week. You're
hitting an accidentally low limit on the length of the 'path list'.
The string '1-4,500,...,5520' needs to be converted to a list of
integers: the limit on this string is currently only 256 characters,
which is definitely a mistake and will be increased to 1024 shortly.
Another possible approach for this problem is to use the
unadvertised, "slightly magic" behavior that an undefined path is
silently ignored in the sum-over-paths. That is, if you define
paths 500, 510, 520, but not any of the path numbers in between,
using '500-520' would be the same as '500,510,520'. Though this
will give the same sum of paths, it _currently_ won't help you, as
it will quickly use up too many of the paths in the number of
internally stored paths used in the code. This will be fixed and
documented for the next version too (which should be within a couple
weeks), and the path indices will be checked to be between 1 and
9999, so that saying '1-9999' will mean "use all defined paths".
In principle, that could make the sort of problem you're dealing
with easier, but it might be real work for you at this point too.
Sorry for all the trouble, and hopefully we can get it to work soon.
More information about the Ifeffit