Forum Jump

Select Group :
Select Forum :
Sorted By :
Sort Order :
From The :
 
Thread Tools  Search this thread 
nooj
Total Points:
360
Status Points:
310
Green Belt
August 12, 2009 5:05 PM PDT
traceback not working on Mac
I have some example code which gives traceback information on a severe error under linux (ifort v10.1), but not Mac (ifort v10.0):

Linux box is running Ubuntu.  uname -a says
Linux xxx.xxx.xxx.xxx 2.6.24-24-generic #1 SMP Wed Apr 15 15:11:35 UTC 2009 x86_64 GNU/Linux
ifort --version: ifort (IFORT) 10.1 20080602

Mac box is OSX 10.5.  uname -a says
Darwin yyy.yyy.yyy.yyy 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386
ifort --version: ifort (IFORT) 10.0 20070809



The make line for both is:

ifort -O3 -traceback -C uninit.f -o a.out

output for mac is:

 init: val            5
 init: vec            1           2
 call to init succeeded.
 
 noinit: vec            0           0
forrtl: severe (193): Run-Time Check Failure. The variable 'noinit_$VAL' is being used without being defined


output for linux is:

 init: val            5
 init: vec            1           2
 call to init succeeded.
 
 noinit: vec            0           0
forrtl: severe (193): Run-Time Check Failure. The variable 'noinit_$VAL' is being used without being defined
Image              PC                Routine            Line        Source             
a.out-C            000000000045C46A  Unknown               Unknown  Unknown
a.out-C            000000000045B4C4  Unknown               Unknown  Unknown
a.out-C            000000000041D69A  Unknown               Unknown  Unknown
a.out-C            0000000000404079  Unknown               Unknown  Unknown
a.out-C            00000000004056EE  Unknown               Unknown  Unknown
a.out-C            0000000000402C82  MAIN__                     17       uninit.f
a.out-C            00000000004029E2  Unknown               Unknown  Unknown
libc.so.6          00002ABBFAED41C4  Unknown               Unknown  Unknown
a.out-C            0000000000402929  Unknown               Unknown  Unknown


the source code is (feel free to correct my claims in the comments below):

C     This program tests compile and run-time errors with
C     initialization.  The "noinit" call will fail with -CU, 
C     But play around with things.  
C     
C     The takeaway is that "-check uninit" (aka "-CU") ONLY works with
C     SCALARS, NOT VECTORS OR ARRAYS.  And "-ftrapuv" doesn't seem to
C     work at all.

      program uninit_test
        integer a(2)
        a=(/1,2/)

        call init
        write(*,*) "call to init succeeded."
        write(*,*) ""

        call noinit
        write(*,*) "call to noinit succeeded."
        write(*,*) ""

        write(*,*) 'before intentout: a=',a
        call intentout(a)
        write(*,*) 'after intentout: a=',a
      end


      subroutine init()
        integer val, vec(2)
        val = 5
        vec = (/1,2/)
        write(*,*) "init: val ",val
        write(*,*) "init: vec ",vec
      end 


      subroutine noinit()
        integer val, vec(2)
        write(*,*) "noinit: vec ",vec
        write(*,*) "noinit: val ",val
      end 


      subroutine intentout(a)
        integer, intent(out) :: a(2)
        write(*,*) 'before setting a(2): a=',a
        a(2)=3
        write(*,*) 'after setting a(2): a=',a
      end

nooj
Total Points:
360
Status Points:
310
Green Belt
August 12, 2009 5:10 PM PDT
Rate
 
#1
Oops.  I forgot to actually ask a question.  

Why is there no traceback info on Mac?  Do I need -g?  Does -g -O3 cause a runtime performance penalty?
I understand -traceback does not cause any performance hit (see http://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/66468/).  

Thanks, all!

- Nooj



Kevin Davis (Intel)
Total Points:
11,112
Status Points:
10,612
Brown Belt
August 13, 2009 5:30 AM PDT
Rate
 
|Best Answer
#2 Reply to #1
Quoting - nooj
Why is there no traceback info on Mac?  Do I need -g?  Does -g -O3 cause a runtime performance penalty?
I understand -traceback does not cause any performance hit (see http://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/66468/).  

The lack of the traceback on the Mac was a bug in the older 10.0 compiler you are using that's now fixed in the 11.1 Release. The traceback was fixed in the 10.1 release and then problems with symbolization of the traceback were fixed in 11.0.  (Internal tracking id: DPD200039483)

-g is needed to symbolize the traceback with source/line number information.

Ron discussed the possible impacts for -O3 -g in the earlier post.

Here's what 11.1 produces for your test case:

$ ifort -V -O3 -traceback -g -C uninit.f
Intel(R) Fortran Intel(R) 64 Compiler Professional for applications running on Intel(R) 64, Version 11.1 Build 20090511 Package ID: m_cprof_p_11.1.046
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

Intel(R) Fortran 11.1-2492
@(#)PROGRAM:ld PROJECT:ld64-85.2.1
Library search paths:
/usr/bin/ifort-11.1-base/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
init: val 5
init: vec 1 2
call to init succeeded.

noinit: vec 0 0
forrtl: severe (193): Run-Time Check Failure. The variable 'noinit_$VAL' is being used without being defined
Image PC Routine Line Source
a.out 000000010006DEAC Unknown Unknown Unknown
a.out 000000010006C9E4 Unknown Unknown Unknown
a.out 00000001000450E7 Unknown Unknown Unknown
a.out 000000010001BB68 Unknown Unknown Unknown
a.out 000000010001C5C8 Unknown Unknown Unknown
a.out 0000000100001503 _MAIN__ 20 uninit.f
a.out 00000001000011EC Unknown Unknown Unknown
a.out 0000000100001184 Unknown Unknown Unknown


nooj
Total Points:
360
Status Points:
310
Green Belt
August 13, 2009 3:01 PM PDT
Rate
 
#3 Reply to #2
Ah.  That's unfortunate.  I'm using the latest Student version, which is about fifty times cheaper than the latest pro version.  Thanks for fixing it, though!  And for the info!


The lack of the traceback on the Mac was a bug in the older 10.0 compiler you are using that's now fixed in the 11.1 Release. The traceback was fixed in the 10.1 release and then problems with symbolization of the traceback were fixed in 11.0.

Here's what 11.1 produces for your test case:
[snip correct output]


Kevin Davis (Intel)
Total Points:
11,112
Status Points:
10,612
Brown Belt
August 14, 2009 3:56 AM PDT
Rate
 
#4 Reply to #3

If your support services for your Student license are still valid then you're entitled to upgrade to the 11.1 Release for free. If it has expired, then perhaps you could purchase another new subscription (no renewals are available for Student licenses) at the current Student pricing assuming you still qualify.



Intel Software Network Forums Statistics

8470 users have contributed to 31601 threads and 100646 posts to date.
In the past 24 hours, we have 30 new thread(s) 113 new posts(s), and 159 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member kopernikus