- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am running into a problem (with icc,icpc,ifort 11) in which -O1 yields code that produces results that are "correct" while -O2 makes code that produces results that are "incorrect". I would like to incrementally add optimization options, stepping between -O1 and -O2 to see what precisely breaks the code (and then fix the code / submit a bug report). I have been unable to find an exact list of fine-grained optimization options -O2 is an alias for. Can anybody point me to such a list so that I can debug my problem?
Thanks!
- Christian
I am running into a problem (with icc,icpc,ifort 11) in which -O1 yields code that produces results that are "correct" while -O2 makes code that produces results that are "incorrect". I would like to incrementally add optimization options, stepping between -O1 and -O2 to see what precisely breaks the code (and then fix the code / submit a bug report). I have been unable to find an exact list of fine-grained optimization options -O2 is an alias for. Can anybody point me to such a list so that I can debug my problem?
Thanks!
- Christian
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The -list option, if available in your versions of the compilers, will give a detailed list of the options in effect.
However, I think that with source code of nontrivial size this approach will not do much for you. In particular, if there are array overruns or uninitialized variables, the interactions of those bugs with optimization options can be very unpredictable and elusive.
However, I think that with source code of nontrivial size this approach will not do much for you. In particular, if there are array overruns or uninitialized variables, the interactions of those bugs with optimization options can be very unpredictable and elusive.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may wish to try options such as -fp-model source or its components, if you haven't done so, to see whether those transformations are breaking your code. -fimf-arch-consistency=true is available in 12.0.4, but you could turn off vector math functions by -no-fast-transcendentals in 11.x. Also, the -x options have more effect at -O2 than at -O1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Before you assume a compiler error please enable all the runtime checks.
jim
jim

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