Intel Fortran - Fuzzy restrictions do not give line number

I am using the Intel fortran compiler ( ifort ) in mpi environment. It turns out my code has a buffer overflow when I compiled with the -g -O2 -check bounds flags. After some time, I get the following message:

 forrtl: severe (408): fort: (2): Subscript #1 of the array XX has value 4 which is greater than the upper bound of 3 Image PC Routine Line Source program.exe 00000000006E757E Unknown Unknown Unknown program.exe 00000000006E6016 Unknown Unknown Unknown program.exe 00000000006905B2 Unknown Unknown Unknown program.exe 0000000000642E6B Unknown Unknown Unknown program.exe 0000000000643381 Unknown Unknown Unknown program.exe 00000000005F33FB Unknown Unknown Unknown program.exe 00000000004139E7 Unknown Unknown Unknown program.exe 000000000040A6B4 Unknown Unknown Unknown program.exe 0000000000409D2C Unknown Unknown Unknown libc.so.6 000000380D61ECDD Unknown Unknown Unknown program.exe 0000000000409C29 Unknown Unknown Unknown 

It's great - now I know that I overtook XX , but where? using -fbounds-check , -fbounds-check will give me the file and line number. Is there a way I can get this using ifort ?

+6
source share
1 answer

A -traceback flag can be used with Intel and Portland Group Fortran compilers to request additional information that must be generated in object files to trace strings and sources. When a serious error occurs during execution, the program will try to report the line number and source file where the error occurred, as well as line numbers and source files from the parent procedures in which the calls were made.

The equivalent flag for -fbacktrace is -fbacktrace .

+6
source

All Articles