Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

optimization flag confusion

grs2103
Beginner
629 Views
Looking at the reference guide, there are a lot of optimization flag options. Assuming I'm executing my program on the same system I'm compiling and linking it (OS X core2duo), is there, in general, anything other than the -fast flag I should try? Will it automatically optimize for the architecture, or should I be giving it a -mtune flag?
0 Kudos
2 Replies
TimP
Honored Contributor III
629 Views
-fast does select the option tieing the code most closely to the build CPU.
As you have dual core, you can do a quick check for threading opportunities with -parallel.
The first priority should be to assure correctness, and to make sure that you don't lose any accuracy by not invoking '-assume protect-parens -prec-div -prec-sqrt' (or maybe -fp-model source, which includes those).
0 Kudos
grs2103
Beginner
629 Views
Quoting - tim18
-fast does select the option tieing the code most closely to the build CPU.
As you have dual core, you can do a quick check for threading opportunities with -parallel.
The first priority should be to assure correctness, and to make sure that you don't lose any accuracy by not invoking '-assume protect-parens -prec-div -prec-sqrt' (or maybe -fp-model source, which includes those).

I gather compiling with the flag -fast -fp-model precise will optimize as much as possible while retaining floating point accuracy?
0 Kudos
Reply