Programming annoyances [message #45547] |
Fri, 09 September 2005 14:18 |
swingnut
Messages: 30 Registered: September 2005
|
Member |
|
|
Ok, I've got some code. I've tweaked it so that it actually runs again
(sortof; it was written by another grad student back in 2001-2002 but
hasn't been used much since then). Two issues that have come up, which
I don't understand.
**********
First, the pro file contains a function, N_REFR. IDL compiles this when
I select the compile all option, and sometimes IDL sees it but most of
the time IDL gives a variable undefined error.
... (other modules compiled)
% Compiled module: N_REFR
% Compiled module: MASSPROFILE4
IDL> massprofile 4
...(log messages)
% Variable is undefined: N_REFR
% Execution halted at: RPIPROFILER 286
/data/aramisgm/research/tracing/testing/massprofile4.pro
% MASSPROFILE4 667
/data/aramisgm/research/tracing/testing/massprofile4.pro
% $MAIN$
% Program caused arithmetic error: Floating underflow
I tried putting N_REFR into a separate pro file, but I got the same
behavior. I eventually changed the function name to be N_refr, and now
it seems to work but unreliably. I've fiddled with changing the
function call to match, but the subtleties of case sensitivity seem to
be showing up. This happens whether both at the IDL prompt and in
idlde. In any case, what can cause this happen?
BTW, this is IDL 6.2 on a Red Hat 8 cluster.
**********
Second, on the occasions when the program does run, when it reaches the
end of the main procedure, IDL prints two or three error messages to
the log:
Program caused arithmetic error: Floating point divide by 0
Program caused arithmetic error: Floating underflow
and sometimes
Program caused arithmetic error: Floating overflow
I added a tracing statement to determine for sure that this happens at
the end, and sure enough, it is not generated by anything in the code,
though I could imagine it being generated by something being left ot at
the end. Any ideas?
Thanks.
|
|
|