- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Even when compiling fortran code with -traceback and -g, I still cannot get stack traces to print source line information on OSX when using -check bounds or -fpe0. Looking back through this forum, I believe that this problem has been mentioned previously. Has this lack of source line information in tracebacks on OSX been fixed in the latest version 10.1.017, or will this be fixed in future 10.1 versions?
The traceback mechanism is very useful for quickly debugging fortran code, and I hope it can be fixed soon.
Martin
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Martin,
The traceback issue is fixed in our next major release (11.0) tentatively due out later this year. The fixes only impacted the run-time libraries for this release. I included a sample below using our Beta 11.0.039 compiler.
With 10.1, the issue involves both the run-time libraries and the compiler. The library changes are complete (same as 11.0); however, it is unclear if the compiler changes necessary to rename the existing .trace section can safely be made to 10.1. I will post to this thread if there is any change in status regarding the complete fixes for 10.1.
I invite you to consider trying the 11.0 Beta as discussed in the Announcement here. Please let us know if the 11.0 Beta compiler is helpful with your particular application in providing a usable traceback.
Here is an example of the traceback provided with the Beta 11.0.039 (Intel 64) compiler:
Given sample.f90:
1 program main
2 i=0
3 call sub1(i)
4 print *,'i=',i
5 end
6
7 subroutine sub1(j)
8 k=1
9 call sub2(j,k)
10 end
11
12 subroutine sub2(j,k)
13 m=k/j
14 print *,'m=',m
15 end
$ ifort V -g -save-temps -traceback -fpe0 sample.f90
Intel Fortran Compiler Professional for applications running on Intel 64, Version 11.0 Beta Build 20080730 Package ID: m_cprof_b_11.0.039
Copyright (C) 1985-2008 Intel Corporation. All rights reserved.
ifort: NOTE: The Beta evaluation period for this product ends on 30-jan-2009 UTC.
Intel Fortran 11.0-1547
@(#)PROGRAM:ld PROJECT:ld64-85.2.1
Library search paths:
/opt/intel/Compiler/11.0/039/lib
/usr/lib/i686-apple-darwin9/4.0.1/
/usr/lib/
/usr/lib/gcc/i686-apple-darwin9/4.0.1/x86_64
/usr/lib/gcc/i686-apple-darwin9/4.0.1/
/usr/lib/i686-apple-darwin9/4.0.1
/usr/lib
/usr/lib
/usr/local/lib
Framework search paths:
/Library/Frameworks/
/System/Library/Frameworks/
$ ./a.out
forrtl: severe (71): integer divide by zero
Image PC Routine Line Source
a.out 0000000100000E7D _sub2_ 13 sample.f90
a.out 0000000100000E54 _sub1_ 9 sample.f90
a.out 0000000100000DAD _MAIN__ 3 sample.f90
a.out 0000000100000D5C Unknown Unknown Unknown
Stack trace terminated abnormally.

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