Iceberg was decommissioned on 30th November 2020. Users of Iceberg need to switch to using ShARC and/or Bessemer instead.
The NAG Fortran Compiler is robust, highly tested, and valued by developers all over the globe for its checking capabilities and detailed error reporting. The Compiler is available on Unix platforms as well as for Microsoft Windows and Apple Mac platforms. Release 6.0 has extensive support for both legacy and modern Fortran features, and also supports parallel programming with OpenMP.
After connecting to iceberg (see Establishing a SSH connection), start an interactive sesssion with the
To make a version of the NAG Fortran Compiler available, run one of following
module load compilers/NAG/6.1 module load compilers/NAG/6.0
To compile the Fortran hello world example into an executable called
hello using the NAG compiler
nagfor hello.f90 -o hello
Once you’ve run one of the NAG Compiler module command,
man documentation is available:
Differences between different versions can be found in the Release Notes.
The following notes are primarily for system administrators:
Add the license key(s) to
The license key needs to be updated annually before 31st July.
The NAG compiler environment modules (see below) set the environment variable
$NAG_KUSARI_FILE to the path to this file.
Perform an unattended install using
this script. The software will be installed into
this modulefile as
Test the installation by compiling and building a sample Fortran 90 program
module load compilers/NAG/6.1 nagfor -o /tmp/f90_util /usr/local/packages6/compilers/NAG/6.1/lib/NAG_Fortran/f90_util.f90 /tmp/f90_util
Run the following interactively:
mkdir -p /usr/local/packages6/compilers/NAG/6.0 tar -xvzf ./npl6a60na_amd64.tgz cd NAG_Fortran-amd64/
Run the interactive install script
Accept the license and answer the questions as follows:
Install compiler binaries to where [/usr/local/bin]? /usr/local/packages6/compilers/NAG/6.0 Install compiler library files to where [/usr/local/lib/NAG_Fortran]? /usr/local/packages6/compilers/NAG/6.0/lib/NAG_Fortran Install compiler man page to which directory [/usr/local/man/man1]? /usr/local/packages6/compilers/NAG/6.0/man/man1 Suffix for compiler man page  (i.e. nagfor.1)? Press enter Install module man pages to which directory [/usr/local/man/man3]? /usr/local/packages6/compilers/NAG/6.0/man/man3 Suffix for module man pages  (i.e. f90_gc.3)? Press Enter
this modulefile as
Finally, test the installation by compiling and building a sample Fortran 90 program
module load compilers/NAG/6.0 nagfor -o /tmp/f90_util /usr/local/packages6/compilers/NAG/6.0/lib/NAG_Fortran/f90_util.f90 /tmp/f90_util