Skip to content

Thanks to this list ....

3 messages · Robert Baer, Rolf Turner

#
I set out to appeal to this list for help with disentangling
a bewildering anomaly that was produced by some dynamically loaded
Fortran code.

In composing an email to explain the nature of the anomaly, I *FINALLY*
spotted the loony!  I had an expression in a nested do loop:

    j = npro + (r-1)*nvym1 + s

where r and s were the indices of two of the nested loops (explicitly
declared to be integer at the start of the subroutine in question).

When I copied the foregoing expression into the email I at last noticed
that the variable "nvym1" *should* have been "nyvm1".  See the subtle
difference?  :-)

The variable nvym1 was never initialised, so it took on strange values
plucked out of RAM, I guess.  Whence the anomaly.  Once I corrected that
trivial typo, things were OK.

Thanks everybody!!! :-)

cheers,

Rolf Turner

P.S. What I can't figure out (and won't waste any time trying) is
why the first four values of j were as they should have been, and things
did not go to hell in a handcart until the code got to the 5th value
of j.  I guess the computer gods were just amusing themselves at my
expense.

R. T.
1 day later
#
And once again you have shown? that this list has an important side 
effect of helping us to help ourselves ...? :-)
On 7/14/2022 5:20 AM, Rolf Turner wrote:
#
On Fri, 15 Jul 2022 08:34:36 -0500
Robert Baer <rbaer at atsu.edu> wrote:

            
*If* we take the time and make the effort to formulate a clear question!

(A rule more often broken than observed, sad to say.)

cheers,

Rolf