Gfortran does not tell me what type of floating point error it is

依然范特西╮ 提交于 2019-12-13 07:38:47

问题


This is how I have compiled a fortran 77 file with gfortran 4.8.5

gfortran -Wall -O0 -c -g -fbacktrace -ffpe-trap=invalid,denormal,zero,overflow,underflow ${tool}.f ${ncdf_incs}

and then I run it and I get this floating point exception

 Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:
#0  0x7F9AC3077E08
#1  0x7F9AC3076F90
#2  0x7F9AC29BE4AF
#3  0x404894 in psiappsor at inv_cart.f:1221
#4  0x40F7E8 in MAIN__ at inv_cart.f:159
Floating exception (core dumped)

I am unable to tell what type of FPE it is. The same file compiled with pgf77 /pgf90 is able to let me know that it is a divide by zero FPE. What do I do to get the type of FPE the code is throwing with gfortran?

UPDATE I tried this with gfortran 5.4 and I get the same problem. It does not tell you what sort of FPE it is.

来源:https://stackoverflow.com/questions/44928791/gfortran-does-not-tell-me-what-type-of-floating-point-error-it-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!