- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Have you tried using the debugger rather than print statements?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
If you have uninitialized variables you can use the compiler option /check:uninitialized to catch them run-time.
Lars Petter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, some of them, anyway...

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page