What's new in IBM XL Fortran for AIX and Linux, Version 14.1

New and enhanced features in XL Fortran Version 14.1 include support of language features that you can use to port code easily when moving to IBM Power Systems, as well as improved compilation time at commonly used optimization levels. This article for those who have some experience with previous versions of XL Fortran gives the details and describes other highlights.

Kelvin Li ( kli@ca.ibm.com), Advisory Software Developer, IBM

Kelvin Li is an advisory software developer on the XL compiler team in the IBM Canada Lab. He has more than 15 years of experience on developing Fortran and C frontends. He represents IBM in the OpenMP ARB and Language committees.



Melanie Steckham (steckham@ca.ibm.com), Advisory Information Developer, IBM

Melanie Steckham is an advisory information developer on the XL compiler team in the IBM Canada Lab.  She has more than 25 years of experience in writing documentation for IBM software.



11 May 2012

Also available in Chinese Russian

Introduction

XL Fortran is a powerful programming language compiler for IBM® AIX® and Linux platforms. It is geared toward scientists and engineers who develop and deploy extensive numerical scientific and high-performance computing applications on IBM® Power Systems™. Enhancements introduced in Version 14.1 improve developer productivity and application performance. XL Fortran continues to offer these advantages:

  • Eases application migration through conformance to the latest international programming language standards
  • Simplifies parallel programming practices through full support for the OpenMP V3.1 API specification
  • Provides faster compile time, notably for large applications
  • Simplifies programming tasks through new options, directives and functions

Enhancements introduced in Version 14.1 improve developer productivity and application performance.

This article describes the new features and enhancements in XL Fortran for AIX and XL Fortran for Linux, Version 14.1. It does not attempt to cover every new feature and function, nor does it attempt to describe every area in great depth. Instead, it introduces you to some of the new areas of XL Fortran V14.1, starting with the enhancements to support language standards and then moving to parallel programming, debugging optimized code, and performance.


Language standards enhancements

XL Fortran V14.1 starts the multiphase implementation of the latest Fortran language standard, ISO/IEC 1539-1:2010 (also known as Fortran 2008). The following features are supported in this release:

  • The BLOCK construct defines an executable block that can contain declarations. This feature gives you the flexibility to declare variables in a block for a certain portion of code, rather than declaring them in the specification part, and it makes your code easier to maintain.
  • The CONTIGUOUS attribute is to specify array objects to be stored in contiguous memory. The IS_CONTIGUOUS intrinsic function returns whether the variable is stored in contiguous memory or not. This feature provides valuable information to the compiler to optimize your code, resulting in program performance benefits.
  • The NEWUNIT= specifier on the OPEN statement instructs the Fortran runtime library to make a connection to an unused unit. This usability enhancement avoids accidental changes to currently connected units.
  • The complex part designator allows either a real or an imaginary part of a complex type to be accessed directly. This feature provides flexibility when using a complex type, and you can modify or reference the real and imaginary part individually without calling the intrinsic functions. This simplifies your code that requires manipulations of a complex type.
  • The EXECUTE_COMMAND_LINE intrinsic executes a command line in a program. This provides a portable and standardized way for you to execute commands in Fortran programs.
  • The ERROR STOP statement is added for use in abnormal termination, because the STOP statement is intended for normal termination. This feature allows you to distinguish normal and abnormal termination of a program, and it provides an efficient way to identify whether any attention is needed for the termination.
  • More math intrinsics are added, including ERF, ERC, ERFC_SCALED, POPCNT, POPPAR, HYPOT, GAMMA, LOG_GAMMA, LEADZ, and TRAILZ. This gives you different math functions to use in your programs and makes your code more portable when standard intrinsics are used.

Parallel programming enhancements

The OpenMP API is a portable, scalable programming model that offers programmers a simple, flexible standard interface for developing parallel applications for platforms, ranging from the desktop to the supercomputer. XL Fortran V14.1 delivers full support for OpenMP V3.1, which includes the following features:

  • Final and mergeable tasks can provide further optimization opportunities in shrinking computation size scenarios.
  • The taskyield construct gives you full control of where a thread can switch from one task to another task.
  • Better thread affinity control through the OMP_PROC_BIND environment variable enables you to take advantage of the characteristic of the machine architecture.
  • You have finer control of the number of threads used in nested parallelism by the OMP_NUM_THREADS environment variable so that you can express how many threads are being used in a team.
  • The atomic construct extension (read, write, capture) includes more types of atomic operation to better synchronize parallel code.

Diagnostic report enhancements

The diagnostic reports can help you identify opportunities to improve the performance of your code. This release features these enhancements to the reports:

  • Compiler reports highlight the optimizations that the compiler was able to perform, as well as which optimization opportunities were missed but are now available, in both HTML and XML format. The compiler reports in HTML format are ready to be displayed. These reports provide information to help reduce programming effort for tuning applications.
  • New sections have been added to the listing file to help you analyze your programs, including the relevance, missing, and outdated profiling data.
  • The showpdf utility is enhanced to show a view of cache-miss and value profiling information. This view of profiling information can help you identify possible performance bottlenecks and can lead to improved efficiency of applications.

Compile-time performance and scalability improvements

XL Fortran V14.1 provides faster compile time, notably for large applications that contain Fortran array language and Fortran modules. In addition, the use of machine resources is improved by reducing the amount of memory required by the compiler, such as pointer analysis and alias computation. The compiler and optimizer use the greater addressability of 64-bit process, thereby allowing significantly larger programs to be optimized.


Usability enhancements

Options, directives, and functions continue to simplify programming tasks, shortening development time and reducing risk.

Several compiler options were added or enhanced. For example, the -g option is extended to improve the debugging of optimized programs. This enhancement allows you to choose between the aggressiveness of some optimizations versus the amount of accurate debug information being produced in the executable program. This approach can allow the compiler to provide debug information without trading off too much in performance opportunities. You can now debug an optimized application with this new enhancement.

The -qhaltonmsg option stops the compilation before producing any object files, executable files, or assembler source files if a specified error message is generated. The –qmaxerr option limits the number of error messages emitted by the compiler. These two options allow you to control the compiler behavior when errors are encountered in your source. Using these options can help you identify any errors more efficiently.

The –qinitalloc option instructs the compiler to initialize variables that are specified in the ALLOCATE statement. This feature improves productivity, because you can use it to help you diagnose any uninitialized variables in the programs. This can also be a convenient way to initialize allocatable variables.

The ALIGN directive allows you to give variables a specific alignment. You can use this information in optimization to make your program take advantage of the processor's characteristics.

The ASSERT directive is enhanced to allow you to provide more information regarding the possible maximum or minimum number of a given DO loop. This feature allows the compiler to schedule and optimize the loop in a more efficient way.

The 2008std and 2008pure suboption of the –qlanglvl option are added to include any Fortran 2008 features that XL Fortran supports.


Summary

This article highlighted some of the more notable enhancements introduced in Version 14.1 of XL Fortran 14.1. This version includes new capabilities related to performance and application development.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Rational software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=813725
ArticleTitle=What's new in IBM XL Fortran for AIX and Linux, Version 14.1
publish-date=05112012