Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

Numerical exception in Fortran 2019 causes application exit

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

0 Kudos
Steve_Lionel
Honored Contributor III
884 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?

0 Kudos
van_der_Merwe__Ben1
884 Views

I shall investigate and try and track this down more.

0 Kudos
Reply