Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

OPTIMIZATION

monsieuralok
Beginner
339 Views
Hi, I am using Intel fortran compiler (ifort). I have an old Fortran code written in Fortan66. There are many common block in that code. My problem is that if I use -O1, -O2, -O3 or -O0 it gives very different results. Therefore, I am looking for some other options which can optimize this code and donot optimize these common blocks which might be having problem.

as, I am not aware of other optimization flags please could be help me sort out this issue.

thanks a lot
Alok
0 Kudos
1 Reply
TimP
Honored Contributor III
339 Views
Tinkering with optimization level is unlikely to solve many problems with common block usage, unless you eventually use OpenMP or -parallel. You may find it useful to set -fp-model source so as to avoid aggressive algebraic recombinations. If your program violates the rule against communicating data both in COMMON and in arguments, -assume dummy_aliases may help.
It's more likely you have problems with uninitialized variables or subscript range violations. Try the static checking (-diag-enable sc) and run-time checking (-check) to help find and correct these.

0 Kudos
Reply