
IBM XL Fortran for AIX, V15.1.3 IBM Getting Started with XL Fortran Version 15.1.3 SC27-4242-02 IBM XL Fortran for AIX, V15.1.3 IBM Getting Started with XL Fortran Version 15.1.3 SC27-4242-02 Note Before using this information and the product it supports, read the information in “Notices” on page 55. First edition This edition applies to IBM XL Fortran for AIX, V15.1.3 (Program 5765-J09; 5725-C74) 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. © Copyright IBM Corporation 1996, 2015. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents About this document ......... v Support for POWER8 processors ...... 23 Conventions .............. v Fortran 2008 features .......... 25 Related information ............ ix Language interoperability features ...... 27 IBM XL Fortran information ........ ix OpenMP 4.0 ............. 28 Standards and specifications ........ x Directives and intrinsic procedures ..... 29 Other IBM information.......... xi Compiler options ........... 31 Technical support ............ xi Other XL Fortran updates ........ 33 How to send your comments ........ xi Enhancements added in Version 14.1 ...... 34 Fortran 2008 features .......... 34 Chapter 1. Introducing XL Fortran ... 1 OpenMP 3.1 ............. 37 Performance and optimization ....... 38 Commonality with other IBM compilers ..... 1 Diagnostic reports ........... 38 Operating system and hardware support ..... 1 Compiler options and directives ...... 40 A highly configurable compiler ........ 1 Language standard compliance ........ 3 Source-code migration and conformance checking 3 Chapter 5. Setting up and customizing Tools, utilities, and commands ........ 4 XL Fortran ............. 43 Program optimization ........... 5 Using custom compiler configuration files .... 43 64-bit object capability ........... 5 Configuring compiler utilization tracking and Shared memory parallelization ........ 6 reporting ............... 43 Diagnostic reports ............ 7 Symbolic debugger support ......... 7 Chapter 6. Developing applications with XL Fortran ........... 45 Chapter 2. What's new for IBM XL The compiler phases ........... 45 Fortran for AIX, V15.1.3 ........ 9 Editing Fortran source files ......... 45 Language features ............ 9 Compiling with XL Fortran ......... 46 Intrinsic procedures ........... 10 Invoking the compiler .......... 46 Other enhancements ........... 10 Compiling parallelized XL Fortran applications 48 Specifying compiler options ........ 49 Chapter 3. Migration of your XL Fortran input and output files ...... 50 applications ............ 13 Linking your compiled applications with XL Fortran 51 Linking new objects with existing ones .... 51 Things to note in IBM XL Fortran for AIX, V15.1.3 13 Relinking an existing executable file ..... 51 Avoiding or fixing upgrade problems...... 14 Dynamic and static linking ........ 52 Compatibility with earlier versions ...... 17 Running your compiled application ...... 52 XL Fortran compiler diagnostic aids ...... 53 Chapter 4. Enhancements added in Debugging compiled applications ...... 53 earlier releases ........... 21 Determining which level of XL Fortran is being Enhancements added in Version 15.1.2 ..... 21 used ................ 54 Fortran 2008 features .......... 21 Language interoperability features ...... 21 Notices .............. 55 Intrinsic procedures .......... 22 Trademarks .............. 57 Commands ............. 22 Compiler options ........... 22 Index ............... 59 Other XL Fortran updates ........ 23 Enhancements added in Version 15.1 ...... 23 © Copyright IBM Corp. 1996, 2015 iii iv XL Fortran: Getting Started About this document This document contains overview and basic usage information for the IBM® XL Fortran for AIX®, V15.1.3 compiler. Who should read this document This document is intended for Fortran developers who are looking for introductory overview and usage information for XL Fortran. It assumes that you have some familiarity with command-line compilers, basic knowledge of the Fortran programming language, and basic knowledge of operating system commands. Programmers new to XL Fortran can use this document to find information about the capabilities and features unique to XL Fortran. How to use this document Throughout this document, the xlf compiler invocation is used to describe the behavior of the compiler. You can, however, substitute other forms of the compiler invocation command if your particular environment requires it, and compiler option usage remains the same unless otherwise specified. While this document covers information such as configuring the compiler environment, and compiling and linking Fortran applications using the XL Fortran compiler, it does not include the following topics: v Compiler installation: see the XL Fortran Installation Guide. v Compiler options: see the XL Fortran Compiler Reference for detailed information about the syntax and usage of compiler options. v The Fortran programming language: see the XL Fortran Language Reference for information about the syntax, semantics, and IBM implementation of the Fortran programming language. v Programming topics: see the XL Fortran Optimization and Programming Guide for detailed information about developing applications with XL Fortran, with a focus on program portability and optimization. Conventions Typographical conventions The following table shows the typographical conventions used in the IBM XL Fortran for AIX, V15.1.3 information. Table 1. Typographical conventions Typeface Indicates Example lowercase Invocation commands, executable The compiler provides basic bold names, and compiler options. invocation commands, xlf, along with several other compiler invocation commands to support various Fortran language levels and compilation environments. The default file name for the executable program is a.out. © Copyright IBM Corp. 1996, 2015 v Table 1. Typographical conventions (continued) Typeface Indicates Example italics Parameters or variables whose Make sure that you update the size actual names or values are to be parameter if you return more than supplied by the user. Italics are the size requested. also used to introduce new terms. underlining The default setting of a parameter nomaf | maf of a compiler option or directive. monospace Examples of program code, To compile and optimize reference to program code, file myprogram.f, enter: xlf myprogram.f names, path names, command -O3. strings, or user-defined names. UPPERCASE Fortran programming keywords, The ASSERT directive applies only to bold statements, directives, and intrinsic the DO loop immediately following procedures. Uppercase letters may the directive, and not to any nested also be used to indicate the DO loops. minimum number of characters required to invoke a compiler option/suboption. Qualifying elements (icons and bracket separators) In descriptions of language elements, this information uses icons and marked bracket separators to delineate the Fortran language standard text as follows: Table 2. Qualifying elements Bracket Icon separator text Meaning F2008 Fortran 2008 The text describes an IBM XL Fortran implementation of begins / the Fortran 2008 standard. F2008 Fortran 2008 ends Fortran 2003 The text describes an IBM XL Fortran implementation of begins / the Fortran 2003 standard, and it applies to all later Fortran 2003 standards. ends IBM extension The text describes a feature that is an IBM XL Fortran begins / IBM extension to the standard language specifications. extension ends TS 29113 TS 29113 The text describes an IBM XL Fortran implementation of begins / TS Technical Specification 29113, referred to as TS 29113. TS 29113 29113 ends Note: If the information is marked with a Fortran language standard icon or bracket separators, it applies to this specific Fortran language standard and all later ones. If it is not marked, it applies to all Fortran language standards. Syntax diagrams Throughout this information, diagrams illustrate XL Fortran syntax. This section helps you to interpret and use those diagrams. vi XL Fortran: Getting Started v Read the syntax diagrams from left to right, from top to bottom, following the path of the line. The ►►─── symbol indicates the beginning of a command, directive, or statement. The ───► symbol indicates that the command, directive, or statement syntax is continued on the next line. The ►─── symbol indicates that a command, directive, or statement is continued from the previous line. The ───►◄ symbol indicates the end of a command, directive, or statement. Fragments, which are diagrams of syntactical units other than complete commands, directives, or statements, start with the │─── symbol and end with the ───│ symbol. IBM XL Fortran extensions are marked by a number in the syntax diagram with an explanatory note immediately following the diagram. Program units, procedures, constructs, interface blocks and derived-type definitions consist of several individual statements. For such items, a box encloses the syntax representation, and individual syntax diagrams show the required order for the equivalent Fortran statements. v Required items are shown on the horizontal line (the main path): ÊÊ keyword required_argument ÊÍ v Optional items are shown below the main path: ÊÊ keyword ÊÍ optional_argument Note: Optional items (not in syntax diagrams) are enclosed by square brackets ([
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages76 Page
-
File Size-