NAG Fortran Compiler Release 5.3.1 Release Note

NAG Fortran Compiler Release 5.3.1 Release Note

Table of Contents

1 Introduction

Release 5.3.1 of the NAG Fortran Compiler is a minor update to the compiler, containing several new features and a number of minor improvements to the compiler.

Release 5.3.1 uses the same Kusari licence key as Release 5.3, no new key is needed if a 5.3 licence is available.

See KLICENCE.txt for more information about Kusari Licence Management.

1.1 Compatibility with Releases 5.3 and 5.2

Release 5.3.1 of the NAG Fortran Compiler is fully compatible with Releases 5.3 and 5.2, except that on Windows, modules or procedures whose names begin with a dollar sign ($) need to be recompiled.

1.2 Compatibility with Release 5.1

Release 5.3.1 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.1 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.1 contains additional support for OpenMP 3.0.

Runtime detection of integer overflow is now available as an option.

2 OpenMP 3.0 Support

The additional features of OpenMP 3.0 that are now supported are:

  • the COLLAPSE specifier is supported;
  • the COPYIN specifier is supported;
  • the COPYPRIVATE specifier is supported;
  • the LASTPRIVATE specifier is supported;
  • the ORDERED specifier is supported;
  • the THREADPRIVATE data-sharing directive is supported for variables;
  • the locking routines from section 3.3 are supported (both simple locks and nestable locks).

The following tables indicate the support for each feature of OpenMP 3.0.

Executable directive Level of support
PARALLEL Fully supported.
DO Fully supported.
SECTIONS Fully supported.
SINGLE Fully supported.
MASTER Fully supported.
WORKSHARE Not supported.
PARALLEL DO Fully supported.
PARALLEL SECTIONS Fully supported.
TASK Not supported.
CRITICAL Fully supported.
BARRIER Fully supported.
TASKWAIT Not supported.
ATOMIC Fully supported.
FLUSH Fully supported.
ORDERED Fully supported.
Data directive/clauses Level of support
THREADPRIVATE Supported for variables.
DEFAULT Fully supported.
SHARED Fully supported.
PRIVATE Fully supported.
FIRSTPRIVATE Fully supported.
LASTPRIVATE Fully supported.
REDUCTION Fully supported.
COPYIN Fully supported.
COPYPRIVATE Supported for variables.

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 supported; these are omp_destroy_lock, omp_destroy_nest_lock, omp_init_lock, omp_init_nest_lock, omp_set_lock, omp_set_nest_lock, omp_try_set_lock, omp_try_set_nest_lock, omp_unset_lock and omp_unset_nest_lock.

The timing routines 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 is set by an OpenMP thread is passed back to the parent thread at the end of the PARALLEL construct.

3 Fortran 2003 Features

Additional features of Fortran 2003 are now supported:

This means that all of Fortran 2003 is supported except for
  • parameterised derived types, and
  • user-defined derived-type input/output.

4 Fortran 2008 Features

5 Performance Enhancements

6 Additional Error Checking

7 Other Enhancements

8 Summary release notes for Release 5.3

This section of this Release Note summarises the differences between Releases 5.2 and 5.3.

8.1 New Feature Summary

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.

Additional Fortran 2003 features are supported.

Some Fortran 2008 features are supported.

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

8.2 Fortran 2003 Features

8.3 Fortran 2008 Features

8.4 Performance Enhancements

8.5 Additional Error Checking

8.6 Other Enhancements

8.7 Integrated Programming Tools

Three software tools that operate on Fortran source files have been integrated into the NAG compiler system.
  • Call Graph Generator — produces a call graph, with optional index and called-by tables.
  • Dependency Analyser — produces information about dependencies on modules or INCLUDE files, in ‘make’ format, as English prose, or as an ordered build list.
  • Polish — polishes (“pretty-prints”) Fortran source files, optionally renumbering statement labels and converting DO statements to the block DO form.

8.8 Miscellaneous

9 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.
15.3 Structure constructor keywords and overloading.
15.10 Intrinsic functions in constant expressions.
17.11 The ROUND= specifier.
17.13 INQUIRE statement LOGICAL variable kinds.
17.17 Enhanced NAMELIST statement.
20.1.1 Implied-shape arrays.
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.4 Impure elemental procedures.
20.5.7 Generic resolution changes.
20.6.2 Polymorphic allocatable assignment.
20.7.2 The NEWUNIT= specifier.
20.9.1 Changes to trigonometric intrinsic functions.
20.9.2 New intrinsic functions ACOSH, ASINH and ATANH.
20.9.4 New intrinsic functions HYPOT and NORM2.
20.10.1 New intrinsic functions BGE, BGT, BLE and BLT.
20.10.2 New intrinsic functions DSHIFTL and DSHIFTR.
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.6 New intrinsic function MERGE_BITS.
20.10.7 New intrinsic functions SHIFTA, SHIFTL and SHIFTR.
20.11.2 New intrinsic subroutine EXECUTE_COMMAND_LINE.
20.11.5 New intrinsic function PARITY.
20.11.6 RADIX argument for intrinsic function SELECTED_REAL_KIND.
20.11.7 New intrinsic function STORAGE_SIZE.
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.
B.10.5 Optional keywords on module/internal subprogram END statements.
B.10.6 Referencing the ATAN2 functionality via the name ATAN.
C.2 Obsolescent ENTRY statement.