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

-g & -check bounds ... no line number / source filename?

Alexis_R_
New Contributor I
452 Views
I compile my program with the following options (I'm confused about the difference btw -g and -debug full, so I include them both):
-warn all -fpp -check all -gen-interfaces -assume realloc_lhs -debug full -O0 -g -FR

When my programming is bad and check bounds tells me so, I get the sort of output copied below (where frealix2 is the program name). My question is: why don't I get an indication of the line / source file where the problem happened?

[shell]forrtl: severe (408): fort: (2): Subscript #1 of the array RVALUE has value 131 which is greater than the upper bound of 130

Image              PC                Routine            Line        Source            
frealix2           00000000005576DD  Unknown               Unknown  Unknown
frealix2           00000000005561E5  Unknown               Unknown  Unknown
frealix2           0000000000503599  Unknown               Unknown  Unknown
frealix2           00000000004C01ED  Unknown               Unknown  Unknown
frealix2           00000000004C05F2  Unknown               Unknown  Unknown
frealix2           000000000046D28A  Unknown               Unknown  Unknown
frealix2           0000000000499CE1  Unknown               Unknown  Unknown
frealix2           00000000004B49C8  Unknown               Unknown  Unknown
frealix2           00000000004B6B06  Unknown               Unknown  Unknown
frealix2           00000000004B665D  Unknown               Unknown  Unknown
frealix2           0000000000403AAC  Unknown               Unknown  Unknown
libc.so.6          0000003DCE41D974  Unknown               Unknown  Unknown
frealix2           00000000004039A9  Unknown               Unknown  Unknown[/shell]


0 Kudos
4 Replies
Steven_L_Intel1
Employee
452 Views

You need -traceback as well.
0 Kudos
Ron_Green
Moderator
452 Views
Quoting - A. Rohou
I compile my program with the following options (I'm confused about the difference btw -g and -debug full, so I include them both):
-warn all -fpp -check all -gen-interfaces -assume realloc_lhs -debug full -O0 -g -FR

When my programming is bad and check bounds tells me so, I get the sort of output copied below (where frealix2 is the program name). My question is: why don't I get an indication of the line / source file where the problem happened?

[shell]forrtl: severe (408): fort: (2): Subscript #1 of the array RVALUE has value 131 which is greater than the upper bound of 130

Image              PC                Routine            Line        Source            
frealix2           00000000005576DD  Unknown               Unknown  Unknown
frealix2           00000000005561E5  Unknown               Unknown  Unknown
frealix2           0000000000503599  Unknown               Unknown  Unknown
frealix2           00000000004C01ED  Unknown               Unknown  Unknown
frealix2           00000000004C05F2  Unknown               Unknown  Unknown
frealix2           000000000046D28A  Unknown               Unknown  Unknown
frealix2           0000000000499CE1  Unknown               Unknown  Unknown
frealix2           00000000004B49C8  Unknown               Unknown  Unknown
frealix2           00000000004B6B06  Unknown               Unknown  Unknown
frealix2           00000000004B665D  Unknown               Unknown  Unknown
frealix2           0000000000403AAC  Unknown               Unknown  Unknown
libc.so.6          0000003DCE41D974  Unknown               Unknown  Unknown
frealix2           00000000004039A9  Unknown               Unknown  Unknown[/shell]



You also need to add -traceback

-g is sufficient for a full traceback. -debug full adds much more information to the executable to help with debuggers.

ron
0 Kudos
Alexis_R_
New Contributor I
452 Views
Thanks both for the lightning-fast replies!
0 Kudos
Steven_L_Intel1
Employee
452 Views
I don't think that -g is required for traceback - they use different sets of information.
0 Kudos
Reply