- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Is there an equivalent of C compilers #pragma optimize("", off) in Fortran?
If not, is there any way to achieve the same effect?
thanks & regards,
Kalyan
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There have been requests for ability to plant compiler options by subroutine in the source file, but no action. That C pragma has limited usefulness. You're welcome to submit a premier.intel.com feature request.
I've adopted the fsplit/f90split method. You could set up the Makefile to split the functions automatically and apply options to individual files as necessary. If you do this in a separate directory, it's easy to recombine them into a library, or possibly an object file. Some say that the overall build process is faster this way; it does reduce memory requirement. Evidently, it eliminatescompile-time interprocedural analysis.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Along a line similar to what you asked are the command line options
ifort -
from_rtn 1 -to_rtn 9 file.f
which applies optimization only to the first 9 functions in the file. The primary use of that is for debugging. prefix -Q for windows, just - for linux. This does not necessarily shut the other functions all the way down to -O0 or /Od, but it does shut off back-end optimizations.
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