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

Compiler switch: /optimize:2 and /O2

abhimodak
New Contributor I
334 Views
I think the compiler switches /optimize:2 and /O2 are not equivalent. The current documentation says that /O2 is equivalent to /optimize:1 + /optimize:2. However, that does not seem to be working either.

Focusing only on loop vectorization, for example, with the default /O2 loops are vectorized while use of /optimize:2 does not do it.

Are /optimize:n deprecated?

Abhi
0 Kudos
1 Reply
Steven_L_Intel1
Employee
334 Views

You are correct that the documentation is wrong. /optimize:3 is equivalent to /O2 - /optimize:2 is equivalent to /O1. /optimize is the "DEC spelling" and is indeed deprecated.

I will let the writers know. Thanks for bringing this to our attention.

To summarize:

/optimize:0 = /Od
/optimize:1 or 2 = /O1
/optimize:3 or 4 = /O2
/optimize:5 = /O3
0 Kudos
Reply