- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have used O2 optimization of Intel C compiler version 10.0.1 for compilation of one of our application which is computationally intensive to be run over a IA 32 Linux machine. Though we could observe significant reduction in the time taken by the compiled code, a lot of floating point values that are given as output do not match with the outputs without using any optimization.
We suspect that the O2 optimization has caused some approximation resulting in loosing the accuracy of the application.
Can any one kindly throw us light on to the issue. Is it possible for us to use O2 optimization and still be able to fine tune the application such that we don't loose accuracy.
We have used O2 optimization of Intel C compiler version 10.0.1 for compilation of one of our application which is computationally intensive to be run over a IA 32 Linux machine. Though we could observe significant reduction in the time taken by the compiled code, a lot of floating point values that are given as output do not match with the outputs without using any optimization.
We suspect that the O2 optimization has caused some approximation resulting in loosing the accuracy of the application.
Can any one kindly throw us light on to the issue. Is it possible for us to use O2 optimization and still be able to fine tune the application such that we don't loose accuracy.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Add the option -fp-model precise If you use SSE options, and depend on double evaluation of float expressions, there is fp-model double , but explicit casts would be better for that purpose.
If you don't use SSE, mixed float and double expressions can be greatly speeded up by the shortcuts which the optimization takes when you don't use -fp-model precise, but the compiler will ignore many (float) casts.
If you don't use SSE, mixed float and double expressions can be greatly speeded up by the shortcuts which the optimization takes when you don't use -fp-model precise, but the compiler will ignore many (float) casts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In fact, you may want to look over the documentation for -fp-model to determine which setting is most appropriate for your app.
Dale
Dale
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