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
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.
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:
BLOCKconstruct 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.
CONTIGUOUSattribute is to specify array objects to be stored in contiguous memory. The
IS_CONTIGUOUSintrinsic 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.
NEWUNIT=specifier on the
OPENstatement 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.
EXECUTE_COMMAND_LINEintrinsic executes a command line in a program. This provides a portable and standardized way for you to execute commands in Fortran programs.
ERROR STOPstatement is added for use in abnormal termination, because the
STOPstatement 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
TRAILZ. This gives you different math functions to use in your programs and makes your code more portable when standard intrinsics are used.
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_BINDenvironment 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_THREADSenvironment 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.
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.
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.
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.
-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.
–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.
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.
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.
2008pure suboption of the
–qlanglvl option are added to include any Fortran 2008 features that XL Fortran supports.
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.
- Find out more about XL Fortran for AIX and Linux:
- Visit the Rational software area on developerWorks for technical resources and best practices for Rational Software Delivery Platform products.
- Subscribe to the developerWorks weekly email newsletter, and choose the topics to follow.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Attend a free developerWorks Live! briefing to get up-to-speed quickly on IBM products and tools, as well as IT industry trends.
- Watch developerWorks on-demand demos, ranging from product installation and setup demos for beginners to advanced functionality for experienced developers.
Get products and technologies
- Get the free trial download for XL Fortran for IBM AIX.
- Get the free trial download for XL Fortran for Linux.
- Try XL Fortran for IBM AIX by spending a while in the Enterprise Modernization Sandbox
- Download a free trial version of Rational software.
- Evaluate other IBM software in the way that suits you best: Download it for a trial, try it online, use it in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement service-oriented architecture efficiently.
- Get connected. Join the Rational Fortran
Café community. Join the Rational software forums to ask questions and participate in discussions.
- Ask and answer questions and increase your expertise when you get involved in the Rational forums,
cafés, and wikis.
- Join the Rational community to share your Rational software expertise and get connected with your peers.
- Rate or review Rational software. It's quick and easy.
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.