avatar
fortran memory problem# Computation - 科学计算
l*n
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
avatar
O*e
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

avatar
l*n
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.
avatar
j*u
4
good to know, hehe

【在 l******n 的大作中提到】
: find the problem!
: Intel fortran (ifort)的automatic variable居然有时候不allocate memory,FT!

avatar
O*e
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!

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。