Note: The following are general examples. There may be several versions
of the IMSL libraries present on the systems. It is generally best to use
the newest version. However, older versions are retained for
compatibility. Generic script names may not yet reference the most recent
release. For example on the IBM SP in /usr/local/bin there are the
following scripts:
> ls /usr/local/bin/imsl*
/usr/local/bin/imsl30.csh /usr/local/bin/imsl77.sh
/usr/local/bin/imsl30.ksh /usr/local/bin/imsl90.csh
/usr/local/bin/imsl3f90.csh /usr/local/bin/imsl90.sh
/usr/local/bin/imsl3f90.ksh /usr/local/bin/imslc.csh
/usr/local/bin/imsl4f90.csh /usr/local/bin/imslc.ksh
/usr/local/bin/imsl4f90.ksh /usr/local/bin/imslc25.csh
/usr/local/bin/imsl77.csh /usr/local/bin/imslc25.ksh
For Fortran 90 programs, imsl4f90 would be the best choice.
To compile F77 fixed-source code with the 4.01 F90 IMSL setup, make
sure to add "-qfixed" after $(IMSL4F90).
The International Mathematical and Statistical Library [IMSL]
for Fortran 90 has been installed on the STARRS/SP (IBM) and
SCAAMP (SGI) systems. The Fortran 77 versions remain available.
Before compiling, linking and running a Fortran program under IMSL,
several environment variables must be defined. These are different
for Fortran 77 and Fortran 90; you must reconfigure, if you decide
to use first one and then the other.
To define the environment variables, C shell users must give the
following command:
source /usr/local/bin/imsl77.csh #if you wish to use Fortran 77
or
source /usr/local/bin/imsl90.csh #if you wish to use Fortran 90
Bourne shell users must give the following command:
. /usr/local/bin/imsl77.sh #if you wish to use Fortran 77
or
. /usr/local/bin/imsl90.sh #if you wish to use Fortran 90
Note: to make this work on Lakshmi you must
first give the command:
sh
[you don't have to do this on Uma or the STARRS].
Compiling, Linking and Running
To compile and link a program using IMSL on the STARRS, enter:
xlf -o prog $IMSL prog.f #if you wish to use Fortran 77
or
xlf90 -o prog $IMSL prog.f #if you wish to use Fortran 90
Replace "prog.f" with the name of your Fortran command file. The compiled
and linked version of the program will be called "prog". The environment
variable $IMSL is defined in the files discussed above.
On the SCAAMP systems, to compile your program enter one of the following
commands, after setting the environment variables as discussed above:
f90 prog.f -o prog $F90FLAGS $LINK_F90
f77 prog.f -o prog $FFLAGS_MP $LINK_FNL_MP
For more information about IMSL, see the IU IMSL web page.
Back to programming languages page.
Linking with libraries and linker information