464
XL Fortran Enterprise Edition for AIX User’s Guide Version 9.1 SC09-7898-00

XL Fortran Enterprise Edition for AIX : User's Guidebloh/pdffile/xlf91_ug.pdf · XL Fortran Enterprise Edition for AIX User’s Guide Version 9.1 SC09-7898-00

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

  • XL

    Fortran

    Enterprise

    Edition

    for

    AIX

    User’s

    Guide

    Version

    9.1

    SC09-7898-00

    ���

  • XL

    Fortran

    Enterprise

    Edition

    for

    AIX

    User’s

    Guide

    Version

    9.1

    SC09-7898-00

    ���

  • Note!

    Before

    using

    this

    information

    and

    the

    product

    it

    supports,

    be

    sure

    to

    read

    the

    general

    information

    under

    “Notices”

    on

    page

    427.

    First

    Edition

    (August

    2004)

    This

    edition

    applies

    to

    IBM

    XL

    Fortran

    Enterprise

    Edition

    (Program

    5724-I08),

    Version

    9.1,

    and

    to

    all

    subsequent

    releases

    and

    modifications

    until

    otherwise

    indicated

    in

    new

    editions.

    Make

    sure

    you

    are

    using

    the

    correct

    edition

    for

    the

    level

    of

    the

    product.

    IBM

    welcomes

    your

    comments.

    You

    can

    send

    your

    comments

    electronically

    to

    the

    network

    ID

    listed

    below.

    Be

    sure

    to

    include

    your

    entire

    network

    address

    if

    you

    wish

    a

    reply.

    v

    Internet:

    [email protected]

    When

    you

    send

    information

    to

    IBM,

    you

    grant

    IBM

    a

    nonexclusive

    right

    to

    use

    or

    distribute

    the

    information

    in

    any

    way

    it

    believes

    appropriate

    without

    incurring

    any

    obligation

    to

    you.

    ©

    Copyright

    International

    Business

    Machines

    Corporation

    1990,

    2004.

    All

    rights

    reserved.

    US

    Government

    Users

    Restricted

    Rights

    Use,

    duplication

    or

    disclosure

    restricted

    by

    GSA

    ADP

    Schedule

    Contract

    with

    IBM

    Corp.

  • Contents

    Figures

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . ix

    What’s

    New

    for

    XL

    Fortran

    .

    .

    .

    .

    .

    . xi

    Introduction

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 1

    How

    to

    Use

    This

    Document

    .

    .

    .

    .

    .

    .

    .

    .

    . 1

    How

    to

    Read

    the

    Syntax

    Diagrams

    and

    Statements

    2

    Notes

    on

    the

    Examples

    in

    This

    Document

    .

    .

    . 4

    Notes

    on

    the

    Terminology

    in

    This

    Document

    .

    . 4

    Typographical

    Conventions

    .

    .

    .

    .

    .

    .

    .

    . 4

    Related

    Documentation

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 4

    XL

    Fortran

    and

    Operating

    System

    Publications

    .

    . 4

    Other

    Publications

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 5

    Standards

    Documents

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 5

    Overview

    of

    XL

    Fortran

    Features

    .

    .

    .

    . 7

    Hardware

    and

    Operating-System

    Support

    .

    .

    .

    . 7

    Language

    Support

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 7

    Migration

    Support

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 8

    Source-Code

    Conformance

    Checking

    .

    .

    .

    .

    .

    . 8

    Highly

    Configurable

    Compiler

    .

    .

    .

    .

    .

    .

    .

    . 8

    Diagnostic

    Listings

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 9

    Symbolic

    Debugger

    Support

    .

    .

    .

    .

    .

    .

    .

    .

    . 9

    Program

    Optimization

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 9

    Documentation

    and

    Online

    Help

    .

    .

    .

    .

    .

    .

    . 9

    Setting

    Up

    and

    Customizing

    XL

    Fortran

    11

    Where

    to

    Find

    Installation

    Instructions

    .

    .

    .

    .

    . 11

    Using

    the

    Compiler

    on

    a

    Network

    File

    System

    .

    . 11

    Correct

    Settings

    for

    Environment

    Variables

    .

    .

    .

    . 12

    Environment

    Variable

    Basics

    .

    .

    .

    .

    .

    .

    .

    . 12

    Environment

    Variables

    for

    National

    Language

    Support

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 13

    LIBPATH:Setting

    Library

    Search

    Paths

    .

    .

    .

    . 14

    PDFDIR:

    Specifying

    the

    Directory

    for

    PDF

    Profile

    Information

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 14

    TMPDIR:

    Specifying

    a

    Directory

    for

    Temporary

    Files

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 15

    XLFSCRATCH_unit:

    Specifying

    Names

    for

    Scratch

    Files

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 15

    XLFUNIT_unit:

    Specifying

    Names

    for

    Implicitly

    Connected

    Files

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 15

    Customizing

    the

    Configuration

    File

    .

    .

    .

    .

    .

    . 15

    Attributes

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 16

    What

    a

    Configuration

    File

    Looks

    Like

    .

    .

    .

    . 18

    Determining

    Which

    Level

    of

    XL

    Fortran

    Is

    Installed

    24

    Upgrading

    to

    XL

    Fortran

    Version

    9

    .

    .

    .

    .

    .

    . 24

    Things

    to

    Note

    in

    XL

    Fortran

    Version

    9

    .

    .

    .

    . 24

    Avoiding

    or

    Fixing

    Upgrade

    Problems

    .

    .

    .

    .

    . 25

    Running

    Two

    Levels

    of

    XL

    Fortran

    .

    .

    .

    .

    .

    . 28

    Editing,

    Compiling,

    Linking,

    and

    Running

    XL

    Fortran

    Programs

    .

    .

    .

    . 29

    Editing

    XL

    Fortran

    Source

    Files

    .

    .

    .

    .

    .

    .

    .

    . 29

    Compiling

    XL

    Fortran

    Programs

    .

    .

    .

    .

    .

    .

    . 29

    Compiling

    XL

    Fortran

    Version

    2

    Programs

    .

    .

    . 31

    Compiling

    Fortran

    90

    or

    Fortran

    95

    Programs

    .

    . 31

    Compiling

    XL

    Fortran

    SMP

    Programs

    .

    .

    .

    . 32

    Compilation

    Order

    for

    Fortran

    Programs

    .

    .

    . 33

    Canceling

    a

    Compilation

    .

    .

    .

    .

    .

    .

    .

    .

    . 33

    XL

    Fortran

    Input

    Files

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 33

    XL

    Fortran

    Output

    Files

    .

    .

    .

    .

    .

    .

    .

    .

    . 34

    Scope

    and

    Precedence

    of

    Option

    Settings

    .

    .

    . 36

    Specifying

    Options

    on

    the

    Command

    Line

    .

    .

    . 36

    Specifying

    Options

    in

    the

    Source

    File

    .

    .

    .

    .

    . 37

    Passing

    Command-Line

    Options

    to

    the

    ″ld″

    or

    ″as″

    Commands

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 38

    Tracking

    Use

    of

    the

    Compiler

    .

    .

    .

    .

    .

    .

    . 38

    Compiling

    for

    Specific

    Architectures

    .

    .

    .

    .

    . 39

    Passing

    Fortran

    Files

    through

    the

    C

    Preprocessor

    40

    cpp

    Directives

    for

    XL

    Fortran

    Programs

    .

    .

    .

    . 41

    Passing

    Options

    to

    the

    C

    Preprocessor

    .

    .

    .

    . 41

    Avoiding

    Preprocessing

    Problems

    .

    .

    .

    .

    .

    . 41

    Linking

    XL

    Fortran

    Programs

    .

    .

    .

    .

    .

    .

    .

    . 42

    Compiling

    and

    Linking

    in

    Separate

    Steps

    .

    .

    . 42

    Linking

    32–Bit

    SMP

    Object

    Files

    Using

    the

    ld

    Command

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 42

    Linking

    64–Bit

    SMP

    Object

    Files

    Using

    the

    ld

    Command

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 43

    Linking

    32–Bit

    Non-SMP

    Object

    Files

    Using

    the

    ld

    Command

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 44

    Linking

    64-Bit

    Non-SMP

    Object

    Files

    Using

    the

    ld

    Command

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 44

    Passing

    Options

    to

    the

    ld

    Command

    .

    .

    .

    .

    . 45

    Checking

    for

    Interface

    Errors

    at

    Link

    Time

    .

    .

    . 45

    Linking

    New

    Objects

    with

    Existing

    Ones

    .

    .

    . 45

    Relinking

    an

    Existing

    Executable

    File

    .

    .

    .

    .

    . 46

    Dynamic

    and

    Static

    Linking

    .

    .

    .

    .

    .

    .

    . 46

    Avoiding

    Naming

    Conflicts

    during

    Linking

    .

    .

    . 47

    Running

    XL

    Fortran

    Programs

    .

    .

    .

    .

    .

    .

    .

    . 48

    Canceling

    Execution

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 48

    Running

    Previously

    Compiled

    Programs

    .

    .

    . 48

    Compiling

    and

    Executing

    on

    Different

    Systems

    49

    POSIX

    Pthreads

    Binary

    Compatibility

    .

    .

    .

    .

    . 49

    Run-Time

    Libraries

    for

    POSIX

    Pthreads

    Support

    50

    Selecting

    the

    Language

    for

    Run-Time

    Messages

    50

    Setting

    Run-Time

    Options

    .

    .

    .

    .

    .

    .

    .

    . 51

    OpenMP

    Environment

    Variables

    .

    .

    .

    .

    .

    . 64

    Other

    Environment

    Variables

    That

    Affect

    Run-Time

    Behavior

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 66

    XL

    Fortran

    Run-Time

    Exceptions

    .

    .

    .

    .

    .

    .

    . 66

    XL

    Fortran

    Compiler-Option

    Reference

    67

    Summary

    of

    the

    XL

    Fortran

    Compiler

    Options

    .

    .

    . 67

    Options

    That

    Control

    Input

    to

    the

    Compiler

    .

    . 68

    Options

    That

    Specify

    the

    Locations

    of

    Output

    Files

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 70

    Options

    for

    Performance

    Optimization

    .

    .

    .

    . 70

    Options

    for

    Error

    Checking

    and

    Debugging

    .

    . 75

    ©

    Copyright

    IBM

    Corp.

    1990,

    2004

    iii

  • Options

    That

    Control

    Listings

    and

    Messages

    .

    . 77

    Options

    for

    Compatibility

    .

    .

    .

    .

    .

    .

    .

    . 79

    Options

    for

    Floating-Point

    Processing

    .

    .

    .

    .

    . 86

    Options

    That

    Control

    Linking

    .

    .

    .

    .

    .

    .

    . 86

    Options

    That

    Control

    Other

    Compiler

    Operations

    87

    Options

    That

    Are

    Obsolete

    or

    Not

    Recommended

    88

    Detailed

    Descriptions

    of

    the

    XL

    Fortran

    Compiler

    Options

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 90

    -#

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 91

    -1

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 92

    -B

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 93

    -b64

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 94

    -bdynamic,

    -bshared,

    and

    -bstatic

    Options

    .

    .

    . 95

    -bhalt

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 97

    -bloadmap

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 98

    -bmaxdata,

    -bmaxstack

    Options

    .

    .

    .

    .

    .

    .

    . 99

    -brtl

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 100

    -bshared

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 101

    -bstatic

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 102

    -C

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 103

    -c

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 104

    -D

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 105

    -d

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 106

    -F

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 107

    -g

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 108

    -I

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 109

    -k

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 110

    -L

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 111

    -l

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 112

    -N

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 113

    -O

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 114

    -o

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 116

    -P

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 117

    -p

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 118

    -Q

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 119

    -q32

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 120

    -q64

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 121

    -qalias

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 122

    -qalign

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 125

    -qarch

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 127

    -qassert

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 132

    -qattr

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 133

    -qautodbl

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 134

    -qcache

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 137

    -qcclines

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 139

    -qcheck

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 140

    -qci

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 141

    -qcompact

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 142

    -qcr

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 143

    -qctyplss

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 144

    -qdbg

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 146

    -qddim

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 147

    -qdirective

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 148

    -qdirectstorage

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    . 150

    -qdlines

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 151

    -qdpc

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 152

    -qdpcl

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 153

    -qescape

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 154

    -qessl

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 155

    -qextchk

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 156

    -qextern

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 157

    -qextname

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 158

    -qfdpr

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 160

    -qfixed

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 161

    -qflag

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 162

    -qfloat

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 163

    -qflttrap

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 165

    -qfree

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 168

    -qfullpath

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 169

    -qhalt

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 170

    -qhot

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 171

    -qhsflt

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 173

    -qhssngl

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 174

    -qieee

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 175

    -qinit

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 176

    -qinitauto

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 177

    -qintlog

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 179

    -qintsize

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 180

    -qipa

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 182

    -qkeepparm

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 188

    -qlanglvl

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 189

    -qlargepage

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 191

    -qlibansi

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 192

    -qlibessl

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 193

    -qlibposix

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 194

    -qlist

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 195

    -qlistopt

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 196

    -qlm

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 197

    -qlog4

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 198

    -qmaxmem

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 199

    -qmbcs

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 201

    -qmixed

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 202

    -qmoddir

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 203

    -qmodule

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 204

    -qnoprint

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 205

    -qnullterm

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 206

    -qobject

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 207

    -qonetrip

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 208

    -qoptimize

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 209

    -qpdf

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 210

    -qphsinfo

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 214

    -qpic

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 216

    -qport

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 217

    -qposition

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 219

    -qprefetch

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 220

    -qqcount

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 221

    -qrealsize

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 222

    -qrecur

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 224

    -qreport

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 225

    -qsaa

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 227

    -qsave

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 228

    -qsaveopt

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 229

    -qsclk

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 230

    -qshowpdf

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 231

    -qsigtrap

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 232

    -qsmallstack

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 233

    -qsmp

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 234

    -qsource

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 239

    -qspillsize

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 240

    -qstrict

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 241

    -qstrictieeemod

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    . 242

    -qstrict_induction

    Option

    .

    .

    .

    .

    .

    .

    .

    . 243

    iv

    XL

    Fortran

    Enterprise

    Edition

    for

    AIX

    :

    User’s

    Guide

  • -qsuffix

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 244

    -qsuppress

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 245

    -qswapomp

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 247

    -qtbtable

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 249

    -qthreaded

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 250

    -qtune

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 251

    -qundef

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 254

    -qunroll

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 255

    -qunwind

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 256

    -qversion

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 257

    -qwarn64

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 258

    -qxflag=oldtab

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    . 259

    -qxflag=xalias

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 260

    -qxlf77

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 261

    -qxlf90

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 263

    -qxlines

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 265

    -qxref

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 267

    -qzerosize

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 268

    -S

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 269

    -t

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 270

    -U

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 271

    -u

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 272

    -v

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 273

    -V

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 274

    -W

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 275

    -w

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 277

    -y

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 278

    Using

    XL

    Fortran

    in

    a

    64-Bit

    Environment

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 279

    64-Bit

    Large

    Data

    Type

    Support

    .

    .

    .

    .

    .

    .

    . 279

    64-Bit

    Thread

    Support

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 280

    Compiler

    Options

    for

    the

    64-Bit

    Environment

    .

    . 280

    -q32

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 281

    -q64

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 282

    -qwarn64

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 284

    Default

    Bit

    Mode

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 285

    Module

    Support

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 285

    XL

    Fortran

    Floating-Point

    Processing

    287

    IEEE

    Floating-Point

    Overview

    .

    .

    .

    .

    .

    .

    .

    . 287

    Compiling

    for

    Strict

    IEEE

    Conformance

    .

    .

    . 287

    IEEE

    Single-

    and

    Double-Precision

    Values

    .

    .

    . 288

    IEEE

    Extended-Precision

    Values

    .

    .

    .

    .

    .

    . 288

    Infinities

    and

    NaNs

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 288

    Exception-Handling

    Model

    .

    .

    .

    .

    .

    .

    .

    . 289

    Hardware-Specific

    Floating-Point

    Overview

    .

    .

    . 290

    Single-

    and

    Double-Precision

    Values

    .

    .

    .

    .

    . 290

    Extended-Precision

    Values

    .

    .

    .

    .

    .

    .

    .

    . 291

    How

    XL

    Fortran

    Rounds

    Floating-Point

    Calculations

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 292

    Selecting

    the

    Rounding

    Mode

    .

    .

    .

    .

    .

    .

    . 292

    Minimizing

    Rounding

    Errors

    .

    .

    .

    .

    .

    .

    . 294

    Minimizing

    Overall

    Rounding

    .

    .

    .

    .

    .

    .

    . 294

    Delaying

    Rounding

    until

    Run

    Time

    .

    .

    .

    .

    . 294

    Ensuring

    that

    the

    Rounding

    Mode

    is

    Consistent

    294

    Duplicating

    the

    Floating-Point

    Results

    of

    Other

    Systems

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 295

    Maximizing

    Floating-Point

    Performance

    .

    .

    .

    . 295

    Detecting

    and

    Trapping

    Floating-Point

    Exceptions

    296

    Compiler

    Features

    for

    Trapping

    Floating-Point

    Exceptions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 297

    Operating

    System

    Features

    for

    Trapping

    Floating-Point

    Exceptions

    .

    .

    .

    .

    .

    .

    .

    . 297

    Installing

    an

    Exception

    Handler

    .

    .

    .

    .

    .

    . 298

    Producing

    a

    Core

    File

    .

    .

    .

    .

    .

    .

    .

    .

    . 299

    Controlling

    the

    Floating-Point

    Status

    and

    Control

    Register

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 299

    xlf_fp_util

    Procedures

    .

    .

    .

    .

    .

    .

    .

    .

    . 300

    fpgets

    and

    fpsets

    Subroutines

    .

    .

    .

    .

    .

    .

    . 300

    Sample

    Programs

    for

    Exception

    Handling

    .

    .

    . 302

    Causing

    Exceptions

    for

    Particular

    Variables

    .

    . 302

    Minimizing

    the

    Performance

    Impact

    of

    Floating-Point

    Exception

    Trapping

    .

    .

    .

    .

    . 302

    Floating-Point

    Processing

    on

    the

    POWER

    and

    POWER2

    Architectures

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 303

    Precision

    of

    Computations

    .

    .

    .

    .

    .

    .

    .

    . 303

    Invalid

    Operation

    Exceptions

    for

    SQRT

    Operations

    on

    POWER

    Processors

    .

    .

    .

    .

    . 304

    Optimizing

    XL

    Fortran

    Programs

    .

    .

    . 305

    The

    Philosophy

    of

    XL

    Fortran

    Optimizations

    .

    .

    . 305

    Summary

    of

    Compiler

    Options

    for

    Optimization

    307

    Choosing

    an

    Optimization

    Level

    .

    .

    .

    .

    .

    .

    . 307

    Optimization

    Level

    -O2

    .

    .

    .

    .

    .

    .

    .

    .

    . 308

    Optimization

    Level

    -O3

    .

    .

    .

    .

    .

    .

    .

    .

    . 308

    Getting

    the

    Most

    out

    of

    -O2

    and

    -O3

    .

    .

    .

    . 309

    The

    -O4

    and

    -O5

    Options

    .

    .

    .

    .

    .

    .

    .

    . 309

    Optimizing

    for

    a

    Target

    Machine

    or

    Class

    of

    Machines

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 310

    Getting

    the

    Most

    out

    of

    Target

    Machine

    Options

    310

    Optimizing

    Floating-Point

    Calculations

    .

    .

    .

    .

    . 311

    High-order

    Transformations

    (-qhot)

    .

    .

    .

    .

    .

    . 311

    Getting

    the

    Most

    out

    of

    -qhot

    .

    .

    .

    .

    .

    .

    . 312

    Optimizing

    Loops

    and

    Array

    Language

    .

    .

    . 312

    Profile-directed

    Feedback

    (PDF)

    .

    .

    .

    .

    .

    .

    . 315

    Using

    Profile-directed

    Feedback

    (PDF)

    .

    .

    .

    . 315

    Optimizing

    Conditional

    Branching

    .

    .

    .

    .

    . 316

    Interprocedural

    Analysis

    (-qipa)

    .

    .

    .

    .

    .

    .

    . 316

    Getting

    the

    Most

    from

    -qipa

    .

    .

    .

    .

    .

    .

    . 317

    Optimizing

    Subprogram

    Calls

    .

    .

    .

    .

    .

    .

    .

    . 317

    Finding

    the

    Right

    Level

    of

    Inlining

    .

    .

    .

    .

    . 318

    Shared-memory

    Parallelism

    (-qsmp)

    .

    .

    .

    .

    .

    . 319

    Getting

    the

    Most

    out

    of

    -qsmp

    .

    .

    .

    .

    .

    . 319

    Other

    Program

    Behavior

    Options

    .

    .

    .

    .

    .

    .

    . 320

    Other

    Performance

    Options

    .

    .

    .

    .

    .

    .

    .

    . 320

    Debugging

    Optimized

    Code

    .

    .

    .

    .

    .

    .

    .

    . 321

    Different

    Results

    in

    Optimized

    Programs

    .

    .

    . 322

    Compiler-friendly

    Programming

    .

    .

    .

    .

    .

    .

    . 322

    Implementation

    Details

    of

    XL

    Fortran

    Input/Output

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 325

    Implementation

    Details

    of

    File

    Formats

    .

    .

    .

    .

    . 325

    File

    Names

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 326

    Preconnected

    and

    Implicitly

    Connected

    Files

    .

    .

    . 326

    File

    Positioning

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 327

    Preserving

    the

    XL

    Fortran

    Version

    2.3

    File

    Positioning

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 328

    I/O

    Redirection

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 328

    Contents

    v

  • How

    XLF

    I/O

    Interacts

    with

    Pipes,

    Special

    Files,

    and

    Links

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 329

    Default

    Record

    Lengths

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 330

    File

    Permissions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 330

    Selecting

    Error

    Messages

    and

    Recovery

    Actions

    330

    Flushing

    I/O

    Buffers

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 331

    Choosing

    Locations

    and

    Names

    for

    Input/Output

    Files

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 331

    Naming

    Files

    That

    Are

    Connected

    with

    No

    Explicit

    Name

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 331

    Naming

    Scratch

    Files

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 332

    Increasing

    Throughput

    with

    Logical

    Volume

    I/O

    and

    Data

    Striping

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 333

    Logical

    Volume

    I/O

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 334

    Data

    Striping

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 334

    Asynchronous

    I/O

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 335

    Execution

    of

    an

    Asychronous

    Data

    Transfer

    Operation

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 335

    Usage

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 335

    Performance

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 338

    Compiler-Generated

    Temporary

    I/O

    Items

    .

    . 338

    System

    Setup

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 339

    Linking

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 339

    Error

    Handling

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 340

    XL

    Fortran

    Thread-Safe

    I/O

    Library

    .

    .

    .

    .

    . 340

    Use

    of

    I/O

    Statements

    in

    Signal

    Handlers

    .

    .

    . 343

    Asynchronous

    Thread

    Cancellation

    .

    .

    .

    .

    . 344

    Interlanguage

    Calls

    .

    .

    .

    .

    .

    .

    .

    .

    . 345

    Conventions

    for

    XL

    Fortran

    External

    Names

    .

    .

    . 345

    Mixed-Language

    Input

    and

    Output

    .

    .

    .

    .

    .

    . 346

    Mixing

    Fortran

    and

    C++

    .

    .

    .

    .

    .

    .

    .

    .

    . 347

    Making

    Calls

    to

    C

    Functions

    Work

    .

    .

    .

    .

    .

    . 348

    Passing

    Data

    From

    One

    Language

    to

    Another

    .

    . 349

    Passing

    Arguments

    between

    Languages

    .

    .

    . 349

    Passing

    Global

    Variables

    between

    Languages

    350

    Passing

    Character

    Types

    between

    Languages

    351

    Passing

    Arrays

    between

    Languages

    .

    .

    .

    .

    . 352

    Passing

    Pointers

    between

    Languages

    .

    .

    .

    . 353

    Passing

    Arguments

    By

    Reference

    or

    By

    Value

    353

    Returning

    Values

    from

    Fortran

    Functions

    .

    .

    . 355

    Arguments

    with

    the

    OPTIONAL

    Attribute

    .

    . 355

    Arguments

    with

    the

    INTENT

    Attribute

    .

    .

    .

    . 355

    Type

    Encoding

    and

    Checking

    .

    .

    .

    .

    .

    .

    . 355

    Assembler-Level

    Subroutine

    Linkage

    Conventions

    355

    The

    Stack

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 357

    The

    Link

    Area

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 359

    The

    Input

    Parameter

    Area

    .

    .

    .

    .

    .

    .

    .

    . 360

    The

    Register

    Save

    Area

    .

    .

    .

    .

    .

    .

    .

    .

    . 360

    The

    Local

    Stack

    Area

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 360

    The

    Output

    Parameter

    Area

    .

    .

    .

    .

    .

    .

    . 360

    Linkage

    Convention

    for

    Argument

    Passing

    .

    .

    . 361

    Argument

    Passing

    Rules

    (by

    Value)

    .

    .

    .

    .

    . 363

    Order

    of

    Arguments

    in

    Argument

    List

    .

    .

    .

    . 365

    Linkage

    Convention

    for

    Function

    Calls

    .

    .

    .

    .

    . 365

    Pointers

    to

    Functions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 365

    Function

    Values

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 366

    The

    Stack

    Floor

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 366

    Stack

    Overflow

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 366

    Prolog

    and

    Epilog

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 366

    Traceback

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 367

    THREADLOCAL

    Common

    Blocks

    and

    ILC

    with

    C

    367

    Example

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 368

    Problem

    Determination

    and

    Debugging

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 369

    Understanding

    XL

    Fortran

    Error

    Messages

    .

    .

    . 369

    Error

    Severity

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 369

    Compiler

    Return

    Code

    .

    .

    .

    .

    .

    .

    .

    .

    . 370

    Run-Time

    Return

    Code

    .

    .

    .

    .

    .

    .

    .

    .

    . 370

    Understanding

    XL

    Fortran

    Messages

    .

    .

    .

    . 370

    Limiting

    the

    Number

    of

    Compile-Time

    Messages

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 371

    Selecting

    the

    Language

    for

    Messages

    .

    .

    .

    . 371

    Fixing

    Installation

    or

    System

    Environment

    Problems

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 373

    Fixing

    Compile-Time

    Problems

    .

    .

    .

    .

    .

    .

    . 373

    Duplicating

    Extensions

    from

    Other

    Systems

    .

    . 374

    Isolating

    Problems

    with

    Individual

    Compilation

    Units

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 374

    Compiling

    with

    Thread-safe

    Commands

    .

    .

    . 374

    Running

    out

    of

    Machine

    Resources

    .

    .

    .

    .

    . 374

    Fixing

    Link-Time

    Problems

    .

    .

    .

    .

    .

    .

    .

    .

    . 374

    Fixing

    Run-Time

    Problems

    .

    .

    .

    .

    .

    .

    .

    .

    . 375

    Duplicating

    Extensions

    from

    Other

    Systems

    .

    . 375

    Mismatched

    Sizes

    or

    Types

    for

    Arguments

    .

    . 375

    Working

    around

    Problems

    when

    Optimizing

    375

    Input/Output

    Errors

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 376

    Tracebacks

    and

    Core

    Dumps

    .

    .

    .

    .

    .

    .

    . 376

    Debugging

    a

    Fortran

    90

    or

    Fortran

    95

    Program

    .

    . 376

    A

    Sample

    dbx

    Session

    for

    an

    XL

    Fortran

    Program

    377

    Problem

    with

    Dynamic

    Memory

    Allocation

    .

    . 377

    Using

    Debug

    Memory

    Routines

    for

    XL

    Fortran

    .

    . 381

    The

    libhm.a

    Library

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 381

    The

    libhmd.a

    Library

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 383

    Environment

    Variables

    .

    .

    .

    .

    .

    .

    .

    .

    . 385

    Understanding

    XL

    Fortran

    Compiler

    Listings

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 389

    Header

    Section

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 389

    Options

    Section

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 389

    Source

    Section

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 390

    Error

    Messages

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 390

    Transformation

    Report

    Section

    .

    .

    .

    .

    .

    .

    .

    . 391

    Attribute

    and

    Cross-Reference

    Section

    .

    .

    .

    .

    . 392

    Object

    Section

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 393

    File

    Table

    Section

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 393

    Compilation

    Unit

    Epilogue

    Section

    .

    .

    .

    .

    .

    . 393

    Compilation

    Epilogue

    Section

    .

    .

    .

    .

    .

    .

    .

    . 393

    Fortran-Related

    AIX

    Commands

    .

    .

    . 395

    Working

    with

    Object-Code

    Archives

    (ar)

    .

    .

    .

    . 395

    Printing

    Output

    Files

    with

    Fortran

    ASA

    Carriage

    Controls

    (asa)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 395

    Splitting

    Subprograms

    into

    Individual

    Files

    (fsplit)

    395

    Automating

    Large,

    Complex

    Compilations

    (make)

    396

    Run-Time

    Profiling

    (prof,

    gprof)

    .

    .

    .

    .

    .

    .

    . 396

    Translating

    Programs

    into

    RATFOR

    (struct)

    .

    .

    . 396

    Displaying

    Information

    inside

    Binary

    Files

    (what)

    396

    Porting

    Programs

    to

    XL

    Fortran

    .

    .

    . 397

    vi

    XL

    Fortran

    Enterprise

    Edition

    for

    AIX

    :

    User’s

    Guide

  • Outline

    of

    the

    Porting

    Process

    .

    .

    .

    .

    .

    .

    .

    . 397

    Maintaining

    FORTRAN

    77

    Source

    and

    Object

    Code

    397

    Portability

    of

    Directives

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 397

    NEW

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 399

    Common

    Industry

    Extensions

    That

    XL

    Fortran

    Supports

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 400

    Mixing

    Data

    Types

    in

    Statements

    .

    .

    .

    .

    .

    . 400

    Date

    and

    Time

    Routines

    .

    .

    .

    .

    .

    .

    .

    .

    . 400

    Other

    libc

    Routines

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 400

    Changing

    the

    Default

    Sizes

    of

    Data

    Types

    .

    .

    . 401

    Name

    Conflicts

    between

    Your

    Procedures

    and

    XL

    Fortran

    Intrinsic

    Procedures

    .

    .

    .

    .

    .

    . 401

    Reproducing

    Results

    from

    Other

    Systems

    .

    .

    . 401

    Finding

    Nonstandard

    Extensions

    .

    .

    .

    .

    .

    . 401

    Answers

    to

    Frequently

    Asked

    Questions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 403

    Finding

    the

    Date

    and

    Time

    .

    .

    .

    .

    .

    .

    .

    .

    . 403

    Efficient

    Static

    Linking

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 403

    Appendix

    A.

    Sample

    Fortran

    Programs

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 405

    Example

    1

    -

    XL

    Fortran

    Source

    File

    .

    .

    .

    .

    .

    . 405

    Execution

    Results

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 405

    Example

    2

    -

    Valid

    C

    Routine

    Source

    File

    .

    .

    .

    . 406

    Example

    3

    -

    Valid

    Fortran

    SMP

    Source

    File

    .

    .

    . 408

    Example

    4

    -

    Invalid

    Fortran

    SMP

    Source

    File

    .

    .

    . 408

    Programming

    Examples

    Using

    the

    Pthreads

    Library

    Module

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 409

    Appendix

    B.

    XL

    Fortran

    Technical

    Information

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 411

    The

    Compiler

    Phases

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 411

    External

    Names

    in

    theXL

    FortranShared

    Libraries

    411

    The

    XL

    Fortran

    Run-Time

    Environment

    .

    .

    .

    .

    . 411

    External

    Names

    in

    the

    Run-Time

    Environment

    412

    Technical

    Details

    of

    the

    -qfloat=hsflt

    Option

    .

    .

    . 412

    Implementation

    Details

    for

    -qautodbl

    Promotion

    and

    Padding

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 413

    Terminology

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 413

    Examples

    of

    Storage

    Relationships

    for

    -qautodbl

    Suboptions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 414

    Appendix

    C.

    Using

    the

    Mathematical

    Acceleration

    Subsystem

    (MASS)

    .

    .

    . 419

    Using

    the

    Scalar

    Library

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 419

    Using

    the

    Vector

    Libraries

    .

    .

    .

    .

    .

    .

    .

    .

    . 420

    Consistency

    of

    MASS

    Vector

    Functions

    .

    .

    .

    . 422

    Compiling

    and

    Linking

    a

    Program

    with

    MASS

    .

    . 423

    Using

    libmass.a

    with

    the

    Standard

    Intrinsic

    Functions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 423

    Appendix

    D.

    XL

    Fortran

    Internal

    Limits

    425

    Notices

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 427

    Programming

    Interface

    Information

    .

    .

    .

    .

    .

    . 429

    Trademarks

    and

    Service

    Marks

    .

    .

    .

    .

    .

    .

    . 429

    Glossary

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 431

    INDEX

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 441

    Contents

    vii

  • viii

    XL

    Fortran

    Enterprise

    Edition

    for

    AIX

    :

    User’s

    Guide

  • Figures

    1.

    Main

    Fortran

    Program

    That

    Calls

    C++

    (main1.f)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 347

    2.

    C

    Wrapper

    Functions

    for

    Calling

    C++

    (cfun.C)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 347

    3.

    C++

    Code

    Called

    from

    Fortran

    (cplus.h)

    348

    4.

    Storage

    Mapping

    of

    Parm

    Area

    On

    the

    Stack

    in

    32-Bit

    Environment

    .

    .

    .

    .

    .

    .

    .

    .

    . 364

    5.

    Storage

    Mapping

    of

    Parm

    Area

    On

    the

    Stack

    in

    64-Bit

    Environment

    .

    .

    .

    .

    .

    .

    .

    .

    . 364

    6.

    Storage

    Relationships

    without

    the

    -qautodbl

    Option

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 414

    7.

    Storage

    Relationships

    with

    -qautodbl=dbl

    415

    8.

    Storage

    Relationships

    with

    -qautobl=dbl4

    416

    9.

    Storage

    Relationships

    with

    -qautodbl=dbl8

    416

    10.

    Storage

    Relationships

    with

    -qautodbl=dblpad4

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 417

    11.

    Storage

    Relationships

    with

    -qautodbl=dblpad8

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 417

    12.

    Storage

    Relationships

    with

    -qautodbl=dblpad

    418

    ©

    Copyright

    IBM

    Corp.

    1990,

    2004

    ix

  • x

    XL

    Fortran

    Enterprise

    Edition

    for

    AIX

    :

    User’s

    Guide

  • What’s

    New

    for

    XL

    Fortran

    XL

    Fortran

    Version

    9.1

    provides

    the

    following

    new

    and

    changed

    features:

    New

    or

    changed

    compiler

    options

    and

    suboptions:

    v

    The

    -qflttrap=nanq

    suboption

    detects

    all

    NaN

    values

    handled

    or

    generated

    by

    floating

    point

    instructions,

    including

    those

    not

    created

    by

    invalid

    operations.

    v

    The

    -qport=nullarg

    suboption

    treats

    an

    empty

    argument,

    which

    is

    delimited

    by

    a

    left

    parenthesis

    and

    a

    comma,

    two

    commas,

    or

    a

    comma

    and

    a

    right

    parenthesis,

    as

    a

    null

    argument.

    v

    The

    -qmodule=mangle81

    option

    provides

    compatibility

    with

    Version

    8.1

    module

    naming

    conventions

    for

    non-intrinsic

    modules.

    v

    The

    -qsaveopt

    option

    saves

    the

    command-line

    options

    used

    for

    compiling

    a

    source

    file

    in

    the

    corresponding

    object

    file.

    v

    The

    -qversion

    option

    provides

    the

    version

    and

    release

    for

    the

    invoking

    compiler.

    The

    following

    XL

    Fortran

    enhancements

    adapted

    from

    the

    Fortran

    2003

    draft

    standard:

    v

    The

    2003std

    and

    2003pure

    run-time

    options

    provide

    conformance

    checking

    of

    code

    for

    adherence

    to

    the

    draft

    standard.

    v

    The

    ISO_C_BINDING

    intrinsic

    module,

    BIND

    attribute

    and

    statement,

    module

    variables,

    common

    block,

    subroutine/function

    and

    -qalign=bindc

    compiler

    suboption

    provide

    support

    for

    interoperability

    with

    C.

    v

    PUBLIC/PRIVATE

    attribute

    on

    derived

    type

    components.

    v

    The

    ASSOCIATE

    construct

    associates

    an

    entity

    with

    either

    a

    variable

    or

    the

    value

    of

    an

    expression.

    v

    Command-line

    argument

    intrinsics:

    COMMAND_ARGUMENT_COUNT

    GET_COMMAND_ARGUMENT

    GET_ENVIRONMENT_VARIABLE

    v

    The

    FLUSH

    statement

    makes

    data

    from

    an

    external

    file

    available

    to

    other

    processes.

    v

    The

    IOMSG=

    specifier

    on

    the

    data-transfer

    operation,

    file-positioning,

    FLUSH,

    and

    file

    inquiry

    statements.

    v

    The

    ISO_FORTRAN_ENV

    intrinsic

    module

    provides

    public

    entities

    relating

    to

    the

    Fortran

    environment.

    v

    The

    NEW_LINE

    intrinsic

    returns

    a

    new

    line

    character.

    v

    The

    IMPORT

    statement

    makes

    named

    entities

    from

    the

    host

    scoping

    unit

    accessible

    in

    the

    interface

    body

    by

    host

    association.

    v

    The

    PROCEDURE

    statement

    declares

    a

    dummy

    procedure

    or

    external

    procedure.

    ©

    Copyright

    IBM

    Corp.

    1990,

    2004

    xi

  • The

    following

    performance-related

    directives

    and

    compiler

    options/suboptions

    have

    been

    added:

    v

    -qarch

    and

    -qtune

    compiler

    suboptions

    that

    provide

    support

    for

    POWER5

    and

    PowerPC

    970

    architectures

    (ppc64gr,

    ppc64grsq,

    pwr5,

    and

    ppc970).

    v

    The

    -qshowpdf

    option,

    used

    together

    with

    -qpdf1,

    provides

    additional

    call

    and

    block

    count

    profiling

    information

    to

    an

    executable.

    v

    Optimization

    utilities

    showpdf

    and

    mergepdf

    provide

    enhanced

    information

    about

    PDF-directed

    compilation

    v

    The

    -qdirectstorage

    option

    informs

    the

    compiler

    that

    a

    given

    compilation

    unit

    may

    reference

    write-through-enabled

    or

    cache-inhibited

    storage.

    v

    Directives

    NOVECTOR,

    NOSIMD,

    and

    the

    ALIGNX

    built-in

    subroutine

    provide

    fine-grain

    control

    of

    the

    auto-vectorization

    and

    auto-SIMD

    vectorization

    features

    in

    the

    compiler.

    v

    The

    LOOPID

    directive

    marks

    a

    loop

    with

    a

    scope-unique

    identifier.

    The

    identifier

    can

    be

    used

    by

    the

    BLOCK_LOOP

    and

    other

    directives

    to

    control

    loop-specific

    transformations.

    Information

    on

    the

    loop

    transformations

    can

    be

    shown

    in

    using

    the

    -qreport

    compiler

    of

    option

    .

    v

    The

    EIEIO

    directive

    helps

    in

    with

    cache

    and

    memory

    management.

    v

    The

    PROTECTED

    STREAM

    directives

    allow

    for

    management

    of

    protected

    streams

    so

    they

    are

    not

    replaced

    by

    any

    hardware-detected

    streams.

    v

    The

    SWDIV

    and

    SWDIV_NOCHK

    intrinsics

    provide

    software

    floating-point

    division

    algorithms.

    Other

    features:

    v

    The

    FRE

    and

    FRSQRTES

    PowerPC

    floating-point

    intrinsic

    functions.

    v

    The

    POPCNT,

    and

    POPCNTB

    intrinsics

    provide

    set

    bit

    counts

    in

    registers

    for

    data

    objects,

    and

    the

    POPPAR

    intrinsic

    determines

    the

    parity

    for

    a

    data

    object.

    v

    32-bit

    and

    64-bit

    modules

    are

    now

    included

    in

    one

    file.

    v

    Allowing

    multiple

    include

    paths

    v

    Availability

    of

    the

    MASS

    vector

    libraries

    for

    use

    with

    vectorized

    applications.

    v

    A

    man

    page

    is

    provided

    for

    the

    compiler

    invocation

    commands

    and

    for

    each

    command-line

    utility.

    The

    man

    page

    for

    compiler

    invocations

    replaces

    the

    help

    file,

    which

    was

    provided

    in

    previous

    versions.

    xii

    XL

    Fortran

    Enterprise

    Edition

    for

    AIX

    :

    User’s

    Guide

  • Introduction

    This

    document

    describes

    Version

    9.1

    of

    IBM®

    XL

    Fortran

    Enterprise

    Edition

    and

    explains

    how

    to

    compile,

    link,

    and

    run

    programs

    that

    are

    written

    in

    the

    Fortran

    language.

    How

    to

    Use

    This

    Document

    This

    document

    is

    for

    anyone

    who

    wants

    to

    work

    with

    the

    XL

    Fortran

    compiler,

    who

    is

    familiar

    with

    the

    AIX

    operating

    system,

    and

    who

    has

    some

    previous

    Fortran

    programming

    experience.

    This

    document

    can

    help

    you

    understand

    what

    the

    features

    of

    the

    compiler

    are,

    especially

    the

    options,

    and

    how

    to

    use

    them

    for

    effective

    software

    development.

    This

    document

    is

    not

    the

    place

    to

    find

    help

    on:

    Installation,

    which

    is

    covered

    in

    the

    documents

    that

    are

    listed

    in

    “XL

    Fortran

    and

    Operating

    System

    Publications”

    on

    page

    4.

    Writing

    Fortran

    programs,

    which

    is

    covered

    in

    the

    XL

    Fortran

    Enterprise

    Edition

    for

    AIX

    Language

    Reference.

    The

    first

    part

    of

    this

    document

    is

    organized

    according

    to

    the

    steps

    necessary

    to

    compile,

    link,

    and

    run

    a

    program,

    followed

    by

    information

    on

    particular

    features

    of

    the

    XL

    Fortran

    compiler

    and

    the

    programs

    it

    produces.

    The

    second

    part

    discusses

    more

    general

    software-development

    topics.

    Depending

    on

    your

    level

    of

    experience

    and

    what

    you

    want

    to

    do,

    you

    may

    need

    to

    start

    reading

    at

    a

    particular

    point

    or

    read

    in

    a

    particular

    sequence.

    If

    you

    want

    to:

    Set

    up

    the

    compiler

    for

    yourself

    or

    someone

    else,

    read

    “Where

    to

    Find

    Installation

    Instructions”

    on

    page

    11.

    Upgrade

    from

    an

    earlier

    version

    of

    the

    XL

    Fortran

    compiler,

    read

    “Avoiding

    or

    Fixing

    Upgrade

    Problems”

    on

    page

    25.

    Create

    customized

    compiler

    defaults,

    read

    “Customizing

    the

    Configuration

    File”

    on

    page

    15.

    Understand

    what

    all

    the

    compiler

    options

    are

    for

    and

    how

    they

    relate

    to

    each

    other,

    browse

    through

    “Summary

    of

    the

    XL

    Fortran

    Compiler

    Options”

    on

    page

    67.

    Look

    up

    a

    particular

    option

    by

    name,

    scan

    alphabetically

    through

    “Detailed

    Descriptions

    of

    the

    XL

    Fortran

    Compiler

    Options”

    on

    page

    90.

    Port

    a

    program

    to

    XL

    Fortran,

    read

    “Options

    for

    Compatibility”

    on

    page

    79

    to

    see

    what

    options

    you

    may

    need;

    then

    read

    “Porting

    Programs

    to

    XL

    Fortran”

    on

    page

    397

    for

    other

    porting

    information.

    ©

    Copyright

    IBM

    Corp.

    1990,

    2004

    1

  • How

    to

    Read

    the

    Syntax

    Diagrams

    and

    Statements

    This

    document

    uses

    notation

    often

    referred

    to

    as

    “railroad

    tracks”

    to

    illustrate

    syntax

    for

    Fortran

    statements

    and

    AIX

    commands.

    Syntax

    for

    compiler

    options

    is

    illustrated

    through

    statements

    using

    notation

    often

    referred

    to

    as

    “braces

    and

    brackets”.

    Fortran

    keywords

    are

    shown

    in

    uppercase:

    for

    example,

    OPEN,

    COMMON,

    and

    END.

    You

    must

    spell

    them

    exactly

    as

    they

    are

    shown,

    although

    they

    are

    not

    case-sensitive.

    Variable

    names

    and

    user-specified

    names

    appear

    in

    lowercase

    italics;

    for

    example,

    array_element_name.

    If

    a

    variable

    or

    user-specified

    name

    ends

    in

    _list,

    it

    means

    that

    you

    can

    provide

    a

    list

    of

    terms

    that

    are

    separated

    by

    commas.

    You

    must

    enter

    punctuation

    marks,

    parentheses,

    arithmetic

    operators,

    and

    other

    special

    characters

    as

    part

    of

    the

    syntax.

    Syntax

    Diagrams

    v

    Read

    syntax

    diagrams

    from

    left

    to

    right

    and

    from

    top

    to

    bottom,

    following

    the

    path

    of

    the

    line:

    The

    ��───

    symbol

    indicates

    the

    beginning

    of

    a

    command.

    The

    ───�

    symbol

    indicates

    that

    the

    command

    syntax

    continues

    on

    the

    next

    line.

    The

    �───

    symbol

    indicates

    that

    a

    command

    is

    continued

    from

    the

    previous

    line.

    The

    ───��

    symbol

    indicates

    the

    end

    of

    a

    command.

    Diagrams

    of

    syntactical

    units

    smaller

    than

    complete

    statements

    start

    with

    the

    �───

    symbol

    and

    end

    with

    the

    ───�

    symbol.

    Constructs,

    interface

    blocks

    and

    derived

    type

    definitions

    consist

    of

    several

    individual

    statements.

    For

    such

    items,

    individual

    syntax

    diagrams

    show

    the

    required

    order

    for

    the

    equivalent

    Fortran

    statements.v

    Required

    items

    appear

    on

    the

    main

    path

    (the

    main

    path):

    ��

    command_name

    required_argument

    ��

    v

    Optional

    items

    appear

    below

    the

    main

    path:

    ��

    command_name

    optional_argument

    ��

    v

    If

    you

    can

    choose

    from

    two

    or

    more

    items,

    they

    appear

    vertically,

    in

    a

    stack.

    If

    you

    must

    choose

    one

    of

    the

    items,

    one

    item

    of

    the

    stack

    appears

    on

    the

    main

    path:

    ��

    command_name

    required_argument

    required_argument

    ��

    If

    choosing

    one

    of

    the

    items

    is

    optional,

    the

    entire

    stack

    appears

    below

    the

    main

    path:

    2

    XL

    Fortran

    Enterprise

    Edition

    for

    AIX

    :

    User’s

    Guide

  • ��

    command_name

    optional_argument

    optional_argument

    ��

    v

    An

    arrow

    returning

    to

    the

    left

    above

    the

    main

    line

    (a

    ″repeat

    arrow″)

    indicates

    an

    item

    that

    can

    be

    repeated

    and

    the

    separator

    character

    if

    it

    is

    other

    than

    a

    blank:

    ��

    :

    command_name

    repeatable_argument

    ��

    A

    repeat

    arrow

    above

    a

    stack

    indicates

    that

    you

    can

    make

    more

    than

    one

    choice

    from

    the

    stacked

    items.

    Example

    of

    a

    Syntax

    Diagram

    ��

    ,

    ,

    EXAMPLE

    char_constant

    a

    e

    b

    c

    name_list

    d

    ��

    Interpret

    the

    diagram

    as

    follows:

    v

    Enter

    the

    keyword

    EXAMPLE.

    v

    Enter

    a

    value

    for

    char_constant.

    v

    Enter

    a

    value

    for

    a

    or

    b,

    but

    not

    for

    both.

    v

    Optionally,

    enter

    a

    value

    for

    c

    or

    d.

    v

    Enter

    at

    least

    one

    value

    for

    e.

    If

    you

    enter

    more

    than

    one

    value,

    you

    must

    put

    a

    comma

    between

    each.

    v

    Optionally,

    enter

    the

    value

    of

    at

    least

    one

    name

    for

    name_list.

    If

    you

    enter

    more

    than

    one

    value,

    you

    must

    put

    a

    comma

    between

    each

    name.

    Syntax

    Statements

    Syntax

    statements

    are

    read

    from

    left

    to

    right:

    v

    Individual

    required

    arguments

    are

    shown

    with

    no

    special

    notation.

    v

    When

    you

    must

    make

    a

    choice

    between

    a

    set

    of

    alternatives,

    they

    are

    enclosed

    by

    {

    and

    }

    symbols.

    v

    Optional

    arguments

    are

    enclosed

    by

    [

    and

    ]

    symbols.

    v

    When

    you

    can

    select

    from

    a

    group

    of

    choices,

    they

    are

    separated

    by

    |

    characters.

    v

    Arguments

    that

    you

    can

    repeat

    are

    followed

    by

    ellipses

    (...).

    Example

    of

    a

    Syntax

    Statement

    EXAMPLE

    char_constant

    {a|b}[c|d]e[,e]...

    name_list{name_list}...

    The

    following

    list

    explains

    the

    syntax

    statement:

    v

    Enter

    the

    keyword

    EXAMPLE.

    v

    Enter

    a

    value

    for

    char_constant.

    v

    Enter

    a

    value

    for

    a

    or

    b,

    but

    not

    for

    both.

    v

    Optionally,

    enter

    a

    value

    for

    c

    or

    d.

    v

    Enter

    at

    least

    one

    value

    for

    e.

    If

    you

    enter

    more

    than

    one

    value,

    you

    must

    put

    a

    comma

    between

    each.

    Introduction

    3

  • v

    Optionally,

    enter

    the

    value

    of

    at

    least

    one

    name

    for

    name_list.

    If

    you

    enter

    more

    than

    one

    value,

    you

    must

    put

    a

    comma

    between

    each

    name.

    Note:

    The

    same

    example

    is

    used

    in

    both

    the

    syntax-statement

    and

    syntax-diagram

    representations.

    Notes

    on

    the

    Examples

    in

    This

    Document

    v

    The

    examples

    in

    this

    document

    are

    coded

    in

    a

    simple

    style

    that

    does

    not

    try

    to

    conserve

    storage,

    check

    for

    errors,

    achieve

    fast

    performance,

    or

    demonstrate

    all

    possible

    ways

    to

    do

    something.

    v

    The

    examples

    in

    this

    document

    use

    the

    xlf90,

    xlf90_r,

    xlf90_r7,

    xlf95,

    xlf95_r,

    xlf95_r7,

    xlf,

    xlf_r,

    xlf_r7,

    f77,

    fort77,

    f90,

    and

    f95

    compiler

    invocation

    commands

    interchangeably.

    For

    more

    substantial

    source

    files,

    one

    of

    these

    commands

    may

    be

    more

    suitable

    than

    the

    others,

    as

    explained

    in

    “Compiling

    XL

    Fortran

    Programs”

    on

    page

    29.

    v

    Some

    sample

    programs

    from

    this

    document

    and

    some

    other

    programs

    that

    illustrate

    ideas

    presented

    in

    this

    document

    are

    in

    the

    directory

    /usr/lpp/xlf/samples.

    Notes

    on

    the

    Terminology

    in

    This

    Document

    Some

    of

    the

    terminology

    in

    this

    document

    is

    shortened,

    as

    follows:

    v

    The

    term

    free

    source

    form

    format

    will

    often

    appear

    as

    free

    source

    form.

    v

    The

    term

    fixed

    source

    form

    format

    will

    often

    appear

    as

    fixed

    source

    form.

    v

    The

    term

    XL

    Fortran

    will

    often

    appear

    as

    XLF.

    Typographical

    Conventions

    This

    document

    uses

    the

    following

    methods

    to

    differentiate

    text:

    v

    Fortran

    keywords,

    commands,

    statements,

    directives,

    intrinsic

    procedures,

    compiler

    options,

    and

    filenames

    are

    shown

    in

    bold.

    For

    example,

    COMMON,

    END,

    and

    OPEN.

    v

    References

    to

    other

    sources

    of

    information

    appear

    in

    italics.

    v

    Variable

    names

    and

    user-specified

    names

    appear

    in

    lowercase

    italics.

    For

    example,

    array_element_name.

    Related

    Documentation

    You

    can

    refer

    to

    the

    following

    publications

    for

    additional

    information:

    XL

    Fortran

    and

    Operating

    System

    Publications

    v

    IBM

    XL

    Fortran

    Enterprise

    Edition

    for

    AIX

    Language

    Reference

    describes

    the

    XL

    Fortran

    programming

    language.

    v

    The

    AIX

    Installation

    Guide

    covers

    all

    aspects

    of

    the

    standard

    AIX

    installation

    procedure.

    XL

    Fortran

    supplies

    brief

    installation

    instructions

    that

    explain

    how

    the

    general-purpose

    installation

    procedures

    apply

    to

    this

    licensed

    program.

    v

    AIX

    Commands

    Reference

    (mutivolume

    set)

    contains

    extensive

    examples,

    as

    well

    as

    detailed

    descriptions

    of

    the

    AIX

    commands

    and

    their

    available

    flags.

    In

    particular,

    it

    describes

    the

    ld

    command

    (linker

    invocation).

    v

    AIX

    Performance

    Management

    Guide

    explains

    how

    to

    maximize

    the

    performance

    of

    components

    of

    the

    AIX

    operating

    system.

    v

    AIX

    Technical

    Reference:

    Base

    Operating

    System

    and

    Extensions

    Volume

    1

    describes

    the

    Basic

    Linear

    Algebra

    Subroutines

    (BLAS),

    AIX

    subroutines,

    and

    AIX

    system

    calls.

    4

    XL

    Fortran

    Enterprise

    Edition

    for

    AIX

    :

    User’s

    Guide

  • v

    General

    Programming

    Concepts:

    Writing

    and

    Debugging

    Programs

    tells

    you

    how

    to

    write

    software

    that

    works

    properly

    in

    different

    countries

    and

    national

    languages.

    Other

    Publications

    These

    documents

    are

    also

    relevant

    to

    XL

    Fortran

    features:

    v

    Engineering

    and

    Scientific

    Subroutine

    Library

    Guide

    and

    Reference

    gives

    information

    about

    the

    Engineering

    and

    Scientific

    Subroutine

    Library

    (ESSL)

    routines.

    v

    Parallel

    Engineering

    and

    Scientific

    Subroutine

    Library

    Guide

    and

    Reference

    gives

    information

    about

    the

    Parallel

    Engineering

    and

    Scientific

    Subroutine

    Library

    (PESSL)

    routines.

    Standards

    Documents

    You

    may

    want

    to

    refer

    to

    these

    standards

    for

    precise

    definitions

    of

    some

    of

    the

    features

    referred

    to

    in

    this

    document:

    v

    American

    National

    Standard

    Programming

    Language

    FORTRAN,

    ANSI

    X3.9-1978.

    v

    American

    National

    Standard

    Programming

    Language

    Fortran

    90,

    ANSI

    X3.198-1992.

    (Referred

    to

    in

    this

    document

    by

    its

    informal

    name,

    Fortran

    90.)

    v

    Federal

    (USA)

    Information

    Processing

    Standards

    Publication

    Fortran,

    FIPS

    PUB

    69-1.

    v

    ANSI/IEEE

    Standard

    for

    Binary

    Floating-Point

    Arithmetic,

    ANSI/IEEE

    Std

    754-1985.

    v

    Information

    technology

    -

    Programming

    languages

    -

    Fortran,

    ISO/IEC

    1539-1:1991(E).

    v

    Information

    technology

    -

    Programming

    languages

    -

    Fortran

    -

    Part

    1:

    Base

    language,

    ISO/IEC

    1539-1:1997.

    (Referred

    to

    in

    this

    document

    by

    its

    informal