- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One of my source files seems to be causing difficulties during optimisation.
- compiling it with the following options takes an inordinate amount of time (~4 minutes of 100% CPU usage on a Xeon X5355 2.66GHz): -fpp -warn all -fpp -gen-interfaces -static -warn notruncated_source -assume realloc_lhs -heap-arrays -O3 -FR
- compiling it with the same options, but with -diag-enable sc added only takes a fraction of a second, which is what I am used to. However, I get "An internal threshold was exceeded for routine mode_filament_startup_ and optimization level may be reduced. See HTTP://SOFTWARE.INTEL.COM/EN-US/ARTICLES/INTERNAL-THRESHOLD-WAS-EXCEEDED for more information and advice." (by the way that link is dead, it should point here instead)
In fact, I am not particularly interested in optimising the loops in this particular file, so I wonder:
- Can I selectively disable optimisation of the loops in that file with in-source instructions to the compiler?
- What is going on when -diag-enable sc is on? Why is the behaviour so different?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
!dir$ optimize:1
(for example) at the top of a subroutine would have the effect of setting -O1 for that subroutine. See the compiler docs section on OPTIMIZE and NOOPTIMIZE. This may not turn off analysis performed by -diag-enable sc.
When the compiler sets NOOPTIMIZE, the setting persists for the remainder of a source file, and this could have the result that setting -O3 produces -O0 from that point on. I guess you are hitting tresholds only for -diag-enable sc, which attempts to perform a great deal of additional analysis, and would take longer than the 4 minutes you quote, if you over-rode the threshold.
- 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