Using the IMSL Fortran F90 Libraries on Strauss and Mahler
Setting Up the Working Environment
To use the IMSL Fortran 90 libraries, you must set several UNIX environment variables. These settings may adversely interact with settings needed for other UNIX
applications. The instructions below provide a strategy for
avoiding these interactions.
Start a new shell before you use
the IMSL Libraries, modify the environment, run the programs, and exit the
shell before working with other software. You can start a new shell either
by opening a new window on an X terminal or by issuing the UNIX csh command.
These instructions assume that you are using
the C shell (csh), which is the default for University of Delaware users.
- Start a new C shell by typing at the C shell prompt (%)
csh
or by opening a new window on an X terminal
by typing at the C shell prompt (%)
xterm &
The latter method will allow you to edit your program in one window and
compile and execute the program in the other window.
- Set the necessary environment variables for IMSL
by typing at the C shell prompt (%),
source /opt/lib/imsl_toolkit_1.1/CTT1.1/ctt/bin/cttsetup.csh
-
Proceed to the compilation and execution steps
for your program.
Important warning: These instructions may redefine values
of environment variables you previously defined in your dotfiles (e.g.,
".localenv" file). The most likely variables to have been changed are
FC and F90FLAGS. If these variables are not present in your dotfiles,
then there will not be a problem. However, if you need to preserve your standard settings
for these variables when using IMSL, you must explicitly type
your modifications after following the above instructions.
For example, if you have F90FLAGS set to the option "-g", and you wish to
retain this option for compilation, then after setting the necessary environment
variables for IMSL via the cttsetup command, you will need to issue the
command
setenv F90FLAGS "${F90FLAGS} -g"
If you
need help or clarification, send e-mail to consult@udel.edu.
Compiling and Executing a Fortran 90 Program
Having set up your working environment,
you can now compile and execute your Fortran program. When you're done
using the IMSL libraries, you should exit the current shell
(or close the current window), thereby returning to your previous working
environment.
Fortran f90 Example Program
An example program, fast_2dft_ex1.f90, is stored in the directory /opt/lib/imsl_toolkit_1.1/CTT1.1/examples/solaris/f90/manual/.
The procedures above are illustrated next using this example program.
Defining Aliases
You may want to define aliases for the cttsetup command and compilation
command to save typing. The following two aliases can be defined in your
.localalias initialization file.
alias cttsetup77 'source /opt/lib/imsl_toolkit_1.1/CTT1.1/ctt/bin/cttsetup.csh'
alias f90imsl '/opt/workshop4/SUNWspro/SC4.2/bin/f90 \!* -o \!$:r $LINK_F90 $F90FLAGS '
With these aliases set, the above example would be compiled and executed as follows.
cttsetup
f90imsl fast_2dft_ex1.f90
fast_2dft_ex1
Note: The f90imsl alias will not work if the input file is in a directory for which you do not have write privileges. This example assumes that the file, fnl.f, was copied from directory /opt/lib/imsl_toolkit_1.1/CTT1.1/examples/solaris/f90/manual.
Notes
- The current version of the IMSL library is not compatible with the latest WorkShop 5 version of Fortran 90.
Consequently, the earlier WorkShop 4 version of Fortran 90 must be used. This will be remedied in a future release
of IMSL.
- The WorkShop 4 version of Fortran 90 can also be used for Fortran 77 programs calling the IMSL library. However,
the disadvantage is that the latest version of Fortran (under WorkShop 5) is not used.
[Help Center]
Last modified: Sept 7, 1999.
This page maintained by
Jack Seltzer.
Copyright © University of Delaware 1999.
URL of this document:
http://www.udel.edu/topics/software/???????