Compaq Fortran
User Manual for
Tru64 UNIX and Linux Alpha Systems
Previous
Contents
Index
Chapter 4
4
Using the Ladebug Debugger
4.1
About the Ladebug and dbx Debuggers
4.2
Compaq Fortran Options for Debugging
4.3
Running the Debugger
4.3.1
Creating the Executable Program and Running the Debugger
4.3.1.1
Using Ladebug
4.3.1.2
Using dbx
4.3.2
Debugger Commands and Breakpoints
4.3.3
Ladebug Limitations
4.4
Sample Program and Debugging Session
4.5
Summary of Debugger Commands
4.6
Displaying Variables
4.6.1
Compaq Fortran Module Variables
4.6.2
Compaq Fortran Common Block Variables
4.6.3
Compaq Fortran Derived-Type Variables
4.6.4
Compaq Fortran Record Variables
4.6.5
Compaq Fortran Pointer Variables
4.6.6
Compaq Fortran Array Variables
4.6.6.1
Array Sections
4.6.6.2
Assignment to Arrays
4.6.7
Complex Variables
4.6.8
Compaq Fortran Data Types
4.7
Expressions in Debugger Commands
4.7.1
Fortran Operators
4.7.2
Procedures
4.8
Debugging Mixed-Language Programs with Ladebug
4.9
Debugging a Program that Generates an Exception
4.10
Locating Unaligned Data
4.11
Using Alternate Entry Points
4.12
Debugging Optimized Programs
Chapter 5
5
Performance: Making Programs Run Faster
5.1
Software Environment and Efficient Compilation
5.1.1
Install the Latest Version of Compaq Fortran and Performance Products
5.1.2
Compile Using Multiple Source Files and Appropriate f90 Options
5.1.3
Process Shell Environment and Related Influences on Performance
5.2
Analyzing Program Performance
5.2.1
Use the time Command to Measure Performance
5.2.2
Use Profiling Tools
5.2.2.1
Program Counter Sampling (prof)
5.2.2.2
Call Graph Sampling (gprof)
5.2.2.3
Basic Block Counting (pixie and prof)
5.2.2.4
Source Line CPU Cycle Use (prof and pixie)
5.2.3
Creating and Using Feedback Files and Optionally cord
5.2.4
Atom Toolkit
5.3
Data Alignment Considerations
5.3.1
Causes of Unaligned Data and Ensuring Natural Alignment
5.3.2
Checking for Inefficient Unaligned Data
5.3.3
Ordering Data Declarations to Avoid Unaligned Data
5.3.3.1
Arranging Data Items in Common Blocks
5.3.3.2
Arranging Data Items in Derived-Type Data
5.3.3.3
Arranging Data Items in Compaq Fortran Record Structures
5.3.4
Options Controlling Alignment
5.4
Using Arrays Efficiently
5.4.1
Accessing Arrays Efficiently
5.4.2
Passing Array Arguments Efficiently
5.5
Improving Overall I/O Performance
5.5.1
Use Unformatted Files Instead of Formatted Files
5.5.2
Write Whole Arrays or Strings
5.5.3
Write Array Data in the Natural Storage Order
5.5.4
Use Memory for Intermediate Results
5.5.5
Enable Implied-DO Loop Collapsing
5.5.6
Use of Variable Format Expressions
5.5.7
Efficient Use of Record Buffers and Disk I/O
5.5.8
Specify RECL
5.5.9
Use the Optimal Record Type
5.6
Additional Source Code Guidelines for Run-Time Efficiency
5.6.1
Avoid Small Integer and Small Logical Data Items
5.6.2
Avoid Mixed Data Type Arithmetic Expressions
5.6.3
Use Efficient Data Types
5.6.4
Avoid Using Slow Arithmetic Operators
5.6.5
Avoid EQUIVALENCE Statement Use
5.6.6
Use Statement Functions and Internal Subprograms
5.6.7
Code DO Loops for Efficiency
5.7
Optimization Levels: the -O
n
Option
5.7.1
Optimizations Performed at All Optimization Levels
5.7.2
Local (Minimal) Optimizations
5.7.2.1
Common Subexpression Elimination
5.7.2.2
Integer Multiplication and Division Expansion
5.7.2.3
Compile-Time Operations
5.7.2.4
Value Propagation
5.7.2.5
Dead Store Elimination
5.7.2.6
Register Usage
5.7.2.7
Mixed Real/Complex Operations
5.7.3
Global Optimizations
5.7.4
Additional Global Optimizations
5.7.4.1
Loop Unrolling
5.7.4.2
Code Replication to Eliminate Branches
5.7.5
Automatic Inlining
5.7.5.1
Interprocedure Analysis
5.7.5.2
Inlining Procedures
5.7.6
Loop Transformation and Software Pipelining
5.8
Other Options Related to Optimization
5.8.1
Loop Transformation
5.8.2
Software Pipelining
5.8.3
Setting Multiple Options with the -fast Option
5.8.4
Controlling Loop Unrolling
5.8.5
Controlling the Inlining of Procedures
5.8.6
Requesting Optimized Code for a Specific Processor Generation
5.8.7
Requesting the Speculative Execution Optimization
5.8.8
Request Nonshared Object Optimizations
5.8.9
Arithmetic Reordering Optimizations
5.8.10
Dummy Aliasing Assumption
Chapter 6
6
Using Parallel Compiler Directives
6.1
OpenMP Fortran API Compiler Directives
6.1.1
Compiler Command Line Option
6.1.2
Format for OpenMP Fortran API Directives
6.1.2.1
Directive Prefixes
6.1.2.2
Conditional Compilation Prefixes
6.1.3
Directive Summary Descriptions
6.1.4
The Parallel Processing Thread Model
6.1.5
Controlling the Data Environment
6.1.5.1
Privitizing Named Common Blocks
6.1.5.2
Controlling Data Scope Attributes
6.1.6
Parallel Region Construct
6.1.7
Worksharing Constructs
6.1.7.1
DO and END DO directives
6.1.7.2
SECTIONS, SECTION, and END SECTIONS Directives
6.1.7.3
SINGLE and END SINGLE Directives
6.1.8
Combined Parallel/Worksharing Constructs
6.1.8.1
PARALLEL DO and END PARALLEL DO Directives
6.1.8.2
PARALLEL SECTIONS and END PARALLEL SECTIONS Directives
6.1.9
Synchronization Constructs
6.1.9.1
ATOMIC Directive
6.1.9.2
BARRIER Directive
6.1.9.3
CRITICAL Directive
6.1.9.4
FLUSH Directive
6.1.9.5
MASTER Directive
6.1.9.6
ORDERED Directive
6.2
Compaq Fortran Parallel Compiler Directives
6.2.1
Compiler Command Line Option
6.2.2
Format for Compaq Fortran Parallel Directives
6.2.2.1
Directive Prefixes
6.2.3
Directive Summary Descriptions
6.2.4
The Parallel Processing Thread Model
6.2.5
Controlling the Data Environment
6.2.5.1
Privitizing Named Common Blocks
6.2.5.2
Controlling Data Scope Attributes
6.2.6
Parallel Region Construct
6.2.7
Worksharing Constructs
6.2.7.1
PDO and END PDO Directives
6.2.7.2
PSECTIONS, SECTION, and END PSECTIONS Directives
6.2.7.3
SINGLE PROCESS and END SINGLE PROCESS Directives
6.2.8
Combined Parallel/Worksharing Constructs
6.2.8.1
PARALLEL DO and END PARALLEL DO Directives
6.2.8.2
PARALLEL SECTIONS and END PARALLEL SECTIONS Directives
6.2.9
Synchronization Constructs
6.2.9.1
BARRIER Directive
6.2.9.2
CRITICAL SECTION and END CRITICAL SECTION Directives
6.2.10
Specifying a Default Chunk Size
6.2.11
Specifying a Default Schedule Type
6.3
Decomposing Loops for Parallel Processing
6.3.1
Directed Decomposition
6.3.1.1
Resolving Dependences Manually
6.3.1.2
Coding Restrictions
6.3.1.3
Manual Optimization
6.3.1.4
Adjusting the Run-Time Environment
6.4
Calls to Programs Written in Other Languages
6.5
Compiling, Linking, and Running Parallelized Programs
6.6
Debugging Parallelized Programs
6.6.1
Parallel Regions
6.6.2
Shared Variables
Previous
Next
Contents
Index