The lowest optimization level is -O0, which
does not optimize beyond the basic block. This is default when compiling
with -g for debugging.
The next level is the default -O1, what is used when no optimization
switches appear.
The next level of optimization -O2, is also what is set when you use
-O or -fast. -fast includes other specific optimizations judged by PGI
to be correct and effective on most cases we look at.
-O3 and -O4 are also available, which include optimizations that are new and should be
correct and should be effective, but do not always result in faster code than
lower optimizations, or may be a problem where results are sensitive to
small changes in data or operation order.
Thx for confirming by interpretation of the reference manual. Nevertheless I suggest to change the entry of “-O”, i.e. “Default: The compiler optimizes at level 2.” should read “Default: The compiler optimizes at level 1.”
At least all other entries list what action will be taken when the option in question isn’t given at all. Not the default in case the option gets no argument.