HP Fortran Programmer's Guide (B3908-90031; September 2011)

Performance and optimization
Using options to control optimization
Chapter 6 151
Nearly all of the optimization options can be used to enable or disable an optimization or a package of
optimizations. For example, the following command line requests aggressive level 4 optimizations that do
not result in roundoff errors:
$ f90 +O4 +Oaggressive +Ofltacc prog.f90
The f90.1 manpage fully describes all of the optimization options.
Table 6-2 Packaged optimization options
Option Level Function
+O[no]aggressive +O2 or higher Enable [disable] optimizations that can
significantly improve performance in
standard-conforming programs. The default is
+Onoaggressive. For more information about
this option, see “Conservative vs. aggressive
optimization” on page 162.
NOTE: This option is valid only on the PA-RISC
systems.
+O[no]all Invokes highest
level
Enable [disable] maximum optimization. The
default is +Onoall.
+O[no]autopar Do [do not] automatically parallelize loops that are
deemed safe and profitable by the loop
parallelizer. The default is +Onoautopar. The
+Oautopar option can be used for programs at
optimization levels, +O3 and above.
If both +Oopenmp and +Oautopar are specified
on the command line, the OpenMP directives gain
precedence over the +Oautopar option. The
compiler auto-parallelizes only the loops of code
that are not controlled by the OpenMP directives.
To compile a program with +Oautopar support,
the libcps, libomp, and libpthreads runtime
support libraries must be present at compile-time
and runtime. This feature is available on Integrity
systems and HP 9000 systems.