NAG libraryThe NAG license is available only to the Department of Meteorology. To get access, please raise a ticket asking for a copy of the license file (/software/applications/NAG/nag_key.txt) to be placed in your home directory. This process will also allow us to record license usage, so please always request access via a ticket and do not share the license file, even within the Department.
You will need to manually export the variable with the location of the license file.
There is only one version, Mark 31. Module files are not provided because it would just make it more confusing. Please source the supplier’s configuration script which will set up the environmental variables according to the selected options. Please refer to the supplier instructions at https://support.nag.com/content/downloads-nag-library-nll6i31dbl, or see the following example.
License until 2026/07/31, please ask for renewing if using the software after this date.
racc2-login-0:~$ module load compilers/intel/19.0.4.243
racc2-login-0:~$ . /software/applications/NAG/nll6i31dbl/scripts/nagvars.sh int64 vendor static
nagvars.sh: nAG Library Mark 31.0.0, implementation NLL6I31DBL
...
racc2-login-0:~$ cp /software/applications/NAG/nll6i31dbl/f_examples/source/a00adfe.f90 ./
racc2-login-0:~$ ${NAGLIB_F77} ${NAGLIB_FFLAGS} ${NAGLIB_INCLUDE} a00adfe.f90 ${NAGLIB_LINK}
racc2-login-0:~$ export NAG_KUSARI_FILE=~/nag_key.txt
racc2-login-0:~$ ./a.out
A00ADF Example Program Results
*** Start of NAG Library implementation details ***
Implementation title: Linux, 64-bit, Intel Classic C/C++ or Intel Classic Fortran
Precision: Fortran double precision
Product Code: NLL6I31DBL
Mark: 31.0
Vendor Library: MKL 2021.0.4
Applicable to:
hardware: x86_64
operating system: Linux 4.11.12-100.fc24.x86_64
Fortran compiler: Intel Classic Fortran Compiler Version 2021.4.0 Build 20210910_000000
and compatible systems.
Licence query: Successful
*** End of NAG Library implementation details ***
This program was run on the following date:
20251009-16:09:39:404
*** ----------------------------------------- ***
racc2-login-0:~$ module load compilers/intel/19.0.4.243
racc2-login-0:~$ export NAG_KUSARI_FILE=/software/applications/NAG/nag_key.txt
racc2-login-0:~$ . /software/applications/NAG/nll6i30dbl/scripts/nagvars.sh int64 vendor static
nagvars.sh: NAG Library Mark 30.0.0, implementation NLL6I30DBL
...
racc2-login-0:~$ cp /software/applications/NAG/nll6i30dbl/f_examples/source/a00adfe.f90 ./
racc2-login-0:~$ ${NAGLIB_F77} ${NAGLIB_FFLAGS} ${NAGLIB_INCLUDE} a00adfe.f90 ${NAGLIB_LINK}
racc2-login-0:~$ ./a.out
A00ADF Example Program Results
*** Start of NAG Library implementation details ***
Implementation title: Linux, 64-bit, Intel Classic C/C++ or Intel Classic Fortran
Precision: Fortran double precision
Product Code: NLL6I30DBL
Mark: 30.0
Vendor Library: MKL 2021.0.4
Applicable to:
hardware: x86_64
operating system: Linux 4.11.12-100.fc24.x86_64
Fortran compiler: Intel Classic Fortran Compiler Version 2021.4.0 Build 20210910_000000
and compatible systems.
Licence query: Successful
*** End of NAG Library implementation details ***
This program was run on the following date:
20240822-12:46:40:214
*** ----------------------------------------- ***
We recommend you use Mark 27 versions. Module files are not provided because it would just make it more confusing. Please source the supplier’s configuration script which will set up the environmental variables according to the selected options. Refer to the supplier instructions at https://www.nag.com/numeric/nl/nagdoc_27/. You also need to manually export the variable with the location of the license file.
$ module load intel/19.0.4.243
$ export NAG_KUSARI_FILE=/share/apps/libraries/nag/license.dat
$ . /share/apps/libraries/nag/nll6i27dbl/scripts/nagvars.sh int64 vendor static
$ cp /share/apps/libraries/nag/nll6i27dbl/f_examples/source/a00adfe.f90 ./
$ ${NAGLIB_F77} ${NAGLIB_FFLAGS} ${NAGLIB_INCLUDE} a00adfe.f90 ${NAGLIB_LINK}
$ ./a.out
A00ADF Example Program Results
*** Start of NAG Library implementation details ***
Implementation title: Linux, 64-bit, Intel C/C++ or Intel Fortran
Precision: Fortran double precision
Product Code: NLL6I27DBL
Mark: 27.0
Vendor Library: MKL 2019.0.3
Applicable to:
hardware: x86_64
operating system: Linux 4.11.12-100.fc24.x86_64
Fortran compiler: Intel ifort Version 19.0.3.199 20190206
and compatible systems.
Licence query: Successful
*** End of NAG Library implementation details ***
This program was run on the following date:
20200724-20:07:40:154
*** ----------------------------------------- ***
$ module load gcc/8.4.0
$ export NAG_KUSARI_FILE=/share/apps/libraries/nag/license.dat
$ . /share/apps/libraries/nag/nll6i27dgl/scripts/nagvars.sh int64 vendor static
$ cp /share/apps/libraries/nag/nll6i27dbl/f_examples/source/a00adfe.f90 ./
${NAGLIB_F77} ${NAGLIB_FFLAGS} ${NAGLIB_INCLUDE} a00adfe.f90 ${NAGLIB_LINK}
$ ./a.out
A00ADF Example Program Results
*** Start of NAG Library implementation details ***
Implementation title: Linux, 64-bit, GNU C or GNU Fortran
Precision: Fortran double precision
Product Code: NLL6I27DGL
Mark: 27.0
Vendor Library: MKL 2019.0.3
Applicable to:
hardware: x86_64
operating system: Linux 4.18.12-200.fc28.x86_64
Fortran compiler: GNU Fortran (GCC) 8.1.1 20180712 (Red Hat 8.1.1-5)
and compatible systems.
Licence query: Successful
*** End of NAG Library implementation details ***
This program was run on the following date:
20200810-15:04:05:489
*** ----------------------------------------- ***
[qx901702@racc-login-0-1 tmp]$ module load gcc/6.4.0
[qx901702@racc-login-0-1 tmp]$ module load nag/fll6i26dfl-gfortran
[qx901702@racc-login-0-1 tmp]$ cp /share/apps/libraries/nag/fll6i26dfl/examples/source/a00adfe.f90 ./
[qx901702@racc-login-0-1 tmp]$ gfortran a00adfe.f90
[qx901702@racc-login-0-1 tmp]$ ./a.out
A00ADF Example Program Results
*** Start of NAG Library implementation details ***
Implementation title: Linux, 64-bit, GNU Fortran (32-bit integers)
Precision: Fortran double precision
Product Code: FLL6I26DFL
Mark: 26.0
Vendor Library: None
Applicable to:
hardware: x86_64
operating system: Linux 4.4.14-200.fc22.x86_64
Fortran compiler: GNU Fortran (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
and compatible systems.
Licence query: Successful
*** End of NAG Library implementation details ***
This program was run on the following date:
20190702-16:16:18:584
*** ----------------------------------------- ***
[qx901702@racc-login-0-4 tmp]$ module load intel/2018.2.199
[qx901702@racc-login-0-4 tmp]$ module load nag/fll6i26dcl-ifort
[qx901702@racc-login-0-4 tmp]$ cp /share/apps/libraries/nag/fll6i26dcl/examples/source/a00adfe.f90 ./
[qx901702@racc-login-0-4 tmp]$ ifort a00adfe.f90 -o a00adfe.exe
[qx901702@racc-login-0-4 tmp]$ ./a00adfe.exe
A00ADF Example Program Results
*** Start of NAG Library implementation details ***
Implementation title: Linux, 64-bit, Intel Fortran (32-bit integers)
Precision: Fortran double precision
Product Code: FLL6I26DCL
Mark: 26.0
Vendor Library: None
Applicable to:
hardware: x86_64
operating system: Linux 2.6.27.41-170.2.117.fc10.x86_64
Fortran compiler: Intel ifort Version 16.0.3.210 20160415
and compatible systems.
Licence query: Successful
*** End of NAG Library implementation details ***
This program was run on the following date:
20190702-16:24:15:442
*** ----------------------------------------- ***
[qx901702@racc-login-0-4 tmp]$ alias ifort
alias ifort='ifort -I/share/apps/libraries/nag/fll6i26dcl/nag_interface_blocks -L/share/apps/libraries/nag/fll6i26dcl/lib -lnag_nag'
[qx901702@racc-login-0-4 tmp]$ cp /share/apps/libraries/nag/cll6i262cl/examples/source/a00adce.c ./
[qx901702@racc-login-0-4 tmp]$ module load gcc/7.3.0
[qx901702@racc-login-0-4 tmp]$ module load nag/cll6i262cl-gcc
[qx901702@racc-login-0-4 tmp]$ gcc a00adce.c
[qx901702@racc-login-0-4 tmp]$ ./a.out
nag_implementation_separated_details (a00adc) Example Program Results
*** Start of NAG C library implementation details ***
Implementation title: Linux, 64-bit, Intel C/C++ (32-bit integers)
Precision: double
Product Code: CLL6I262CL
Mark: 26.2
Vendor library: None
Applicable to:
hardware: x86_64
operating system: Linux 2.6.32-696.6.3.el6.x86_64
C compiler: Intel icc Version 18.0.1.163 20171018
Fortran compiler: Intel ifort Version 18.0.1.163 20171018
and compatible systems.
Licence query: Successful
*** End of NAG C Library implementation details ***
This program was run on the following date:
Wed Jul 3 17:55:12 2019
[qx901702@racc-login-0-4 tmp]$ cp /share/apps/libraries/nag/cll6i261dl/examples/source/a00adce.c ./
[qx901702@racc-login-0-4 tmp]$ module load gcc/7.3.0
[qx901702@racc-login-0-4 tmp]$ module load nag/cll6i262dl-gcc
[qx901702@racc-login-0-4 tmp]$ gcc a00adce.c
[qx901702@racc-login-0-4 tmp]$ ./a.out
nag_implementation_separated_details (a00adc) Example Program Results
*** Start of NAG C library implementation details ***
Implementation title: Linux, 64-bit, Intel C/C++ (64-bit integers)
Precision: double
Product Code: CLL6I262DL
Mark: 26.2
Vendor library: None
Applicable to:
hardware: x86_64
operating system: Linux 2.6.32-696.6.3.el6.x86_64
C compiler: Intel icc Version 18.0.1.163 20171018
Fortran compiler: Intel ifort Version 18.0.1.163 20171018
and compatible systems.
Licence query: Successful
*** End of NAG C Library implementation details ***
This program was run on the following date:
Wed Jul 3 18:17:51 2019
[qx901702@racc-login-0-4 tmp]$ cp /share/apps/libraries/nag/fnlux04del/examples/source/nag_lib_support_ex01.f90 ./
[qx901702@racc-login-0-4 tmp]$ source /share/apps/compilers/intel/18.0.2.199/bin/compilervars.sh -arch ia32 -platform linux
[qx901702@racc-login-0-4 tmp]$ module load nag/fnlux04del
[qx901702@racc-login-0-4 tmp]$ ifort -lnagfl90_nag nag_lib_support_ex01.f90
[qx901702@racc-login-0-4 tmp]$ ./a.out
*** Start of NAG Fortran 90 Library implementation details ***
Implementation title: IA32, Linux, Intel Fortran
Product Code: FNLUX04DE
Release: 4A
Precision: double (KIND= 8)
*** End of NAG Fortran 90 Library implementation details ***
[qx901702@racc-login-0-4 tmp]$ cp /share/apps/libraries/nag/fnlux04del/examples/source/nag_lib_support_ex01.f90 ./
[qx901702@racc-login-0-4 tmp]$ module load solstudio/12.6
[qx901702@racc-login-0-4 tmp]$ module load nag/fnl6a04ddl
[qx901702@racc-login-0-4 tmp]$ sunf90 nag_lib_support_ex01.f90
[qx901702@racc-login-0-4 tmp]$ ./a.out
*** Start of NAG Fortran 90 Library implementation details ***
Implementation title: AMD64/EM64T, Linux 64, SUN Fortran
Product Code: FNL6A04DD
Release: 4A
Precision: double (KIND= 8)
*** End of NAG Fortran 90 Library implementation details ***
[qx901702@racc-login-0-4 tmp]$ alias sunf90
alias sunf90='sunf90 -I/share/apps/libraries/nag/fnl6a04ddl/nagfl90_modules -L/share/apps/libraries/nag/fnl6a04ddl/lib -lnagfl90_nag'