NAG Toolbox for MATLAB


x86-64 Linux

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 Toolbox for MATLAB.

Your attention is drawn to the terms and conditions of the Software License Agreement 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 Toolbox for MATLAB that is considered suitable for use on the computer systems detailed below:

hardware:             x86-64 systems and compatible (e.g. AMD64 and EM64T)
operating system:     Linux 64 Linux 2.6.5-1 and compatible
MATLAB Version:       7.4 (R2007a), 7.5 (R2007b), 7.6 (R2008a)
To use the toolbox, a licence for Mark 21 of the NAG Fortran Library must be installed and available. This product is compatible with the following products without any further configuration.
AMD64/EM64T, Linux 64, NAGWare f95 Compiler, ACML
AMD64/EM64T, Linux 64, gfortran compiler, ACML
AMD64/EM64T, Linux 64, GNU g77 compiler, ACML
AMD64/EM64T, Linux 64, PGI Fortran compiler, ACML
AMD64/EM64T, Linux 64, PathScale Fortran compiler, ACML
EM64T/AMD64, Linux 64, NAGWare f95 Compiler, MKL
EM64T/AMD64, Linux 64, Intel Fortran compiler, MKL
EM64T/AMD64, Linux 64, gfortran compiler, MKL
EM64T/AMD64, Linux 64, GNU g77 compiler, MKL

The user needs to have MATLAB installed. This implementation may work with later versions of MATLAB than 7.6 (R2008a).

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

By default, MBL6A21DG is installed in the users' MATLAB installation. The help files will be placed in the directory help/toolbox/NAG while the executable files will be placed in toolbox/NAG/mex.a64.

If the user chooses to have their MATLAB path updated during installation, the file toolbox/local/pathdef.m will be modified. If the user installs the toolbox under /MyMatlab then this file will have the lines:

     '/MyMatlab/toolbox/NAG/mex.a64:' ...
     '/MyMatlab/help/toolbox/NAG:' ...
inserted. If the user chooses not to have their path modified then there are a number of ways in which this may be done by hand. Search for "matlab path" in the MATLAB online help system for one method, and for pointers to several others. If updating by hand then it is essential to ensure that the directory containing the help files appears after that containing the executable files. For example, if the user installs the toolbox under /MyMatlab then their MATLAB path should contain the directories: in that order.

If the user chooses to modify their MATLAB script during installation then the file bin/matlab in the MATLAB distribution will have the lines:

  # Inserted during installation of NAG Toolbox for 64 bit Linux
added to it. If the user decides to modify their LD_LIBRARY_PATH by hand then a good approach is to edit the definition of LDPATH_PREFIX in the .matlab7rc file. The main reason that this is not the approach taken by the installation script is that MATLAB allows a user to over-ride the system-wide version with their own version(s) and so it is not possible reliably to install the toolbox for all users this way. The MATLAB documentation contains more information about the use of the .matlab7rc file.

3.2. File Sizes

The approximate files sizes are given below
Help material    18Mb
Toolbox files    17Mb

4. Installation

If you downloaded this product from NAG as a compressed tar file then you should unpack it as follows. Create a temporary directory and unpack the file mbl6a21dg.tgz into it, for example using the commands:
mkdir nagtmp
cd nagtmp
tar -xzf ../mbl6a21dg.tgz
If you received the product on CD then simply insert it in your CD drive and, if necessary, mount the CD device (normally this will happen automatically).

Run the INSTALL script by typing "sh INSTALL". This will prompt you for the location in which you wish to install the product, which typically should be under your existing MATLAB installation. It is possible to install the product elsewhere but if you do so you will need to update your MATLAB path manually, as described in Section 3.1.

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

If you have installed the help material, then on starting the MATLAB Help browser you should see the entry NAG Toolbox in the Contents list.

A quick test that the software has been correctly installed is to type s07aa(0) at the MATLAB prompt to calculate tan(0). This should return the answer 0.

To uninstall the software run the script UNINSTALL.a64 which is created during installation and can be found in the directory toolbox/NAG, using the command


4.1. License Management

This product uses the Kusari license management system (version 2.1.9). Users with a compatible version of the NAG Fortran Library installed will not need to install a new license. Users who have yet to install a version of the Library are advised to so, in the course of which they will usually obtain and install a Kusari license key. For further information please consult the Installer's Note distributed with your NAG Fortran Library.

Once you have obtained the license key, store the text of it in a file, for example license.lic. For an uncounted license, the location of the license file must be made known to MATLAB by setting the environment variable NAG_KUSARI_FILE to the full pathname of the file before MATLAB is invoked. In what follows we will represent that full pathname as [INSTALL_DIR]/license.lic.

For example, in the C-shell, type:

   setenv NAG_KUSARI_FILE [INSTALL_DIR]/license.lic
or in the Bourne shell, type:

No other actions are required to install an uncounted license.

Further details about Kusari and how it may be configured to suit your local circumstances are included in the Kusari Licence Management User Guide.

5. Documentation

On-line documentation, accessible via the standard MATLAB help facilities, is bundled with this implementation. Please see Section 4.

6. Support from NAG

NAG will provide free support for this product for a period of 90 days from the date of purchase. Beyond that period, support will continue to be provided for users who have a current support agreement for the underlying NAG Fortran Library implementation.

(a) 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 MBL6A21DG).

(b) 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

(c) 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

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

801 Warrenville Road
Suite 185
Lisle, IL  60532-4332                   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