Compaq Fortran
User Manual for
OpenVMS Alpha Systems


Previous Contents Index

Chapter 4
4 Using the OpenVMS Debugger
     4.1     Overview
     4.2     Getting Started with the Debugger
         4.2.1         Compiling and Linking a Program to Prepare for Debugging
         4.2.2         Establishing the Debugging Configuration and Interface
         4.2.3         Invoking the Debugger
         4.2.4         Debugger Commands Used Often
         4.2.5         Debugger Breakpoints, Tracepoints, and Watchpoints
         4.2.6         Ending a Debugging Session
         4.2.7         Notes on Debugger Support for Compaq Fortran
     4.3     Sample Debugging Session
     4.4     Displaying Compaq Fortran Variables
         4.4.1         Accessing Compaq Fortran Common Block Variables
         4.4.2         Accessing Compaq Fortran Derived-Type Variables
         4.4.3         Accessing Compaq Fortran Record Variables
         4.4.4         Accessing Compaq Fortran Array Variables
         4.4.5         Accessing Compaq Fortran Module Variables
     4.5     Debugger Command Summary
         4.5.1         Starting and Terminating a Debugging Session
         4.5.2         Controlling and Monitoring Program Execution
         4.5.3         Examining and Manipulating Data
         4.5.4         Controlling Type Selection and Symbolization
         4.5.5         Controlling Symbol Lookup
         4.5.6         Displaying Source Code
         4.5.7         Using Screen Mode
         4.5.8         Editing Source Code
         4.5.9         Defining Symbols
         4.5.10         Using Keypad Mode
         4.5.11         Using Command Procedures and Log Files
         4.5.12         Using Control Structures
         4.5.13         Additional Commands
     4.6     Locating an Exception
     4.7     Locating Unaligned Data
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 FORTRAN Qualifiers
         5.1.3         Process Environment and Related Influences on Performance
     5.2     Analyze Program Performance
         5.2.1         Measuring Performance Using LIB$xxxx_TIMER Routines or Command Procedures
             5.2.1.1             The LIB$xxxx_TIMER Routines
             5.2.1.2             Using a Command Procedure
         5.2.2         The Performance and Coverage Analyzer (PCA)
     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 77 Record Structures
         5.3.4         Qualifiers Controlling Alignment
     5.4     Use Arrays Efficiently
         5.4.1         Accessing Arrays Efficiently
         5.4.2         Passing Array Arguments Efficiently
     5.5     Improve 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         Defaults for Blocksize and Buffer Count
         5.5.6         Specify RECL
         5.5.7         Use the Optimal Record Type
         5.5.8         Enable Implied-DO Loop Collapsing
         5.5.9         Use of Variable Format Expressions
     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 /OPTIMIZE=LEVEL=n qualifier
         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 Qualifiers Related to Optimization
         5.8.1         Loop Transformation
         5.8.2         Software Pipelining
         5.8.3         Setting Multiple Qualifiers with the /FAST Qualifier
         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 Generated Code for a Specific Processor Generation
         5.8.8         Arithmetic Reordering Optimizations
         5.8.9         Dummy Aliasing Assumption
Chapter 6
6 Compaq Fortran Input/Output
     6.1     Logical I/O Units
     6.2     Types of I/O Statements
     6.3     Forms of I/O Statements
     6.4     Types of Files and File Characteristics
         6.4.1         File Organizations
         6.4.2         Internal Files and Scratch Files
         6.4.3         I/O Record Types
             6.4.3.1             Portability Considerations of Record Types
             6.4.3.2             Fixed-Length Records
             6.4.3.3             Variable-Length Records
             6.4.3.4             Segmented Records
             6.4.3.5             Stream Records
             6.4.3.6             Stream_CR and Stream_LF Records
         6.4.4         Other File Characteristics
     6.5     Opening Files and the OPEN Statement
         6.5.1         Preconnected Files and Fortran Logical Names
             6.5.1.1             Preconnected Files
             6.5.1.2             Compaq Fortran Logical Names
         6.5.2         Disk Files and File Specifications
         6.5.3         OPEN Statement Specifiers
     6.6     Obtaining File Information: The INQUIRE Statement
         6.6.1         Inquiry by Unit
         6.6.2         Inquiry by File Name
         6.6.3         Inquiry by Output Item List
     6.7     Closing a File: The CLOSE Statement
     6.8     Record Operations
         6.8.1         Record I/O Statement Specifiers
         6.8.2         Record Access Modes
             6.8.2.1             Sequential Access
             6.8.2.2             Direct Access
             6.8.2.3             Keyed Access
         6.8.3         Shared File Use
         6.8.4         Specifying the Initial Record Position
         6.8.5         Advancing and Nonadvancing Record I/O
         6.8.6         Record Transfer
     6.9     Output Data Buffering and RMS Journaling


Previous Next Contents Index