Guide to IBM XL Fortran Compiler

1 Introduction

The IBM XL Fortran Compiler is a compiler that has been optimized for IBM Power systems. There are many benefits to using the XL Fortran compiler, chief of which is a faster compile time for applications that contain the Fortran 90 array language and Fortran modules. The compiler is also capable of creating an optimization report which provides information about the optimizations that the compiler was able to perform as well as a list of optimizations that were missed, reducing the amount of time and effort spent tuning applications. It is also capable of profile driven optimization; collecting information about the typical input data and then applying optimizations based on that data so that the program is optimized for its important inputs.



1.1 This Guide to Installation

This Guide to Installation is written specifically for Yellow Dog Linux 7 and the IBM Fortran Compiler version 14.1.

Refer to us.fixstars.com/support for updates, issues specific with computer configurations, and engineering notes.



2 Installation

To install the XL Fortran Compiler on Yellow Dog Linux you can use the xlf_install utility that comes with the compiler. First you will want to become root user. Then you want to make sure that all of the following prerequisite packages are installed. To install ppc64 packages use the `yum install ` command. To install ppc packages, append `.ppc` to the package name. For example, to install the ppc version of libgcc you would enter `yum install libgcc.ppc`.



Package Requirements Architectures
 

gcc-4.4.6

ppc64

 

gcc-c++-4.4.6

ppc64

 

glibc-2.12

ppc & ppc64

 

glibc-devel-2.12

ppc & ppc64

 

libgcc-4.4.6

ppc & ppc64

 

libstdc++-4.4.6

ppc & ppc64

 

libstdc++-devel-4.4.6

ppc & ppc64

 

compat-libstdc++-33-3.2.3

ppc & ppc64

 

perl >= 5.0

ppc64


2.1 Using xlf_install

Once all of these packages are installed then you are ready to run the xlf_install utility. This utility will:

  • Check for all prerequisite packages

  • Uninstall any previous versions of XL Fortran

  • Install all packages into the default location, which is /opt/ibmcmp/

  • Automatically invokes the new_install utility, which installs the license file and generates the default configuration file.

  • Optionally creates symbolic links in /usr/bin/ to the compiler invocation commands

  • Generates an installation log in the /tmp/ directory



Once you have downloaded the package you will have to unpack it. You can do this by using the following command:



tar -xzf filename



Now you should be able to run the ./xlf_install utility to begin installing the XL Fortran Compiler. If you have a previous version of XL Fortran installed or if you have installed the XL C/C++ compiler then you will be asked if you wish to continue the installation during the SMP and MASS version check. You will be asked to review and accept/decline a license agreement. The installer will also ask if you wish to create symbolic links for the compiler invocations in /usr/bin/, making it a bit more convenient to invoke the compiler. If all packages are successfully installed then a message is displaying confirming that the compiler install was completed.



2.2 xlf_install Options


Install Options
 

-h

Displays the installation utility help page.
 

-prefix installation_path

Explicitly specifies the path to install all the compiler packages.

NOTE: If this option is not used the default installation location is /opt/ibmcmp/

 

-rpmloc rpmlocation_path

Explicitly specifies the path where all compiler packages are located. The default rpmlocation_path is ./images-x86/rpms or ./images/rpms, which is relative to the path of the installation tool.

NOTE: For most users the -rpmloc rpmlocation_path option is not required in the installation invocation. If you use the utility directly from the CD or electronic image it will automatically determine the source location of the packages.

 

-U

Updates the compiler to the Version.Release.Modifications.Fix-Build (V.R.M.F-B) level that the installation utility version supports.

 

-v

Displays debugging information generated during the installation of the compiler.

 

-vv

Displays extra debugging information generated during the installation of the compiler.

3 Usage

The Fortan compiler can be invoked by using the following commands:

  • xlf

  • xlf_r

  • xlf90

  • xlf90_r

  • f90

  • xlf95

  • xlf95_r

  • f95

  • xlf2003

  • xlf2003_r

  • f2003

  • xlf2008

  • xlf2008_r

  • f2008

  • f77

  • fort77

The xlf, xlf_r, f77, and fort77 commands maintain compatibility with the behaviour and I/O formats of XL Fortran Version 2. The xlf90, xlf90_r and the f90 commands provide more Fortran 90 conformance and some implementation choices for efficiency and usability. The f95, xlf95, and xlf95_r commands provide more Fortran 95 conformance and some implementation choices for efficiency and usability. The xlf2003, xlf2003_r, and the f2003 commands provide more Fortran 2003 conformance and some implementation choices for efficiency and usability. The xlf2008, xlf2008_r, and the f2008 commands provide functionality and implementation choices for Fortran 2008. The f77 or the fort 77 command provides compatibility with the XPG4 behaviour.

4 Conclusion

This guide covers the basic installation and invocation of the IBM Fortran Compiler. More in-depth usage information can be found in the XL Fortran Compiler Reference located here:

http://www-01.ibm.com/support/docview.wss?uid=swg27024803

You may also wish to read the Optimization and Programming guide to help maximize the performance gains achieved by using XL Fortran:

http://www-01.ibm.com/support/docview.wss?uid=swg27024775




 
          Copyright ® 1999-2010. Fixstars Corporation. All rights reserved.
YDL.net Fixstars Corporation