- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to control (in code) the internal optimizer (not the OpenMP optimizer.....just the regular -O1, -O2, -O3 levels) to the compiler? I have a section of code which the compiler is optimizing away, which I do not want it to remove. (The optimizer is behaving correctly -- this section of code is never reached, but we use this technique to explicitly link in certain versions of function calls at various link stages.) I tried searching the documentation, but all I could find references controlling the OpenMP optimizer.
Thanks
Thanks
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's an ifort directive
!dir$ optimize:0
placed in the top of a subroutine turns off optimization for that entire subroutine
I suppose you could try this to make a work-around to avoid dropping a linkage reference, not that it was intended that way.
!dir$ optimize:0
placed in the top of a subroutine turns off optimization for that entire subroutine
I suppose you could try this to make a work-around to avoid dropping a linkage reference, not that it was intended that way.

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