6. Using the Salford Fortran Compilers with the NAg Numerical Libraries
6.1. Introduction
A programme compiled by the Salford FTN90 compiler can link to both the
NAg F77 and NAg F90 libraries. Those compiled by the Salford FTN95 compiler
can be linked to the NAg F77 libaries, only --- not the NAg F90 libraries ---
and then only if libraries from the Salford FTN90 installation are available
to the compiler in addition to those from the FTN95 installation (see the
separate NAg documentation for details).
6.2. NAg F77 Libraries, Mark 19: NAGW32FL19D9
The (Mark 19) NAg F77 numerical library and associated files are located
within
This directory contains two different versions of the library:
Naglib.dll, for creating dynamically-linked programmes, and
Naglib.lib, for creating statically-linked programmes.
(Dynamically-linked programmes are smaller, but start more slowly than
statically-linked programmes. Statically-linked programmes are
"stand-alone", whereas, dynamically-linked programmes require the
"dll" file to be available at run-time.)
The procedure for each is briefly described below. For details see the
separate documentation on using the NAg numerical analysis libraries
available from the Helpdesk. In both static and dynamic cases below the
command FTN90 can be replaced by FTN95 --- but only if
libraries from the Salford FTN90 installation are available to the compiler
as mentioned above.
- static
-
for example
then
| SLINK
LOAD MY_NAG_PROG.OBJ
LOAD NAGLIB.LIB
FILE MY_NAG_PROG
|
The linker, SLINK, pulls together the object produced from
your source, MY_NAG_PROG.OBJ, and the NAg library, to
form an executable. You can now run the programme:
- dynamic
-
then
| SLINK
LOAD MY_NAG_PROG.OBJ
LOAD NAGLIB.DLL
FILE MY_NAG_PROG
|
Notice that this time we have LOADed NAGLIB.DLL.
6.3. NAg F90 Libraries, Release 3: NAGW32FN03D9
Linking to the Fortran 90 library is slightly more complicated than
linking to the Fortran 77 library because compilation of a
Fortran 90 module produces an auxiliary file, usually a
".MOD" file, which gives the linker information it can
use to make checks not possible with Fortran 77 (see above).
Note that below, the command FTN90 cannot be replaced by FTN95.
The (Release 3) NAg F90 numerical library and associated files are located
within
Again, there are two different versions of the library:
Naglib.dll, for creating dynamically-linked programmes, and
Naglib.lib, for creating statically-linked programmes.
Formally, to compile one's source file, MY_NAG_PROG2.F90, say, one
types
| FTN90 /MOD_PATH <modpath> <sourcefile>
|
For example
| FTN90 /MOD_PATH M:\NAGFN03D9\NAG_MOD_DIR MY_NAG_PROG2.F90
|
Then to link with the NAg library to produce an executable:
| SLINK
LOAD MY_NAG_PROG2.OBJ
LOAD M:\NAGFN03D\LIBNAGFL90.LIB
FILE MY_NAG_PROG2
|
For more, see the ISD documentation devoted to use of the NAg numerical
libraries.
About this document:
Produced from the SGML: /home/isd/public_html/_salford/_reml_grp/salford_compilers.reml
On: 25/7/2002 at 9:59:15
Options: reml2 -i noindex -l long -o html -p multiple