HP Fortran Programmer Guide (766160-001, March 2014)
Table on page160 lists the assumptions that the optimizer makes about your program when you
compile with +Oconservative, +Oaggressive, or neither option (the default). The table also
lists the fine-tuning options that are invoked by +Oconservativeand +Oaggressive. The
options listed for the default case are the subset of the ones invoked by +Oconservative and
+Oaggressive. For information about the fine-tuning options listed in the third column, see Table
on page 152.
Table 30 Conservative, aggressive, and default optimizations
Invoked optionsAssumptionsSpecified options
+Onoentrysched
+Omoveflops
• Standard-conforming
+Onoconservative+Onoaggressive(the
default)
+Onoparmsoverlap
+Onovectorize
+Ofltacc+Oconservative
• Nonstandard
+Onomoveflops
• Sensitive to rounding
differences
+Oparmsoverlap
• Contains floating-point
expressions that must be
evaluated in the specified order
• Procedure arguments may
overlap
+Oentrysched
• Standard-conforming
+Oaggressive
+Onofltacc
• Contains floating-point
expressions that permit
re-ordering for optimization
+Onoinitcheck
+Ovectorize
• Does not contain uninitialized
variables
NOTE: The +Oaggressiveand +Oconservative options are valid only on the PA-RISC
systems.
Parallelizing HP Fortran programs
The following sections discuss how to use the +Oparallel option and the parallel directives when
preparing and compiling HP Fortran programs for parallel execution. Later sections also discuss
reasons why the compiler may not have performed parallelization. The last section describes
runtime warning and error messages unique to parallel-executing programs.
For a description of the +Oparalleloption, see “Fine-tuning optimization options” (page 40).
NOTE: The +Oparalleloption is not available on Integrity systems for HP Fortran Version 3.2
and later. You must use the +Oautop ar option instead to parallelize loops.
Compiling for parallel execution
The following command lines compile (without linking) three source files: x.f90, y.f90, and
z.f90. The files x.f90and y.f90are compiled for parallel execution. The file z.f90 is compiled
for serial execution, even though its object file will be linked with x.oandy.o.
f90 +O3 +Oparallel -c x.f90 y.f90
f90 +O3 -c z.f90
The following command line links the three object files, producing the executable file para_prog:
f90 +O3 +Oparallel -o para_prog x.o y.o z.o
100 Performance and optimization