IMSL Libraries

IMSL 5.0 is a Fortran and C / C++ library with over 370 mathematical and statistical analysis functions. These functions are available for you to use in your applications.

Including the IMSL library in your applications is a three step process.

  1. Determine your unix shell.
  2. Update your current working environment.
  3. Compile your application with the IMSL library.

Determining your shell

The first step is to determine your unix shell. Open a terminal window and type the unix command shown below at your prompt. This command will report back to you the unix shell you are using. The output will be /sh/tcsh or /sh/bash or something similar.
echo $SHELL

Updating your environment

Now that you know your shell type the next step is to update your environment from the appropriate file.

/sh/tcsh users type the following unix command at your prompt.
source /usr/local/bin/cttsetup.csh

/sh/bash users type the unix command below instead.
source /usr/local/bin/cttsetup.sh

Once the appropriate above command is run you should be able to use the unix "env" command at your prompt and see some additional variables in your env list. If you view your environment you will notice variables such as CC, CFLAGS, LINK_CNL_STATIC and many other variable names as well. If you don't see these names then try running the appropriate "source" command again.

Compiling your application

You are now ready for the final step, linking the IMSL C library into your applications. The first example below links IMSL into the binary, the second example uses shared libraries instead:

$CC $CFLAGS -o cmath cmath.c $LINK_CNL_STATIC
$CC $CFLAGS -o cmath cmath.c $LINK_CNL_SHARED

For fortran, the variable names are different:


f77 $FFLAGS -o fmath fmath.f $LINK_FNL_STATIC
f77 $FFLAGS -o fmath fmath.f $LINK_FNL_SHARED
f90 $FFLAGS -o fmath fmath.f $LINK_F90_STATIC
f90 $FFLAGS -o fmath fmath.f $LINK_F90_SHARED

The important thing to note is that running the cttsetup script will establish an environment that will allow you to use shortcuts to make compiling with the IMSL functions easy.

More information

Use the links below for detailed information on the IMSL library functions.


Last modified: Wednesday, 20-Oct-2004 08:49:34 EDT
root@wpi.edu

[WPI Homepage] [CCC]