标题: 运行出错SIGSEGV: Segmentation fault - invalid memory reference. [打印本页] 作者: 元气蛋 时间: 2022-10-15 16:45 标题: 运行出错SIGSEGV: Segmentation fault - invalid memory reference. 各位大神,我是Fortran新手,最进在编写一个接口程序gred-1.f,其功能是(1)读取input的坐标信息,传给fh2o-pipnn.f的子程序后返回能量;(2)将input坐标数组的每一项提取加一个值,之后返回子程序计算能量,之后将能量带入公式求解。这样一个程序在编译过程中没有出错,但运行出错:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x2B4B3916F6D7
#1 0x2B4B3916FD1E
#2 0x2B4B39C023FF
#3 0x401D83 in getpota_
#4 0x402B44 in pot_
#5 0x4066EA in pot0_
#6 0x406CCE in MAIN__ at gred-1.f:?
Segmentation fault (core dumped)