Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26734 Discussions

Numerical exception in Fortran 2019 causes application exit

van_der_Merwe__Ben1
172 Views

In Intel Fortran 2019 update 5, we note that code such as this:

   aSTension = 673.7 * ((aTcrR-aBNTempR)/aTcrR)**1.232

where "((aTcrR-aBNTempR)/aTcrR)" is a small negative number can cause an application to just exit. I may be mistaken, but I do not think it happend with Intel Fortran 2016, or maybe a flag or default was changed.

Is there a flag or setting to inhibit floating point exceptions in Intel Fortran 2019?  A "Just carry on! Do not kill my entire large program because of one issue" setting. We do have a top level exception handlers, but it does not seem to get hit by this.

0 Kudos
3 Replies
van_der_Merwe__Ben1
172 Views

Out relevant compile flags are: /fp:source /warn:nofileopt /align:rec1byte /check:bounds /traceback
/check:uninit /check:pointers /iface:mixed_str_len_arg /check:bounds /debug:full /warn:declarations /check:uninit /auto /Qdiag-error:6717 /compile_only /dll /threads /assume:byterecl /libs:dll

If I change the code to intentionally do a pow on a negative number it simply generates a NaN, as I would expect. Odd. Maybe it was a denormalized number causing it?

if anyone has seen anything like this, please let me know.

Steve_Lionel
Black Belt Retired Employee
172 Views

What kind of exception? The default setting is -fpe3 that produces infinities, NaNs and denorms. But exponentiation is done in a library routine and it might not honor this (I am not sure.)

An application should not "just exit" - you should get a distinct error message and possibly a traceback, depending on how it was built. Can you construct a small test case that demonstrates the issue?

van_der_Merwe__Ben1
172 Views

I shall investigate and try and track this down more.

Reply