# NAG Fortran Compiler Release 5.3 Release Note

## 1 Introduction

Release 5.3 of the NAG Fortran Compiler contains many improvements to the compiler and additions to the Fortran 2003 and Fortran 2008 language features.

Licence keys for Releases 5.1 and 5.2 will not work with Release 5.3; contact NAG to obtain a new licence key.

### 1.1 Compatibility with Release 5.2

Release 5.3 of the NAG Fortran Compiler is fully compatible with Release 5.2.

### 1.2 Compatibility with Release 5.1

Release 5.2 of the NAG Fortran Compiler is compatible with NAGWare f95 Release 5.1 except that:
• programs or libraries that use the CLASS keyword, or which contain types that will be extended, need to be recompiled;
• the following 64-bit platforms, when the -abi=64 option (the default) is used, are binary incompatible and all programs and libraries need to be recompiled: NPL6A51NA, NPMI651NA.

### 1.3 Compatibility with Earlier Releases

Except as noted, the NAG Fortran Compiler release 5.3 is compatible with NAGWare f90 Releases 2.1 and 2.2, as well as with all NAGWare f95 Releases from 1.0 to 5.0, except as noted below.

The following incompatibilities were introduced in Release 5.1:

• The value returned by STAT=, on an ALLOCATE or DEALLOCATE statement, may differ from the pre-5.1 value in some cases. For further information see the F90_STAT module documentation.
• Programs that used type extension (EXTENDS attribute) in 5.0 need to be recompiled.
• Formatted output for IEEE infinities and NaNs is different, and now conforms to Fortran 2003.
• List-directed output of a floating-point zero now uses F format, as required by Fortran 2003, instead of E format.
• An i/o or format error encounted during NAMELIST input will now skip the erroneous record. This behaviour is the same as all other formatted input operations including list-directed.

### 1.4 New Features

Release 5.3 supports OpenMP 3.0 (only when the -openmp option is used) and includes many new features from the Fortran 2003 and Fortran 2008 standards.

This release also contains performance enhancements and other minor enhancements. Additionally, several programming tools have been integrated into the compiler system.

## 2 OpenMP 3.0 Support

Support for the most commonly-used features of OpenMP 3.0 has been added. In the initial 5.3 release, support for each directive is described in the table below.

 Executable directive Level of support PARALLEL Supported except for the COPYIN clause. DO Supported except for COLLAPSE, LASTPRIVATE and ORDERED. SECTIONS Supported except for LASTPRIVATE. SINGLE Fully supported. MASTER Fully supported. WORKSHARE Not supported. PARALLEL DO Supported except as noted for PARALLEL and DO. PARALLEL SECTIONS Fully supported. PARALLEL WORKSHARE Not supported. TASK Not supported. CRITICAL Fully supported. BARRIER Fully supported. TASKWAIT Not supported. ATOMIC Fully supported. FLUSH Fully supported. ORDERED Not supported. Data directive/clauses Level of support THREADPRIVATE Not supported. DEFAULT Fully supported. SHARED Fully supported. PRIVATE Fully supported. FIRSTPRIVATE Supported in PARALLEL directives. LASTPRIVATE Not supported. REDUCTION Fully supported. COPYIN Not supported. COPYPRIVATE Not supported.

All the procedures in section 3.2 of the OpenMP standard are supported; these are omp_set_num_threads, omp_get_num_threads, omp_get_max_threads, omp_get_thread_num, omp_get_num_procs, omp_in_parallel, omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested, omp_set_schedule, omp_get_schedule, omp_get_thread_limit, omp_set_max_active_levels, omp_get_max_active_levels, get_level, omp_get_ancestor_thread_num, omp_get_team_size and omp_get_active_level.

The lock procedures in section 3.3 of the OpenMP standard are not supported in this release.

The timing procedures in section 3.4 of the OpenMP standard are supported; these are omp_get_wtime and omp_get_wtick.

All OpenMP environment variables are supported.

When using the IEEE arithmetic support modules, the IEEE modes (rounding, halting and underflow) are propagated into spawned OpenMP threads at the beginning of a PARALLEL construct, and any IEEE flag that are set by an OpenMP thread is passed back to the parent thread at the end of the PARALLEL construct.

## 8 Integrated Programming Tools

Three software tools that operate on Fortran source files have been integrated into the NAG compiler system.

## 10 New Fortran Standard

The extensions (described above) which follow the rules of the Fortran 2003 and Fortran 2008 standards are listed below together with the appropriate section number for the reference book Modern Fortran Explained'' by Metcalf, Reid & Cohen, Oxford University Press, 2011 printing (ISBN 978-0-19-960142-4).

 Section Feature 13.3 Type parameter enquiries (%KIND and %LEN). 14.8 Final subroutines. 14.10 EXTENDS_TYPE_OF and SAME_TYPE_AS. 15.3 Structure constructor keywords and overloading. 15.10 Intrinsic functions in constant expressions. 17.13 INQUIRE statement LOGICAL variable kinds. 20.1.3 Improved type-bound procedure declaration statement. 20.1.4 Omitting an allocatable value in a structure constructor. 20.1.6 STOP statement changes. 20.5.7 Generic resolution changes. 20.7.2 The NEWUNIT= specifier. 20.10.1 New intrinsic functions BGE, BGT, BLE and BLT. 20.10.3 New intrinsic functions IALL, IANY and IPARITY. 20.10.4 New intrinsic functions LEADZ, POPCNT, POPPAR and TRAILZ. 20.10.5 New intrinsic functions MASKL and MASKR. 20.10.7 New intrinsic functions SHIFTA, SHIFTL and SHIFTR. 20.11.5 New intrinsic function PARITY. 20.12.2 Names in ISO_FORTRAN_ENV for common kinds. 20.12.3 Arrays of kinds in ISO_FORTRAN_ENV. B.10.2 Redundant CONTAINS statement. C.2 Obsolescent ENTRY statement.