- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I'm building static FORTRAN libs that are linked into C++ Dlls.
When running my programs on Haswell-core-machines I get crashes in calls to DEXP which are reproducable in release and debug mode but do not happen on every call to DEXP only under certain preconditions.
The crashes happen on Haswell-Cores. But not on Sandy-Bridge (I don't have any Ivy-Bridge at hand).
Are there any alignment issues wrt. arguments/stack that are more strict for Haswell (and not obeyed by MSVC) ???
regards
Tobias
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not aware of any such thing. If you have a test case we could look at, we'd appreciate it. The math library does "auto-CPU dispatch", so it may well execute different code paths on a Haswell processor. Please also tell us the compile options you are using.
You might want to try using /Qimf-arch-consistency:true and see if it changes the behavior.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
I do not have a test-project (yet) but a colleague discovered the following: the crash only happens when running inside OMP parallel code, furthermore the crash ONLY seams to occurs for arguments to DEXP below -500.0D0 or above 500.0D0 (our code sometimes tried to calculate DEXP for values between -800.0D0 and -1200.0D0, that's when the crashes happened)
maybe that helps
Tobias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DEXP for < -708 or > +708 could lead to underflow or overflow for real(8) values. ( e^-708 ~ 10^-308 is the limit for real(8) ) I'm not sure if looking for values for between DEXP(-800d0) and DEXP(-1200d0) is a valid test.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do note that the math library does auto-CPU-dispatch, so it may execute different instructions on Haswell vs. older processors. You might try compiling with /Qimf-arch-consistency and see if the error goes away. This will reduce performance somewhat.
A test case we can look at would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tobias Loew wrote:
Hi Steve,
I do not have a test-project (yet) but a colleague discovered the following: the crash only happens when running inside OMP parallel code, furthermore the crash ONLY seams to occurs for arguments to DEXP below -500.0D0 or above 500.0D0 (our code sometimes tried to calculate DEXP for values between -800.0D0 and -1200.0D0, that's when the crashes happened)
maybe that helps
Tobias
Have you considered using the generic intrinsic functions of HUGE(x) and TINY(x) [for the kinds representation you use for real numbers] along with IEEE exceptions module to check your computations?

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