| Thread Tools | Search this thread |
|---|
nooj
| 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
| |||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
|
|||||||||||||
| 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 |