NAG Parallel Library, Release 3


Sun UltraSPARC 64 bit, Solaris, Sun Fortran, Sun ClusterTools 7

Users' Note


1. Introduction

This document is essential reading for every user of the NAG Parallel Library implementation specified in the title. It provides implementation-specific detail that augments the information provided in the NAG Parallel Library Manual.

NAG recommends that users read the following minimum reference material before calling any library routine:

(a) Essential Introduction
(b) Chapter Introduction
(c) Routine Document
(d) Implementation-specific Users' Note

2. General Information

2.1. MPI

Parallel programs using the NAG Parallel Library require the Sun ClusterTools 7 implementation of MPI to be installed. MPI enables a group of workstations to behave as an independent distributed memory parallel computer. A crucial component of Sun ClusterTools 7 is the mpirun(1) command, which can be used to run parallel programs on multiple workstations. The command mpif77(1) is provided by Sun ClusterTools 7 as a customisable compiler driver.

2.2. Accessing the Library

First check that you are set up to use Sun ClusterTools 7 by invoking the ompi_info and mpif90 -V commands. This should report the version of ClusterTools and the version of the Fortran Compiler and confirm that you are not using some other implementation of MPI (such as LAM or MPICH).

> mpif90 -V
f95: Sun Fortran 95 8.2 2005/10/13
Usage: f95 [ options ] files.  Use 'f95 -flags' for details

Assuming that a link to, and has been placed in a directory in the search path of the linker, then you may link to the NAG Parallel Library as follows:

mpif90 -xarch=v9a driver.f -lnagmpi -lnagmpi_nag
or (if you want to use the Sun Performance Library for the BLAS instead, as is recommended)
mpif90 -xarch=v9a driver.f -lnagmpi -lnagmpi_spl -xlic_lib=sunperf
where driver.f is your application program. If you want to link in the NAG Libraries statically:
mpif90 -xarch=v9a driver.f -Bstatic -lnagmpi -lnagmpi_spl -Bdynamic -xlic_lib=sunperf

2.3. Running NAG Parallel Library Programs

The mpirun command, provided by Sun ClusterTools 7, must be used to run a user program (say a.out) linked with the NAG Parallel Library on multiple nodes. For example
mpirun -np 4 a.out
instructs the system to execute the executable program a.out in four parallel processes. Consult local documentation for full details of the facilities of mpirun. If the executable uses shared libraries that are not on the linker's default path, make sure that LD_LIBRARY_PATH is set in your shell startup file to point to where the shared libraries are.

2.4. Example Programs

The example programs and data and the results obtained during the preparation of this specific implementation are supplied so you can try them yourself, or use one as a template for your own program. Note that the example material has been adapted, if necessary, from that printed in the NAG Parallel Library Manual, so that programs are suitable for execution with this implementation.

The example programs are most easily accessed by using the script nagmpiexample, which will copy an example program and its data, compile it, link it with the libraries and run it.

For example, give the command

nagmpiexample f04ebfp

to run the F04EBFP example program.

2.5. On-line User Documentation

The following machine-readable information files are provided in the doc directory:

3. Routine-specific Information

(a) X02

The constants referred to in the NAG Parallel Library Manual have the following values in this implementation:

The values of the machine constants are:

The basic parameters of the model

X02BHF =     2
X02BJF =    53
X02BKF =  -1021
X02BLF =  1024
X02DJF =  .TRUE.
Derived parameters of the floating-point arithmetic
X02AJF = 1.11022302462516D-16
X02AKF = 2.22507385850721D-308
X02ALF = 1.79769313486231D+308
X02AMF = 2.22507385850721D-308
X02ANF = 2.22507385850721D-308
Parameters of other aspects of the computing environment
X02AHF = 1.42724769270596D+45
X02BBF = 2147483647
X02BEF = 15

4. Documentation

On-line documentation is provided, in PDF form, with this implementation. Please refer to local information for access to this documentation.

5. 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 FDSO603DM).

(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

6. User Feedback

Many factors influence the way that NAG's products and services evolve, and yourideas 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