XL Fortran for AIX 8.1

User's Guide


Chapter 4. Editing, Compiling, Linking, and Running XL Fortran Programs

Partial Table-of-Contents

  • 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
  • Levels of POSIX pthreads API Support
  • 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
  • The XLFRTEOPTS Environment Variable
  • The XLSMPOPTS Environment Variable
  • OpenMP Environment Variables
  • OMP_DYNAMIC Environment Variable
  • OMP_NESTED Environment Variable
  • OMP_NUM_THREADS Environment Variable
  • OMP_SCHEDULE Environment Variable
  • Other AIX Environment Variables That Affect Run-Time Behavior
  • XL Fortran Run-Time Exceptions
  • Most Fortran program development consists of a repeating cycle of editing, compiling and linking (which is by default a single step), and running. If you encounter problems at some part of this cycle, you may need to refer to the chapters that follow this one for help with optimizing, debugging, and so on.

    Prerequisite Information:

    1. Before you can use the compiler, all the required AIX settings (for example, certain environment variables and storage limits) must be correct for your user ID; for details, see Correct Settings for Environment Variables.
    2. Before using the compiler for a specialized purpose, such as porting or performance tuning, look at the categories of options in Summary of the XL Fortran Compiler Options to see if XL Fortran already provides a solution.
    3. To learn more about writing Fortran programs, refer to the XL Fortran for AIX Language Reference.

    Note that you can substitute references to libxlf90_r.a in this chapter with references to libxlf90.a. This is because a link is provided from the libxlf90.a library to the libxlf90_r.a library. You do not need to manually link with separate libraries depending on whether you are creating a threaded or a non-threaded application. XL Fortran determines at run time whether your application is threaded.


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