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.
29286 Discussions

DVF V5 and CVF V6 floating-point exceptions compatibility ??

philippe_vouters
Beginner
657 Views
CVF V6.5 Intel 32.
A customer is compiling/linking with DVF V5 a DLL which does a
floating-point divide by zero. He is also mixing VS V5 C++ with Fortran.
VS C++ calls _controlfp prior to calling the Fortran which volontarily does a
divide by zero. He claims that with DVF V5, the program aborts on
the call to Fortran, whereas with DVF V6, it does not abort.
So his question is how to get the DVF V5 Run-Time compatibility on
floating-points exception handling with CVF V6.5 ?
Philippe
0 Kudos
3 Replies
Steven_L_Intel1
Employee
657 Views
This is a complex subject. The issue is not version compatibility, but rather what compile options were used. When you have a DLL called from a non-Fortran main program, it gets more complicated.

There is quite a bit of text on this subject in the CVF Programmer's Guide. I'm not an expert on this subject, but I think that at a minimum, the DLL has to be compiled with /fpe:3.
0 Kudos
philippe_vouters
Beginner
657 Views
Hi Steve,
Many thanks for your answer. However /fpe:3 which is the defaulton IA32 with DVF V5, has been also forced as a compile-time option to no success. It is as if CVF V6 is resetting the fpe mask causing a previous C++ _controlfp to be lost. Would you be so kind as to tell me whether CVF V6 calls controlfp in one of its initialization routines and how to avoid it ?
Thank you in advance.
Philippe
0 Kudos
Steven_L_Intel1
Employee
657 Views
If I recall correctly, the setting of the FP mask is done only in a main program, not a DLL.

I'm sorry to say that I won't be able to provide more detailed assistance on this sort of CVF issue.
0 Kudos
Reply