NAG Fortran Compiler


The NAG Fortran Compiler is a full standard implementation of the ISO Fortran 95 language with the addition of almost all Fortran 2003, some Fortran 2008 and OpenMP 3.0 and 3.1. Its development is based on the NAGWare f90 Compiler which was the world's first Fortran 90 compiler. Like its predecessor, the NAG Fortran Compiler has been thoroughly tested and widely used since its launch in 1997.

In addition, some common extensions to Fortran 77 are allowed to provide support for legacy code. For example, the NAG Fortran Compiler allows processing of code containing tab format input, byte-sized declarations (e.g INTEGER*2) and DOUBLE COMPLEX.

Details of the Fortran 2003 language capabilities
Details of the Fortran 2008 language capabilities

The NAG Fortran Compiler supports OpenMP 3.0 and 3.1

Details of OpenMP capabilities

The checking compiler - for improved code portability

Extensive error messages are given by the Compiler, both those required by the ISO standard and additional compile and run-time information. The messages are informative rather than cryptic and usually contain context information to assist in identifying and rectifying problems. For this reason the Compiler is particularly suited to teaching and for programmers wishing to update their skills to the new language. Programmers who wish to produce portable, standard-conforming code will benefit from the analysis carried out by the Compiler.

The NAG Fortran Compiler features many optional run-time checks, including - array bounds, pointer association, pointer references, procedure references, dangling pointers and undefined variables. There are also facilities to trace memory allocation and deallocation and help to identify memory leaks.

Compile-time error messages may optionally be colour coded, to highlight serious errors. An option is provide to produce a traceback showing the call stack if a run-time error occurs.

Built-in modules provide an interface to a large number of Posix system calls, e.g. SYSTEM, and many others.

Automatic garbage collection is available as an option. This prevents memory leaks by deallocating memory that can no longer be accessed by the program.

In addition the Compiler provides software tools to: convert fixed-format code to free-format; pretty print ("polish") code; list dependency information of modules and include files; produce callgraphs; and generate explicit procedure interfaces as module or INCLUDE files.

An extensive user manual is provided in a PDF file as part of the product distribution.

A maintenance service is available for the compiler giving access to bug fixes and new releases.


The NAG Fortran Compiler is available on a range of platforms. For up-to-date information click on the availability button.

If your machine and operating system combination are included in the current list of implementations then the only additional requirement is that you have a C compiler available, except on Microsoft Windows where the required C compiler is included with NAG Fortran. In general this will be the default C compiler for the target machine, e.g. gcc.

If you require any further information on availability then please contact us to advise us of your requirements.


NAG Fortran Compiler Documentation Index and FAQs

Release Information

General Compiler Information

Product Availability

The NAG Fortran Compiler is available now on all major Unix platforms. For users of Microsoft Windows NAG has developed NAG Fortran Builder, a new Integrated Development Environment (IDE) for the NAG Fortran Compiler.


Product Platform Release Comment
the NAG Fortran Compiler
x86 and x86-64 Windows Release 5.3  
the NAG Fortran Compiler
Linux64 Release 6.0 gcc 4.1.2
the NAG Fortran Compiler
Linux x86-32 Release 6.0 gcc 3.2.2
MAC OS X      
the NAG Fortran Compiler
Apple Intel Mac64 Release 6.0 gcc 4.2.1
Solaris (SPARC)      
the NAG Fortran Compiler
Sun SPARC Solaris Release 5.3 Sun C v 5.9
the NAG Fortran Compiler
Sun SPARC Solaris Release 5.2 gcc 3.4.2
the NAG Fortran Compiler
IBM Z9 Open Edition Release 5.2 IBM C
the NAG Fortran Compiler
IBM Z9 Linux Release 5.1 gcc 3.4.6
the NAG Fortran Compiler
IBM Power AIX Release 5.1 AIX XL C 6.0
HP PA-RISC      
the NAG Fortran Compiler
HP PA-RISC 1.1 Release 5.1 HP ANSI C


Website Feedback

If you would like a response from NAG please provide your e-mail address below.

(If you're a human, don't change the following field)
Your first name.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Enter the characters shown in the image.