FPE Trapping

FPE Trapping

Hello,

In my code there are several palces producing Nan. For some reason, I want to trap only one of them which is in a specific module, not the other ones. What I tried and did not work is,

1) When I activate the -fpe0 option the programme stops at the first Nan which is not the one I want to trap. 

2) I compiled only the module of interest with the -fpe0 option. This did not work either.

3) I used IFCORE module and the FOR_SET_FPE option only in the module of ineterst. However, this is also catching all the Nan all over the entire programme.

How can I trap the Nans only in a specific module/subroutine?

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

If you know what variable(s) you are looking at you can call the function IEEE_IS_NAN (x), an then do something based on a TRUE result such as output some data or set a debugger breakpoint....

I am aware of isnan function, but this is not a problem that can be solved with this approach (Huge iterative code, hard to trace a Nan with debugger ...etc). I need a method defined in my first post. Thank you anyway.

Use /fpe-all:0 on the routine where you want to trap. /fpe (without -all) affects the main program only,

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today