l******n 发帖数: 9344 | 1 有一段fortran的程序,编译后,执行的时候,有时候给出正确的结果,有的时候给
出segmentation fault
ERROR is 1.909169931504362E-004
0xb7469768 in __libc_start_main () from /lib/tls/libc.so.6
(gdb) step
Single stepping until exit from function __libc_start_main,
which has no line number information.
Program exited normally.
正常
(gdb) step
Single stepping until exit from function main,
which has no line number information.
Program received signal SIGSEGV, Segmentation fault.
0x0804d505 in gmodule_mp_div2_ ()
(gdb) where
#0 0x0804d505 |
O******e 发帖数: 734 | 2 Recompile the code with -g and array bounds checking, then run in debugger.
【在 l******n 的大作中提到】 : 有一段fortran的程序,编译后,执行的时候,有时候给出正确的结果,有的时候给 : 出segmentation fault : ERROR is 1.909169931504362E-004 : 0xb7469768 in __libc_start_main () from /lib/tls/libc.so.6 : (gdb) step : Single stepping until exit from function __libc_start_main, : which has no line number information. : Program exited normally. : 正常 : (gdb) step
|
l******n 发帖数: 9344 | 3 find the problem!
Intel fortran (ifort)的automatic variable居然有时候不allocate memory,FT!
【在 O******e 的大作中提到】 : Recompile the code with -g and array bounds checking, then run in debugger.
|
j**u 发帖数: 6059 | 4 good to know, hehe
【在 l******n 的大作中提到】 : find the problem! : Intel fortran (ifort)的automatic variable居然有时候不allocate memory,FT!
|
O******e 发帖数: 734 | 5 What status does the allocate statement return? Did you test for that?
【在 l******n 的大作中提到】 : find the problem! : Intel fortran (ifort)的automatic variable居然有时候不allocate memory,FT!
|