- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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 ?
floating-points exception handling with CVF V6.5 ?
Philippe
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
I'm sorry to say that I won't be able to provide more detailed assistance on this sort of CVF issue.

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