Chris Whittleston
Chris Whittleston

Reputation: 171

Interpolating between ifort -O2 and -O3 optimization flags

I'm trying to debug a segmentation fault which manifests when I compile one of my source files using ifort 13.1.3 with the -O3 optimization flag. If I use -O2 for this particular file and -O3 for the rest of my code, everything runs fine. As a result, I'm unable to compile with debugging symbols as the issue simply vanishes.

To try and narrow down which particular optimization operation is causing this, I'd like if possible to add in some of the more aggressive optimizations being done with -O3 but not -O2. From the 13.1.3 reference:

https://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/fortran-mac/

The additional high level optimizations seem to include:

There are probably a few others, but I can't identify them as being exclusive to -O3 from the reference. Are there flags I could use with -O2 to switch on some of these more aggressive options individually, or turn them off starting from -O3?

Upvotes: 3

Views: 1406

Answers (1)

Steve Lionel
Steve Lionel

Reputation: 7267

In general, no, there are not distinct options to enable and disable specific optimizations. Sometimes we have added options to disable certain optimizations when they help specific benchmarks, but that's unusual. If you still need help with this, please contact Intel support - we have the tools to further narrow down the cause, which sometimes is a compiler bug. I would suggest before doing so, however, that you first try the program with a newer compiler. 14.0.3 is current.

Upvotes: 1

Related Questions