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. 

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