Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Different results with -Qipo

alexismor
Beginner
554 Views
Hello,

I was wondering if anyone else has experienced this. I have a code with multiple files and modules. The code works fine when I compile with the -Qipo option, but not when I compile with just ifort.

When I try debugging by placing print statements in the code, then magically the code will work just fine. Even more frustrating, it seems that the successful execution depends on the placement of the print statements. I've found that placing a single print*,' ' will make the code work. It's hard to debug when placing print statements makes the code work...

How can this be? Any ideas as to what's going on?
Thanks,

Alexis
0 Kudos
3 Replies
Steven_L_Intel1
Employee
554 Views
Sounds as if you have uninitialized variables, or accessing memory out of bounds. Anything that changes the instruction stream can cause bugs to disappear or reappear.

Have you tried using the debugger rather than print statements?
0 Kudos
Intel_C_Intel
Employee
554 Views
Hello,
If you have uninitialized variables you can use the compiler option /check:uninitialized to catch them run-time.
Lars Petter
0 Kudos
Steven_L_Intel1
Employee
554 Views
Well, some of them, anyway...
0 Kudos
Reply