NAG Fortran Library

Module NAG/fll6i21dcl need be loaded before using NAG library. It sets runtime library path and the location of license.

To use the NAG Fortran Library and the supplied MKL libraries, you may link in the following manner:

  ifort driver.f -L/usr/local/Cluster-Apps/NAG/fll6i21dcl/lib -lnag_mkl -lmkl_lapack64 -lmkl_def -lguide -lpthread

To use the static library libnag_mkl.a you need the -Bstatic compiler flag to switch static binding on and -Bdynamic to switch dynamic binding on:

  ifort -Bstatic driver.f -L/usr/local/Cluster-Apps/NAG/fll6i21dcl/lib -lnag_mkl -lmkl_lapack -lmkl_em64t -lguide -Bdynamic -lpthread

However if you have problems when calling a NAG routine using libnag_mkl.a or libnag_mkl.so as described above, we suggest that you use the self-contained libraries as follows:

  ifort driver.f -L/usr/local/Cluster-Apps/NAG/fll6i21dcl/lib -lnag_nag

This will usually link to the shareable library in preference to the static library if both the libraries are at the same location.

To use the static library libnag_nag.a you need the -Bstatic compiler flag to switch static binding on and -Bdynamic to switch dynamic binding on:

  ifort -Bstatic driver.f -L/usr/local/Cluster-Apps/NAG/fll6i21dcl/lib -lnag_nag -Bdynamic

In this case the -Bdynamic is needed so that the compiler can use its shareable libraries which results in smaller executable codes.

For more detail, see NAG user documentation http://www.nag.co.uk/doc/inun/fl21/l6idcl/un.html

NAG Fortran Library (last edited 2007-09-07 11:09:21 by Yuan WAN)