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
Assuming that a link to libnagmpi.a and libnagmpiblas.a has been placed in a directory in the search path of the linker, and the same applies to the MPICH2 libraries, then you may link to the NAG Parallel Library (using the supplied NAG Basic Linear Algebra Subprograms (BLAS) library) as follows:
g77 driver.f -lnagmpi -lnagmpiblas -lnagmpi -lpmpich -lmpichwhere driver.f is your application program. If the ATLAS BLAS library is available, then you may link to the NAG Parallel Library as follows:
g77 driver.f -lnagmpi -lf77blas -latlas -lpmpich -lmpich /usr/lib/gcc/darwin/3.3/libgcc.aThe above works for g77 3.4.4 on Panther and Tiger (10.3.x and 10.4.x) versions and the invocation of libgcc.a is meant to satisfy the need of the ATLAS libraries for GCC runtime symbols restFP and saveFP. It might not be necessary depending on how the ATLAS BLAS were compiled.
If the driver is a C program, then you must link in the g77 3.4.4 runtime library libg2c.a explicitly whenever you reference the NAG Parallel Library, like this:
gcc -I/path/to/fdamp03dg/include driver.c -lnagmpi -lnagmpiblas -lnagmpi -lpmpich -lmpich -lg2c xlc -I/path/to/fdamp03dg/include driver.c -lnagmpi -lnagmpiblas -lnagmpi -lpmpich -lmpich -lg2cThe location of the libg2c.a library will depend on where and how the g77 3.4.4 compiler is installed, so -lg2c could be replaced by /path/to/libg2c.a. Try g77 -print-file-name=libg2c.a to let the installed compiler tell you where the runtime library is.
mpirun -np 4 a.outinstructs the system to execute the executable program a.out in four parallel processes. Consult local documentation for full details of the facilities of mpirun or alternatives to it.
The example programs are most easily accessed by using the scripts nagmpiexample or nagmpicexample, 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 f04ebfpto run the F04EBFP Fortran example program. This will place the results in the file f04ebfpe.r.
For example, give the command
nagmpicexample d01atfpto run the D01ATFP C example program. This will place the results in the file d01atfpe.r.
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-308Parameters of other aspects of the computing environment
X02AHF = 8.11296384146067D+31 X02BBF = 2147483647 X02BEF = 15 X02DAF = .FALSE.
On-line documentation is provided, in PDF form, with this implementation. Please refer to local information for access to this documentation
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 please quote your NAG site reference and NAG product code (in this case FDAMP03DG).
The NAG websites are an information service providing items of interest to users and prospective users of NAG products and services. The information is reviewed and updated regularly and includes implementation availability, descriptions of products, downloadable software, product documentation and technical reports. The NAG websites can be accessed at
http://www.nag.com/ (in North America)
http://www.nag-j.co.jp/ (in Japan)
NAG Ltd Wilkinson House Jordan Hill Road OXFORD OX2 8DR NAG Ltd Response Centre United Kingdom email: firstname.lastname@example.org Tel: +44 (0)1865 511245 Tel: +44 (0)1865 311744 Fax: +44 (0)1865 310139 Fax: +44 (0)1865 310139 NAG Inc 1431 Opus Place, Suite 220 Downers Grove IL 60515-1362 NAG Inc Response Center USA email: email@example.com Tel: +1 630 971 2337 Tel: +1 630 971 2345 Fax: +1 630 971 2706 Fax: +1 630 971 2706 Nihon NAG KK Hatchobori Frontier Building 2F 4-9-9 Hatchobori Chuo-ku Tokyo 104-0032 Japan email: firstname.lastname@example.org Tel: +81 (0)3 5542 6311 Fax: +81 (0)3 5542 6312