Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Intel fortran 15 traceback information

Hossein_T_
Beginner
1,550 Views

Hello,

I have a simple code like this below and I compile it with  " ifort  -O0 -debug -g -traceback   -check all  -ftrapuv   tracback.f90  ". Apparently there is a runtime error with a(1000)=2. IFORT catches the error however it does not print the traceback information as it used to do. What am I missing?

I use: Ubuntu x64 14.04 with GCC4.8.2 , Intel Fortran Version 15.0.0.090 Build 20140723

program helow

   integer, allocatable :: a(:)
   allocate(a(10))
   a=1; a(1)=2
   a(1000)=2
   print *,a
end program

Thank you.

0 Kudos
1 Solution
Alexis_R_
New Contributor I
1,550 Views

Check whether your environment has the variable FOR_DISABLE_STACK_TRACE set. This disables stack trace printing.

View solution in original post

0 Kudos
4 Replies
Kevin_D_Intel
Employee
1,550 Views

I am unable to reproduce this on our side. The traceback is provided under our Ubuntu14.04 LTS system (see details below). I’m not sure what might be hampering it on yours.

Do you have other ifort versions installed that you can try?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:        14.04
Codename:       trusty

$ uname -a
Linux xxxxxxxxx 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2

$ ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.0.090 Build 20140723
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

$ ifort -O0 -debug -g -traceback -check all -ftrapuv traceback.f90

$ ldd a.out
        linux-vdso.so.1 =>  (0x00007fff5ebfe000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f426eb00000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f426e8e1000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f426e6dd000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f426e317000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f426e0ff000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f426ee1d000)

$ ./a.out
forrtl: severe (408): fort: (2): Subscript #1 of the array A has value 1000 which is greater than the upper bound of 10

Image              PC                Routine            Line        Source      
a.out              00000000004045D0  Unknown               Unknown  Unknown
a.out              0000000000402A7B  MAIN__                      9  traceback.f90
a.out              000000000040247E  Unknown               Unknown  Unknown
libc.so.6          00007FF8A1F1AEC5  Unknown               Unknown  Unknown
a.out              0000000000402389  Unknown               Unknown  Unknown

 

0 Kudos
Hossein_T_
Beginner
1,550 Views

Thanks David. I also have intel 14.0.3.174 and same behaviour. I tested with both and everything looks like your except the outcome. Something looks terribly wrong in my OS then.

 

0 Kudos
Alexis_R_
New Contributor I
1,551 Views

Check whether your environment has the variable FOR_DISABLE_STACK_TRACE set. This disables stack trace printing.

0 Kudos
Hossein_T_
Beginner
1,550 Views

That was it :-). Thank you. There is also a discussion here: http://dev-archive.ambermd.org/200702/0000.html

 

0 Kudos
Reply