DIGITAL Fortran 90
User Manual for
DIGITAL UNIX Systems


Previous Contents Index

Chapter 4
4 Using the DIGITAL UNIX Ladebug Debugger
     4.1     About the Ladebug and dbx Debuggers
     4.2     DIGITAL Fortran 90 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.4     Sample Program and Debugging Session
     4.5     Summary of Debugger Commands
     4.6     Displaying Variables
         4.6.1         DIGITAL Fortran 90 Module Variables
         4.6.2         DIGITAL Fortran 90 Common Block Variables
         4.6.3         DIGITAL Fortran 90 Derived-Type Variables
         4.6.4         DIGITAL Fortran 90 Record Variables
         4.6.5         DIGITAL Fortran 90 Pointer Variables
         4.6.6         DIGITAL Fortran 90 Array Variables
             4.6.6.1             Array Sections
             4.6.6.2             Assignment to Arrays
         4.6.7         Complex Variables
         4.6.8         DIGITAL Fortran 90 Data Types
         4.6.9         Ladebug Limitations
     4.7     Expressions in Debugger Commands
     4.8     Debugging Mixed-Language Programs with Ladebug
     4.9     Debugging a Program that Generates an Exception
     4.10     Locating Unaligned Data
     4.11     Use of 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 DIGITAL Fortran 90 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 DIGITAL 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 -Onum 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


Previous Next Contents Index