From: robert.corbett on
On Jan 7, 4:51 am, Dieter Britz <dieterbr...(a)yahoo.com> wrote:
> What is a symptom of, when a print statement, inserted into a program
> as a diagnostic, removes an error?
> --
> Dieter Britz (dieterbritz<at>yahoo.com)

It can mean many things. If the code is compiled with
optimization enabled, a PRINT statement can cause some
optimizations to be disabled. The Fortran language
places restrictions on what programs can do that
optimizers exploit. If a program violates one of those
restrictions, the program might work fine when compiled
without optimization, but fail when compiled with
optimization. Adding a PRINT statement can cause the
optimizations that cause the program to fail to be
disabled. Of course, it is also possible that the
optimizer, which tend to be large, complex, and
finicky programs, contains one or two bugs.

Bob Corbett
From: aeroguy on
On Jan 7, 5:51 pm, Dieter Britz <dieterbr...(a)yahoo.com> wrote:
> What is a symptom of, when a print statement, inserted into a program
> as a diagnostic, removes an error?
> --
> Dieter Britz (dieterbritz<at>yahoo.com)

I faced a similar situation. the error i was getting was segmentation
fault but inserting a print statement removed the error.

As Michel suggested, check your array bounds, and the assignment
statements to arrays..
From: Gib Bogle on
Dieter Britz wrote:
> What is a symptom of, when a print statement, inserted into a program
> as a diagnostic, removes an error?

This manifests the Heisenbug Uncertainty Principle.
First  |  Prev  | 
Pages: 1 2
Prev: 5.0d0+tan(phi) vs 5+tan(phi)
Next: 2D interpolation