Differences between starting with and without debugging


I’m programming in Fortran using Microsoft Visual Studio.

I’m running into problems with my iterative code in that if I start the code without debugging, it will diverge immediately, while it will converge if I start it with debugging. It will work either way if I run less nodes. Are numbers treated differently in the two start modes?

I encountered a similar problem earlier, but managed to isolate a section of code that used array math and replaced it with imbeded do loops, which seemed to fix the problem.

Thank you.

Hi H Hemingson,

Some high optimizations reduce precision that can lead to this type of behavior. For applications that need stricter precision, from your project’s property page, select the “Release” configuration and then select “Yes” for the “IEEE Arithmetic” under “Fortran->Floating-Point Options”. This will have the compiler use more strict operations that more closely adheres to IEEE 754 standards.

Note that in debug mode, no optimization are used.

Hope this helps,