- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running IVF 10.1 under WinXP (32-Bit) and try to configure a project such that it causes a floating point exception if an expression evaluates to NaN (not a number).
According to the documentation I suspect that using /fpe:0 would cause this behaviour, but it does not seem to work. In the debugger I see that some elements of an array rs(:) become NaN when executing the statement
rs(i) = 3.D0*((a_(i+1)-a_(i))/h(i) - (a_(i)-a_(i-1))/h(i-1))
However, no exception. Did I misunderstand the documentation? Or, what do I have to do to cause the runtime system catch NaNs?
Joerg Kuthe
QT software
According to the documentation I suspect that using /fpe:0 would cause this behaviour, but it does not seem to work. In the debugger I see that some elements of an array rs(:) become NaN when executing the statement
rs(i) = 3.D0*((a_(i+1)-a_(i))/h(i) - (a_(i)-a_(i-1))/h(i-1))
However, no exception. Did I misunderstand the documentation? Or, what do I have to do to cause the runtime system catch NaNs?
Joerg Kuthe
QT software
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/fpe:0 has an effect only if the main program is Fortran. Is yours?
In the upcoming version 11.1, there's a new option, /fpe-all, which can be used to specify behavior for all procedures even when the main program is not Fortran.
In the upcoming version 11.1, there's a new option, /fpe-all, which can be used to specify behavior for all procedures even when the main program is not Fortran.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your prompt reply.
Yes, the main program is written in Fortran.
So far, only the numerical libraries which are built in "sub-projects" are configured with /fpe:0. Now, I also set /fpe:0 for the main project hoping that this would help. But it didn't change anything. The NaNs in my program do not cause an exception. Any idea what I can do before the release of 11.1?
All the best
Joerg Kuthe
Yes, the main program is written in Fortran.
So far, only the numerical libraries which are built in "sub-projects" are configured with /fpe:0. Now, I also set /fpe:0 for the main project hoping that this would help. But it didn't change anything. The NaNs in my program do not cause an exception. Any idea what I can do before the release of 11.1?
All the best
Joerg Kuthe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I doubt 11.1 will help you in this regard - but setting /fpe:0 on the main program was important. Does adding /fp:strict help? Can you provide a small test case that shows the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
I doubt 11.1 will help you in this regard - but setting /fpe:0 on the main program was important. Does adding /fp:strict help? Can you provide a small test case that shows the problem?
Joerg

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page