XL Fortran for AIX 8.1

User's Guide


Contents

  • Figures

  • Summary of Changes for the XL Fortran Compiler

  • Part 1. Using XL Fortran Features

  • Chapter 1. Introduction
  • How to Read This Book
  • How to Read the Syntax Diagrams and Statements
  • Notes on the Examples in This Book
  • Notes on the Terminology in This Book
  • Related Documentation
  • XL Fortran and Operating System Publications
  • Other Publications
  • Standards Documents
  • Chapter 2. Overview of XL Fortran Features
  • Hardware and Operating-System Support
  • Language Support
  • Migration Support
  • Source-Code Conformance Checking
  • Highly Configurable Compiler
  • Diagnostic Listings
  • Symbolic Debugger Support
  • Program Optimization
  • Online Documentation
  • Chapter 3. Setting Up and Customizing XL Fortran
  • Where to Find Installation Instructions
  • Using the Compiler on a Network File System
  • Correct Settings for Environment Variables
  • Environment Variable Basics
  • Environment Variables for National Language Support
  • LIBPATH: Setting Library Search Paths
  • PDFDIR: Specifying the Directory for PDF Profile Information
  • TMPDIR: Specifying a Directory for Temporary Files
  • XLFSCRATCH_unit: Specifying Names for Scratch Files
  • XLFUNIT_unit: Specifying Names for Implicitly Connected Files
  • Customizing the Configuration File
  • Attributes
  • What a Configuration File Looks Like
  • Determining Which Level of XL Fortran Is Installed
  • Upgrading to XL Fortran Version 8
  • Things to Note in XL Fortran Version 8
  • Avoiding or Fixing Upgrade Problems
  • Running Two Levels of XL Fortran
  • Chapter 4. Editing, Compiling, Linking, and Running XL Fortran Programs
  • Editing XL Fortran Source Files
  • Compiling XL Fortran Programs
  • Compiling XL Fortran Version 2 Programs
  • Compiling Fortran 90 or Fortran 95 Programs
  • Compiling XL Fortran SMP Programs
  • Creating Other Compilation Commands
  • Compilation Order for Fortran Programs
  • Canceling a Compilation
  • XL Fortran Input Files
  • XL Fortran Output Files
  • Scope and Precedence of Option Settings
  • Specifying Options on the Command Line
  • Specifying Options in the Source File
  • Passing Command-Line Options to the "ld" or "as" Commands
  • Tracking Use of the Compiler
  • Compiling for POWER4, POWER3, POWER2, or PowerPC Systems
  • Passing Fortran Files through the C Preprocessor
  • cpp Directives for XL Fortran Programs
  • Passing Options to the C Preprocessor
  • Avoiding Preprocessing Problems
  • Linking XL Fortran Programs
  • Compiling and Linking in Separate Steps
  • Linking 32-Bit SMP Object Files Using the ld Command
  • Linking 64-Bit SMP Object Files Using the ld Command
  • Linking 32-Bit Non-SMP Object Files Using the ld Command
  • Linking 64-Bit Non-SMP Object Files Using the ld Command
  • Passing Options to the ld Command
  • Checking for Interface Errors at Link Time
  • Linking New Objects with Existing Ones
  • Relinking an Existing Executable File
  • Dynamic and Static Linking
  • Avoiding Naming Conflicts during Linking
  • Running XL Fortran Programs
  • Canceling Execution
  • Running Previously Compiled Programs
  • Compiling and Executing on Different Systems
  • POSIX Pthreads Binary Compatibility
  • Run-Time Libraries and Include Directories for POSIX Pthreads Support
  • Selecting the Language for Run-Time Messages
  • Setting Run-Time Options
  • OpenMP Environment Variables
  • Other AIX Environment Variables That Affect Run-Time Behavior
  • XL Fortran Run-Time Exceptions
  • Chapter 5. XL Fortran Compiler-Option Reference
  • Summary of the XL Fortran Compiler Options
  • Options That Control Input to the Compiler
  • Options That Specify the Locations of Output Files
  • Options for Performance Optimization
  • Options for Error Checking and Debugging
  • Options That Control Listings and Messages
  • Options for Compatibility
  • Option for New Language Extensions
  • Options for Floating-Point Processing
  • Options That Control Linking
  • Options That Control the Compiler Internal Operation
  • Options That Are Obsolete or Not Recommended
  • Detailed Descriptions of the XL Fortran Compiler Options
  • -# Option
  • -1 Option
  • -B Option
  • -b64 Option
  • -bdynamic, -bshared, and -bstatic Options
  • -bhalt Option
  • -bloadmap Option
  • -bmaxdata, -bmaxstack Options
  • -brtl Option
  • -bshared Option
  • -bstatic Option
  • -C Option
  • -c Option
  • -D Option
  • -d Option
  • -F Option
  • -g Option
  • -I Option
  • -k Option
  • -L Option
  • -l Option
  • -N Option
  • -O Option
  • -o Option
  • -P Option
  • -p Option
  • -Q Option
  • -q32 Option
  • -q64 Option
  • -qalias Option
  • -qalign Option
  • -qarch Option
  • -qassert Option
  • -qattr Option
  • -qautodbl Option
  • -qcache Option
  • -qcclines Option
  • -qcharlen Option
  • -qcheck Option
  • -qci Option
  • -qcompact Option
  • -qctyplss Option
  • -qdbg Option
  • -qddim Option
  • -qdirective Option
  • -qdlines Option
  • -qdpc Option
  • -qdpcl Option
  • -qescape Option
  • -qessl Option
  • -qextchk Option
  • -qextern Option
  • -qextname Option
  • -qfdpr Option
  • -qfixed Option
  • -qflag Option
  • -qfloat Option
  • -qflttrap Option
  • -qfree Option
  • -qfullpath Option
  • -qhalt Option
  • -qhot Option
  • -qhsflt Option
  • -qhssngl Option
  • -qieee Option
  • -qinit Option
  • -qinitauto Option
  • -qintlog Option
  • -qintsize Option
  • -qipa Option
  • -qkeepparm Option
  • -qlanglvl Option
  • -qlargepage Option
  • -qlibansi Option
  • -qlibessl Option
  • -qlibposix Option
  • -qlist Option
  • -qlistopt Option
  • -qlm Option
  • -qlog4 Option
  • -qmaxmem Option
  • -qmbcs Option
  • -qmixed Option
  • -qmoddir Option
  • -qnoprint Option
  • -qnullterm Option
  • -qobject Option
  • -qonetrip Option
  • -qoptimize Option
  • -qpdf Option
  • -qphsinfo Option
  • -qport Option
  • -qposition Option
  • -qqcount Option
  • -qrealsize Option
  • -qrecur Option
  • -qreport Option
  • -qsaa Option
  • -qsave Option
  • -qsclk Option
  • -qsmallstack Option
  • -qsigtrap Option
  • -qsmp Option
  • -qsource Option
  • -qspillsize Option
  • -qstrict Option
  • -qstrictieeemod Option
  • -qstrict_induction Option
  • -qsuffix Option
  • -qsuppress Option
  • -qswapomp Option
  • -qtbtable Option
  • -qthreaded Option
  • -qtune Option
  • -qundef Option
  • -qunroll Option
  • -qunwind Option
  • -qwarn64 Option
  • -qxflag=oldtab Option
  • -qxflag=xalias Option
  • -qxlf77 Option
  • -qxlf90 Option
  • -qxlines Option
  • -qxref Option
  • -qzerosize Option
  • -S Option
  • -t Option
  • -U Option
  • -u Option
  • -v Option
  • -V Option
  • -W Option
  • -w Option
  • -y Option
  • Chapter 6. Using XL Fortran in a 64-bit Environment
  • 64-Bit Large Data Type Support
  • 64-Bit Thread Support
  • Compiler Options for the 64-bit Environment
  • -q32 Option
  • -q64 Option
  • -qarch=rs64a Option
  • -qarch=rs64b Option
  • -qarch=rs64c Option
  • -qtune=rs64a Option
  • -qtune=rs64b Option
  • -qtune=rs64c Option
  • -qwarn64 Option
  • Default Bit Mode
  • Module Support
  • Chapter 7. XL Fortran Floating-Point Processing
  • IEEE Floating-Point Overview
  • Compiling for Strict IEEE Conformance
  • IEEE Single- and Double-Precision Values
  • IEEE Extended-Precision Values
  • Infinities and NaNs
  • Exception-Handling Model
  • Hardware-Specific Floating-Point Overview
  • Single- and Double-Precision Values
  • Extended-Precision Values
  • How XL Fortran Rounds Floating-Point Calculations
  • Selecting the Rounding Mode
  • Minimizing Rounding Errors
  • Minimizing Overall Rounding
  • Delaying Rounding until Run Time
  • Ensuring that the Rounding Mode is Consistent
  • Duplicating the Floating-Point Results of Other Systems
  • Maximizing Floating-Point Performance
  • Detecting and Trapping Floating-Point Exceptions
  • Compiler Features for Trapping Floating-Point Exceptions
  • Operating System Features for Trapping Floating-Point Exceptions
  • Installing an Exception Handler
  • Producing a Core File
  • Controlling the Floating-Point Status and Control Register
  • xlf_fp_util Procedures
  • fpgets and fpsets Subroutines
  • Sample Programs for Exception Handling
  • Causing Exceptions for Particular Variables
  • Minimizing the Performance Impact of Floating-Point Exception Trapping
  • Floating-Point Processing on the POWER and POWER2 Architectures
  • Precision of Computations
  • Invalid Operation Exceptions for SQRT Operations on POWER Processors
  • Chapter 8. Optimizing XL Fortran Programs
  • The Philosophy of XL Fortran Optimizations
  • Choosing an Optimization Level
  • Optimizing Floating-Point Calculations
  • Optimizing Loops and Array Language
  • Unrolling Loops
  • Efficiency of Different Array Forms
  • Reducing Use of Temporary Arrays
  • Cost Model for Loop Transformations
  • Describing the Hardware Configuration
  • Array Padding
  • Optimizing Conditional Branching
  • Optimizing Subprogram Calls
  • Finding the Right Level of Inlining
  • Optimizing for a Target Machine or Class of Machines
  • Debugging Optimized Code
  • Different Results in Optimized Programs
  • Where to Find the Optimizing Preprocessors
  • -Pk Preprocessor (Part of the KAP/Pro Toolset)
  • -Pv Preprocessor (Now Called the VAST-2 Preprocessor)
  • Chapter 9. AIX Implementation Details of XL Fortran Input/Output
  • Implementation Details of File Formats
  • File Names
  • Preconnected and Implicitly Connected Files
  • File Positioning
  • Preserving the XL Fortran Version 2.3 File Positioning
  • I/O Redirection
  • How XLF I/O Interacts with Pipes, Special Files, and Links
  • Default Record Lengths
  • File Permissions
  • Selecting Error Messages and Recovery Actions
  • Flushing I/O Buffers
  • Choosing Locations and Names for Input/Output Files
  • Naming Files That Are Connected with No Explicit Name
  • Naming Scratch Files
  • Increasing Throughput with Logical Volume I/O and Data Striping
  • Logical Volume I/O
  • Data Striping
  • Asynchronous I/O
  • Execution of an Asychronous Data Transfer Operation
  • Usage
  • Performance
  • Compiler-Generated Temporary I/O Items
  • System Setup
  • Linking
  • Error Handling
  • XL Fortran Thread-Safe I/O Library
  • Use of I/O Statements in Signal Handlers
  • Asynchronous Thread Cancellation
  • Chapter 10. Interlanguage Calls
  • Conventions for XL Fortran External Names
  • Mixed-Language Input and Output
  • Mixing Fortran and C++
  • Passing Data From One Language to Another
  • Passing Arguments Between Languages
  • Passing Global Variables Between Languages
  • Passing Character Types Between Languages
  • Passing Arrays Between Languages
  • Passing Pointers Between Languages
  • Passing Arguments By Reference or By Value
  • Returning Values from Fortran Functions
  • Arguments with the OPTIONAL Attribute
  • Arguments with the INTENT Attribute
  • Type Encoding and Checking
  • Assembler-Level Subroutine Linkage Conventions
  • The Stack
  • The Link Area
  • The Input Parameter Area
  • The Register Save Area
  • The Local Stack Area
  • The Output Parameter Area
  • Linkage Convention for Argument Passing
  • Argument Passing Rules (by Value)
  • Order of Arguments in Argument List
  • Linkage Convention for Function Calls
  • Pointers to Functions
  • Function Values
  • The Stack Floor
  • Stack Overflow
  • Prolog and Epilog
  • Traceback
  • THREADLOCAL Common Blocks and ILC with C
  • Example
  • Chapter 11. Problem Determination and Debugging
  • Understanding XL Fortran Error Messages
  • Error Severity
  • Compiler Return Code
  • The Run-Time Return Code
  • Understanding XL Fortran Messages
  • Limiting the Number of Compile-Time Messages
  • Selecting the Language for Messages
  • Fixing Installation or System Environment Problems
  • Fixing Compile-Time Problems
  • Duplicating Extensions from Other Systems
  • Isolating Problems with Individual Compilation Units
  • Running out of Machine Resources
  • Fixing Link-Time Problems
  • Fixing Run-Time Problems
  • Duplicating Extensions from Other Systems
  • Mismatched Sizes or Types for Arguments
  • Working around Problems when Optimizing
  • Input/Output Errors
  • Tracebacks and Core Dumps
  • Debugging a Fortran 90 or Fortran 95 Program
  • A Sample dbx Session for an XL Fortran Program
  • Problem with Dynamic Memory Allocation
  • Using Debug Memory Routines for XL Fortran
  • The libhm.a library
  • The libhmd.a library
  • Environment Variables
  • Chapter 12. Understanding XL Fortran Compiler Listings
  • Header Section
  • Options Section
  • Source Section
  • Error Messages
  • Transformation Report Section
  • Attribute and Cross-Reference Section
  • Object Section
  • File Table Section
  • Compilation Unit Epilogue Section
  • Compilation Epilogue Section

  • Part 2. Software Development Topics

  • Chapter 13. Fortran-Related AIX Commands
  • Working with Object-Code Archives (ar)
  • Printing Output Files with Fortran ASA Carriage Controls (asa)
  • Splitting Subprograms into Individual Files (fsplit)
  • Automating Large, Complex Compilations (make)
  • Run-Time Profiling (prof, gprof)
  • Translating Programs into RATFOR (struct)
  • Displaying Information Inside Binary Files (what)
  • Chapter 14. Porting Programs to XL Fortran
  • Outline of the Porting Process
  • Maintaining FORTRAN 77 Source and Object Code
  • Portability of Directives
  • NEW
  • Common Industry Extensions That XL Fortran Supports
  • Mixing Data Types in Statements
  • Date and Time Routines
  • Other libc Routines
  • Changing the Default Sizes of Data Types
  • Name Conflicts Between Your Procedures and XL Fortran Intrinsic Procedures
  • Reproducing Results from Other Systems
  • Finding Nonstandard Extensions
  • Chapter 15. Answers to Frequently Asked Questions
  • Finding the Date and Time
  • Making Calls to C Functions Work
  • Efficient Static Linking

  • Part 3. Appendixes

  • Appendix A. Sample Fortran Programs
  • Example 1 - XL Fortran Source File
  • Execution Results
  • Example 2 - Valid C Routine Source File
  • Example 3 - Valid Fortran SMP Source File
  • Example 4 - Invalid Fortran SMP Source File
  • Programming Examples Using the Pthreads Library Module
  • Appendix B. XL Fortran Technical Information
  • The Compiler Phases
  • External Names in the XL Fortran Shared Libraries
  • The XL Fortran Run-Time Environment
  • External Names in the Run-Time Environment
  • Technical Details of the -qfloat=hsflt Option
  • Implementation Details for -qautodbl Promotion and Padding
  • Terminology
  • Examples of Storage Relationships for -qautodbl Suboptions
  • Appendix C. XL Fortran Internal Limits

  • Notices
  • Trademarks and Service Marks
  • Glossary

  • INDEX

  • [ Top of Page | Previous Page | Next Page | Table of Contents | Index ]