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

Optimization level reduced

Keith_R_
Novice
676 Views
One of the modules of our electronic structure code is sufficiently
large and complex that the optimizer grows to a huge memory requirement
(approaching 1GB) and takes an inordinately long time to compile.

On the Itanium platform under ifort 8.0 and 8.1 I now get a message
to the effect that it has consumed too many resourses and the optimization
level will be reduced. The original compile specified -O3.

My questions are

1) Exactly what optimizations are turned off? Is the result equivalent
to compiling the whole thing at -O0, -O1, -O2 or something else?
2) Is it better to accept the optimizer's judgement or to recompile
at a lower level,(-O2).

Keith Refson
0 Kudos
3 Replies
Steven_L_Intel1
Employee
676 Views
My suggestion is to compare against a build at -O2 and see which runs better for you. There is no strict rule about this.
0 Kudos
TimP
Honored Contributor III
676 Views
When the optimization is turned down automatically, it becomes equivalent to -O0. Almost certainly, that is not what you want. As Steve said, you may have to try -O1 and -O2 to see how they go for you. If you still get the automatic cancellation of optimization, you will need to add -override_limits to force the optimization to stay on.
0 Kudos
Steven_L_Intel1
Employee
675 Views
Be aware that -override_limits may cause the compilation to never complete, use too much memory, or possibly get other errors. From the perspective of the compiler developers and support, we don't recommend regular use of -override_limits. It may be handy in some specific cases.
We would also like to see the source that causes the compiler to complain - please file a Premier Support request and attach the necessary source(s).
0 Kudos
Reply