HP Fortran Programmer Guide HP-UX 11i v1, HP-UX 11i v2, and HP-UX 11i v3 (B3908-90032,December 2012)

Floating Installation.................................................................................................................63
Setting up Floating Installation.............................................................................................64
3 Controlling data storage............................................................................65
Disabling implicit typing..........................................................................................................65
Automatic and static variables..................................................................................................65
Increasing the precision of constants.........................................................................................67
Increasing default data sizes....................................................................................................68
Figure 3-1Increasing default data sizes..................................................................................68
Sharing data among programs.................................................................................................70
Modules vs. common blocks.....................................................................................................72
4 Debugging..............................................................................................74
Using the HP WDB debugger..................................................................................................74
Stripping debugging information..............................................................................................74
Handling runtime exceptions....................................................................................................75
Bus error exception............................................................................................................76
Floating-point exceptions.....................................................................................................76
Illegal instruction exception.................................................................................................77
Segmentation violation exception.........................................................................................77
Bad argument exception.....................................................................................................78
Using debugging lines............................................................................................................78
5 Using the ON statement............................................................................79
Exceptions handled by the ON statement..................................................................................79
Actions specified by ON.........................................................................................................80
Terminating program execution............................................................................................81
Ignoring errors...................................................................................................................81
Calling a trap procedure....................................................................................................82
Trapping floating-point exceptions...................................................................................82
Trapping integer overflow exceptions...............................................................................82
Trapping +Ctrl-C trap interrupts................................................................................................83
Allowing core dumps..............................................................................................................83
6 Performance and optimization ...................................................................85
Using profilers........................................................................................................................85
HP Caliper........................................................................................................................85
Invoking HP Caliper with the compiler to optimize your program.........................................86
Comparing Program Performance....................................................................................86
Using Options to Control Data Collection.........................................................................87
Specifying PBO file names and locations..........................................................................87
gprof................................................................................................................................87
prof.................................................................................................................................88
Using options to control optimization.........................................................................................88
Using +O to set optimization levels......................................................................................88
Using the optimization options.............................................................................................89
Conservative vs. aggressive optimization...................................................................................97
Parallelizing HP Fortran programs.............................................................................................98
Compiling for parallel execution..........................................................................................98
Performance and parallelization...........................................................................................99
Profiling parallelized programs............................................................................................99
Conditions inhibiting loop parallelization..............................................................................99
Calling routines with side effects parallellization ...............................................................99
Indeterminate iteration counts.......................................................................................100
Data dependences......................................................................................................100
Vectorization........................................................................................................................101
Using the +Ovectorize option............................................................................................101
4 Contents