- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Back to my debug / nodebug issue with my Fortran engine. I am getting really confused with whats happening here. Heres the background:
We have different results being generated by debug and nodebug engines, written in Fortran, compiled under Intel v9. Not being able run both through the debugger, I insert write statements in the code to monitor the values of certain variables. I have to start with the output and move backwards. Eventually I track it down (or so I think) to some single precision variables being set up in a subroutine. After the call to this subroutine, the last significant digit of the variables are different. (These then get converted into double precision, and these differences then amplify, causing the later differences).
So I think Ive got it, but now I scatter some write statements in this subroutine, and the differences disappear! What's going on?
The only difference between debug and nodebug are:
Linker: debug version has
/incremental:yes /DEBUG /DEBUGTYPE:CV /PDB:%PWD%ds_place2pplacec.pdb
My compilation command line is:
fort /nologo /c /iface:cvf /Tfsub_schedule.for /define:INTEL9 /Qsave /Fosub_schedule.obj /include:D:sfpintelbugs_nd /fpconstant /real_size:64
Are there any compiler options I can specify to avoid these problems?
Adrian
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Debug configuration typicaly initializes uninitialized variables to 0 the Release configuration typicaly does not. Also Optimizations are typicaly off so computation order can be different. There are two suggestions I can make:
1) Use the debugger runtime option to break on reference of uninitialized variable (to track down a bug in your code)
2) To compile the debug session with the same optimization options as the Release version. It is hard to debug this code but you can place breakpoints on statements that call out (calls or writes). Viewing variables can be problematic in this configuration. But the point is to identify the problem and not in particular to run with full debugging.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not deliberately. If you get that value, it's a coincidence.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page