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

Specified options

Assumptions

Invoked options

+Onoconservative+Onoaggressive(the

Standard-conforming

+Onoentrysched

default)

+Omoveflops

 

 

+Onoparmsoverlap

 

+Onovectorize

+Oconservative

+Oaggressive

Nonstandard

Sensitive to rounding differences

Contains floating-point expressions that must be evaluated in the specified order

Procedure arguments may overlap

Standard-conforming

Contains floating-point expressions that permit re-ordering for optimization

Does not contain uninitialized variables

+Ofltacc

+Onomoveflops

+Oparmsoverlap

+Oentrysched

+Onofltacc

+Onoinitcheck

+Ovectorize

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

Page 100
Image 100
HP UX Fortran Software manual Parallelizing HP Fortran programs, Compiling for parallel execution