- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using IVF v.9.1.025 in windows, IA32, to test a simplified piece of code:
program runErr
integer :: i
open( 11, file='abc.txt')
read (11,"(i2)") i
end program runErr
The first line in the input file abc.txt is just a string abc.
On the DOS command line, I ran
iFort runErr.f90 /Zi /Od /warn:declarations /warn:interfaces /warn:uncalled /warn:unused /traceback /check:all /RTCu /threads /dbglibs
to compile/link runErr.f90
The runtime error message told me that there was an input conversion error for unit 11, file abc.txt. It listed eleven locations with unknown routine, unknown line, and unknown source.
How to make it tell me the line number and routine name or source name for the location of the runtime error?
Wen
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
Thank you, Steve.
The Link option /debug has the same effect as /Zi we have discussed.
I ran
iFort runErr.f90 /c /traceback
iFort runErr.obj /debug
the runtime error did not show the line number for the line with error.
When I removed the option /debug and ran
iFort runErr.f90 /c /traceback
iFort runErr.obj
the line number appeared.
Wen
- 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
"Light dawns on Marblehead," as we say here in New England. The problem is that /debug (or /Zi) implies incremental linking and that disables traceback. You can fix this by adding:
/link /incremental:no
to the end of the command line (after source file names). I've suggested to the developers that the ifort driver do this automatically if /traceback is specified. Note that in Visual Studio, incremental linking is disabled in a Debug Fortran configuration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, in release config. it would be useful to have Omit Frame Pointers default to 'No' if runtime Traceback is 'Yes'. The default appears to be 'Yes' which doesn't disable Traceback but limits its usefulness.

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