- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have file a Premier Support issue for this problem. For your reference, it's DPD200164002. I will update this thread once we have a resolution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know if this is a real bug or a floating point issue. For example thecutdown test case in the original thread posting result in a Floating point exception at -O3, -O2. However,if you add the option
-fp-model precise
You will not get the error. You might want to take a look at the documentation on -fp-model
$ cat test.cpp
#include
#include
int main(void )
{
const unsigned int VPointDimension = 3;
double center[3] = {1.0, 1.0, 1.0};
double radius[3];
unsigned int j = 0;
double pnt[3];
for ( unsigned int i = 0; i < VPointDimension; i++ )
{
pnt = center + pow( -1.0, ( (double)( j / ( int( pow(2.0, (double)i) ) ) ) ) ) * radius;
}
std::cout << pnt[0] << " " << pnt[1] << " " << pnt[2] << std::endl;
return 0;
}
$ icpc -O3 test.cpp; ./a.out
Floating point exception
$ icpc -O3 -fp-model precise test.cpp; ./a.out
1 1 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page