Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shane-mckinney opened this issue Mar 12, 2020 · 1 comment
Open

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

shane-mckinney opened this issue Mar 12, 2020 · 1 comment

Comments

@shane-mckinney
Copy link
Collaborator

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.

@daniellivingston
Copy link
Member

-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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants