Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29280 Discussions

Numeric exception when calling pow-function

Tobias_Loew
Novice
438 Views

Hi,

on some computers (not all) I get a numeric exception when calling the pow function (by using the ** operator) with a negative base(~ - 1.7) and an exponent of 0.75. I get this exception even though the numeric exception flags are set to not trigger any exceptions (and I see it working correctly on other computers). I added a zip-file which contains a crash-dump and an xml-file containing information about the computer/processor where the crash happened and the modules loaded in the process. Hopefully someone at Intel can find out, what's the problem.

Tobias

0 Kudos
2 Replies
Steven_L_Intel1
Employee
438 Views

Sorry, there's nothing we can do with the crash dump. I'll comment that the exception flags don't carry into the math library, for the most part. What may be happening is that your different computers have different processor generations, which can cause the math library to take different code paths. Try building with /Qimf-arch-consistency and see what happens.

If you'd like us to investigate we will need sources for a buildable and runnable test case.

0 Kudos
Martyn_C_Intel
Employee
438 Views

It's normal that you get a NaN result, and a floating-point exception if these are unmasked. But your XML file showed an access violation, not a floating-point exception. Perhaps this is a result of subsequent computation that uses the NaN? I could invent ways that might conceivably happen, but to make real progress, we need a reproducer, as Steve says. Not just source code, but the exact command line and the compiler version used to compile it. If you want to experiment in the meantime, you could try adding /Qfp-speculation:safe and/or /fpe:3.

0 Kudos
Reply