Integer changes mid-execution

N.M. Maclaren nmm1@cam.ac.uk
Tue Nov 3 16:17:00 GMT 2009


On Nov 3 2009, Nishita Desai wrote:
>
>What happens is that suddenly at the end of the third iteration,
>NPART changes value. Here is a gdb transcript:
>
>Can anyone tell me what is going wrong?  I appreciate any help!

Somewhere in the code you are executing, you are overwriting NPART.

That is usually due to a subscript being larger than the size of an
array, but there are many other possible causes.  Start by checking
the size of the array P, and then check that you haven't aliased NPART
to part of P (e.g. by passing P(3,1020) as an argument called NPART).
If neither is the case, the bug is a bit nasty, and is located in
some code executed previously.

But, sure as eggs is little chickens, that will be the cause.

Regards,
Nick Maclaren.



More information about the Fortran mailing list