FEHM icon indicating copy to clipboard operation
FEHM copied to clipboard

Segfault on Co2 with -ffpe-trap=underflow,overflow

Open shane-mckinney opened this issue 5 years ago • 1 comments

I've found FEHM works on many different problems - but when ran on co2 a segfault is generated if compiled with -ffpe-trap=underflow,overflow

If compiled in debug mode with -ffpe-trap=underflow,overflow FEHM's b matrix is off by a factor of idof in some locations; thus outputting incorrect results

If you know exactly what -ffpe-trap=underflow,overflow if you have any valuable information on this flag please comment.

shane-mckinney avatar Mar 12 '20 16:03 shane-mckinney

-ffpe-trap=list:

Specify a list of floating point exception traps to enable. On most systems, if a floating point exception occurs and the trap for that exception is enabled, a SIGFPE signal will be sent and the program being aborted, producing a core file useful for debugging. list is a (possibly empty) comma-separated list of the following exceptions: ‘invalid’ (invalid floating point operation, such as SQRT(-1.0)), ‘zero’ (division by zero), ‘overflow’ (overflow in a floating point operation), ‘underflow’ (underflow in a floating point operation), ‘inexact’ (loss of precision during operation), and ‘denormal’ (operation performed on a denormal value). The first five exceptions correspond to the five IEEE 754 exceptions, whereas the last one (‘denormal’) is not part of the IEEE 754 standard but is available on some common architectures such as x86.

From https://gcc.gnu.org/onlinedocs/gfortran/Debugging-Options.html.

Should raise an exception and halt execution if a floating point variable underflows/overflows.

daniellivingston avatar Mar 12 '20 16:03 daniellivingston