NAG Fortran Library, Mark 21

FLW3221DDL - License Managed

Windows NT/2000/XP, Compaq Visual Fortran

Installer's Note


1. Introduction

This Installer's Note is essential reading for whoever is responsible for the installation of this implementation of the NAG Fortran Library. It is available together with the Users' Note (un.html) on the distribution medium.

Your attention is drawn to the terms and conditions of the Software License Agreement (in file lic_agr.txt, see Section 3.1) regarding the use of NAG software. Any request to use this software other than on the licensed computer must be referred to NAG, as should requests for information about the availability of other implementations.

2. Implementation Provided

2.1. Applicability

This implementation is a compiled, tested, ready-to-use version of the NAG Fortran Library that is considered suitable for operation on the computer systems detailed below:

hardware:          32-bit Intel systems and compatible
operating system:  Windows NT/2000/XP
Fortran compiler:  Compaq Visual Fortran version 6.6 and compatible

2.2. Derivation

This implementation was produced at NAG Ltd., Oxford on the computing system detailed below:
hardware:          Intel Pentium 4
operating system:  MS Windows XP Professional
Fortran compiler:  Compaq Visual Fortran Optimizing Compiler Version 6.6 (Update A)
Compiler options:  /libs:static
Utilities:         Intel MKL Library, version 8.0
                   (the libraries needed are supplied)

The entire NAG Fortran Library, Mark 21, was compiled with full optimization /optimize:5, except for the following source files which were compiled with lower optimization flags /optimize:4:
  d02nmwn.f   d03rzxn.f   e02ahzn.f

This library has been tested using the Basic Linear Algebra Subprograms (BLAS) and linear algebra routines (LAPACK) provided by NAG (see the Chapter Introductions for F06, F07 and F08 in the NAG Fortran Library Manual).

The library has been also tested with MKL version 8.0. The MKL version 8.0 libraries are being supplied as a part of this product (see contents).

3. Distribution Medium

The software is ordinarily distributed on CD-ROM, it can also be downloaded from any of the NAG Web sites (see NAG Websites).

3.1. Contents

The following shows the folder/file organization of the implementation materials as they will be installed.
                    |- in.html  (Installer's Note, (this document))
            |- doc -|- un.html  (Users' Note)
            |       |- lic_agr.txt
            |       |- nag_nag.lib  (self-contained library
            |- lib -|                including NAG BLAS/LAPACK)
            |       |- nag_mkl.lib  (static library requiring
            |                        vendor BLAS/LAPACK)
flw3221ddl -|
            |- nag_interface_blocks -|- *
            |            |- source --|- ??????e.f
            |- examples -|- data ----|- ??????e.d
            |            |- results -|- ??????e.r
            |         |- nag_example.bat
            |- batch -|- nag_example_mkl.bat
            |         |- envvars.bat
            |- MKL_ia32_8.0 -|- lib -|- *.lib
            |           |- bin -|- * (directories of binaries
            |           |             for supported platforms)
            |- license -|- README.TXT
                        |- doc -|- * (End User Guide)
  nag_nag.lib is a compiled library including NAG BLAS/LAPACK
  nag_mkl.lib is a compiled library without NAG BLAS/LAPACK (MKL must be used with this library)

nag_mkl.lib does not contain the NAG version of Basic Linear Algebra Subprograms (BLAS) nor the linear algebra functions (LAPACK). It has been tested with the BLAS/LAPACK provided by the Intel Math Kernel Library 8.0 for Windows (MKL) which is included in this product. Please see the Intel web site for further information about MKL (

By default, flw3221ddl is installed beneath the folder C:\Program Files\NAG\FL21\.

The following shows the folder/file organization of the Library documentation materials as they will be installed. By default, manual is installed beneath the folder C:\Program Files\NAG\FL21\.

 manual -|- examples -|- baseresults -|- ??????*.r
         |            |- source      -|- ??????*.f
         |            |- data        -|- ??????*.d
         |- html -|- mark21.html                (main HTML index)
         |        |
         |        |- [A00-X05] -|- *conts.html  (chapter contents)
         |        |
         |        |- frontmatter -|- *.html     (foreword & copyright)
         |        |
         |        |- genint -|- *.html  (general introductory material
         |        |                      and online help document)
         |        |
         |        |- indexes -|- gams -|- fl_gams.html  (GAMS index)
         |        |           |        |- *.html        (GAMS files)
         |        |           |
         |        |           |- kwic -|- fl_kwic.html  (KWIC index)
         |        |                    |- *.html        (KWIC files)
         |        |
         |        |- styles -|- libdoc.css      (main CSS stylesheet)
         |- pdf -|- frontmatter -|- mark21.pdf  (NAG copyright and main
                 |               |               pdf page)
                 |               |- foreword.pdf 
                 |- [A00-X05] -|- *conts.pdf    (chapter contents)
                 |             |- *intro.pdf    (chapter introduction)
                 |             |- *f.pdf        (routine documents)
                 |- genint -|- *.pdf  (general introductory material
                 |                     and online help document)
                 |- indexes -|- *.pdf (bookmarked file containing links
                 |                     to fl_kwic.html and fl_gams.html)
                 |- INUNs -|- *.pdf   (implementation specific note)

3.2. File Sizes

The files sizes are given below. The actual disk space used is dependent on the hard disk allocation unit (cluster) size (this information is supplied by the DOS command CHKDSK):
compiled libraries:
  nag_nag.lib                 23.6 Mb
  nag_mkl.lib                 23.1 Mb
interface blocks:              3.8 Mb
example program material:     14.4 Mb
batch files:                  12.0 Kb
library documentation files:  52.0 Kb
manual documentation files:  213.0 Mb
MKL for ia32 (version 8.0)
      (lib folder, 4 files):  35.6 Mb
licensing materials            1.5 Mb

4. Installation

4.1. Library and Documentation Installation

4.1.1. Library Installation

You must have Administrator privileges to install this software.

If you have the Library materials on CD, insert the CD into your CD drive to display the NAG CD browser. Click on the Install ... button and follow the instructions to install the Library and/or the manual. If the CD does not autorun, run

  e:\Demo32 Fortran_Library_Browser.dbd
to run the browser, or run e:\setup.exe to run the Library installation directly, where e is the drive letter for your CD drive.

If you have downloaded the Library materials from our website, run the self-extracting executable to start the Library installation. The Library manual materials are available as a separate download.

After installation, you should ensure that the software described in Section 3.1 is present and accessible.

If your machine has more than one processor, then it is recommended that you set the environment variable OMP_NUM_THREADS to the number of available processors, e.g.

This will enable the Intel MKL BLAS to make use of the extra processor(s) and will thus speed up the computation of many of the Library procedures.

The installation procedure will create a shortcut which starts a Command Prompt with the required local environment variables. The default location of this shortcut is in the Start Menu under

Start|Programs|NAG|FL21|NAG Fortran Library -
    Compaq Visual Fortran compiler. Command Prompt

The local environment variable NAG_FLW3221DDL is needed by the batch files nag_example.bat and nag_example_mkl.bat (see Section 3.2 of the Users' Note (un.html)).

This software is provided with an uninstallation facility via Control Panel|Add/Remove programs.

Alternatively you could run the setup program again and select the Remove option.

4.1.2. PDF Documentation Installation

It is not necessary to install the Library manual. Users may access it directly on the distribution CD, or it may be installed on a different workstation or server, or viewed from the NAG website (

If you have the Library materials on CD, insert the CD into your CD drive to display the NAG CD browser. Click on the Install ... button and follow the instructions to install the Library and/or the manual. If the CD does not autorun, run

  e:\Demo32 Fortran_Library_Browser.dbd
to run the browser, or run e:\setup_manual.exe to run the Library manual installation directly, where e is the drive letter for your CD drive.

If you have downloaded the Library manual materials from our website, run the self-extracting executable to start the Library manual installation.

You may wish to move the PDF documentation files to the same location as that for other NAG products. You are encouraged to make them readily available to users, but in such a way that they are not generally accessible from outside your site.

Free copies of Adobe Acrobat Reader can be downloaded from Please check this site for availability of a reader for your platform.

Please note that if you are using Adobe Acrobat 4.0 or earlier you might experience some problems when printing documents that contain mathematical characters, such as integral signs, square roots and large brackets. These characters will print correctly using Adobe Acrobat 5.0.

The HTML form of the Essential Introduction contains some mathematical characters that are displayed as question marks by releases of Netscape earlier than 6, but these are displayed correctly by Netscape 6 and Internet Explorer. They may also be viewed via the PDF.

If using Netscape, it might be necessary to re-install Acrobat to ensure that the Acrobat plug-in has been installed. If the plug-in has not been installed, Netscape may copy PDF files to a temporary folder, and then not be able to navigate from there.

4.1.3. License Management

The use of the NAG Fortran Library is controlled by the Kusari license management system. This release of the NAG Fortran Library uses version 2.1 of Kusari.

In order to enable the software, NAG will issue you with a license key. The license key is contained in a text file consisting of details of the software that will be enabled.

To request a license key, run the program khostid located in the license\bin\w32\ subdirectory of the software distribution. This utility must be run from a command prompt. Return the information that it displays, together with the product code (in this case FLW3221DDL), by e-mail (or FAX) to NAG. Alternatively, direct the output from this utility to a file and send both the file and the product code to NAG.

A short term (demonstration or trial) license key contains one or more lines like the following:

  FLW3221DDL TRIAL 2006/11/12 "EMnxidA3oeoj0F1Yvi5ibxPjB7"
Specifically, it has a line containing the word TRIAL. Longer term license keys must be locked to a specific computer, i.e. they will enable the software on one computer only. These license keys include the word NODE instead of the word TRIAL above.

Once you have obtained one of the above license keys, store the text of it in a file, say

The location of the license file must be made known to the NAG application by setting the environment variable NAG_KUSARI_FILE to the full pathname of the file before the application is invoked.

The environment variable may be set as follows:

  1. Open System in the Control Panel (this may be under the performance and maintenance category).
  2. On the Advanced tab, click Environment Variables, click New, insert NAG_KUSARI_FILE as the variable name and the name of the license file, e.g.
      c:\Program Files\NAG\FL21\flw3221ddl\license.lic
    as the value.

Further details about Kusari and how it may be configured to suit your local circumstances are included in the Kusari License Management documentation in the license/doc/ subdirectory of the software distribution.

4.2. Release to Users

The Users' Note (doc/un.html) should be checked and amended as necessary (particularly Sections 3.1, 3.2 and 5). Advice on accessing the library (see Users' Note, Section 3.1) can be checked by running a few example programs following that advice; a suitable sample would be D01AUF, E04UCA and F07ADF. The installation can also be tested using the batch files nag_example* (see Users' Note, Section 3.2). The Users' Note (doc/un.html) should then be made available to users directly, or be absorbed into local access information.

The following material should also be made accessible to users:

documentation files:

The FL21\manual folder contains the online documentation. This should be made available to users, in addition to the following:

compiled libraries:

module information files:
example program material:

Note that the example material has been adapted, if necessary, from that published in the NAG Fortran Library Manual, so that programs are suitable for execution with this implementation with no further changes (but see Section 4.3.1 for comments about possible differences in results obtained). Making the example material directly available to users provides them with easily adaptable templates for their own problems.

4.3. Further Information

For best performance, we recommend that you should use the variant of the NAG Fortran Library which is based on the supplied MKL library i.e. nag_mkl.lib. However if you use a version of the MKL library different from the version used in creating this implementation and you have problems when calling a NAG routine, we suggest that you use nag_mkl.lib with the supplied MKL or the self-contained library nag_nag.lib.

4.3.1. Example Programs

The example results distributed were generated at Mark 21, using the software described in Section 2.2. These example results may not be exactly reproducible if the example programs are run in a slightly different environment (for example, a different Fortran compiler, a different compiler library, or a different set of BLAS or LAPACK routines). The results which are most sensitive to such differences are: eigenvectors (which may differ by a scalar multiple, often -1, but sometimes complex); numbers of iterations and function evaluations; and residuals and other "small" quantities of the same order as the machine precision.

The installer should ensure that the advice given to users in Section 3.1 of the Users' Note (un.html) is suitable for the installation. This can be done by running a few example programs following that advice. The installation can also be tested using the batch files nag_example*.bat.

4.3.2. Maintenance Level

The maintenance level of the Library can be determined by compiling and executing the example that calls A00AAF, or you could call the batch file nag_example with the argument a00aaf. See Users' Note, Example Programs . This example prints out details of the implementation, including title and product code, compiler and precision used, mark and maintenance level.

5. Documentation

On-line documentation is bundled with this implementation. Please see Section 4.

6. Support from NAG

(a) Contact with NAG

Queries concerning this document or the implementation generally should be directed initially to your local Advisory Service. If you have difficulty in making contact locally, you can contact NAG directly at one of the addresses given in the Appendix. Users subscribing to the support service are encouraged to contact one of the NAG Response Centres (see below).

(b) NAG Response Centres

The NAG Response Centres are available for general enquiries from all users and also for technical queries from sites with an annually licensed product or support service.

The Response Centres are open during office hours, but contact is possible by fax, email and phone (answering machine) at all times.

When contacting a Response Centre, it helps us deal with your enquiry quickly if you can quote your NAG site reference and NAG product code (in this case FLW3221DDL).

(c) NAG Websites

The NAG websites provide information about implementation availability, descriptions of products, downloadable software, product documentation and technical reports. The NAG websites can be accessed at the following URLs:, or

(d) NAG Electronic Newsletter

If you would like to be kept up to date with news from NAG then please register to receive our free electronic newsletter, which will alert you to special offers, announcements about new products or product/service enhancements, customer stories and NAG's event diary. You can register via one of our websites, or by contacting us at

(e) Product Registration

To ensure that you receive information on updates and other relevant announcements, please register this product with us. For NAG Library products this may be accomplished by filling in the online registration form at

7. User Feedback

Many factors influence the way that NAG's products and services evolve, and your ideas are invaluable in helping us to ensure that we meet your needs. If you would like to contribute to this process, we would be delighted to receive your comments. Please contact any of the NAG Response Centres (shown below).

Appendix - Contact Addresses

Wilkinson House
Jordan Hill Road
OXFORD  OX2 8DR                         NAG Ltd Response Centre
United Kingdom                          email:

Tel: +44 (0)1865 511245                 Tel: +44 (0)1865 311744
Fax: +44 (0)1865 310139                 Fax: +44 (0)1865 310139

1431 Opus Place, Suite 220
Downers Grove
IL 60515-1362                           NAG Inc Response Center
USA                                     email:

Tel: +1 630 971 2337                    Tel: +1 630 971 2337
Fax: +1 630 971 2706                    Fax: +1 630 971 2706

Nihon NAG KK
Hatchobori Frontier Building 2F

Tel: +81 (0)3 5542 6311
Fax: +81 (0)3 5542 6312