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 ?
source share