IMSL Support
The IMSL libraries are a comprehensive set of mathematical and statistical functions that programmers can embed into their software applications. IMSL provides high-performance computing software and expertise needed to develop and execute sophisticated numerical analysis applications. These libraries free you from developing your own code by providing pre-written mathematical and statistical algorithms that you can embed into your C/C++ and Fortran applications.
Availability | Getting Started | Documentation | Frequently-Asked Questions |
Languages
UVa has a site license for floating network licenses for the IMSL Fortran Library on AIX, Sun, and Linux. The AIX version relies upon the xl compilers, whereas the Linux version was compiled with the Intel compilers.
The numerical algorithms of the IMSL Fortran Library can be accessed using Fortran 77 or using Fortran 90 language constructs. Some of the Fortran 90 implementation of IMSL routines allow users to take advantage of parallel computing through the library's underlying use of the Message Passing Interface (MPI) libraries if their environment supports it (e.g. the ITC Linux clusters).
We also license the IMSL C library CIMSL. The library uses the Intel icc or icpc compilers. The routines can be called from either C or C++. It does not have MPI capability built in, but does work with OpenMP, and some of the C implementations of IMSL routines can take advantage of threaded parallel computing through the library's underlying use of the Posix threads (pthreads) libraries.
Compiling and Linking Fortran Library Applications
Before using the IMSL Libraries you must define certain environment variables. On the ITC Linux clusters, you should use a modules command to set up the IMSL environment. The command to do this is the following:
module add imslor module load imsl
The modules function (or the cttsetup.* scripts) set many environment variables and shell aliases/functions. The following is a list of what is useful to the Fortran IMSL Library user. Several other variables are set that are used internally by the IMSL products. Environment variables for the C libraries are similar.
$F90 - Fortran 90 compiler
$MPIF90 - MPI Fortran 90 compiler
$F90FLAGS - Fortran 90 compiler options
$FC - Fortran 77 compiler
$FFLAGS - Fortran 77 compiler options
$LINK_F90_SHARED - Link options required to link with the shared
Fortran 90 MP Library (does not require MPI
library, uses scalar error handler)
$LINK_F90 - By default, set to $LINK_F90_SHARED
$LINK_FNL_SHARED - Link options required to link with the shared
Fortran Numerical Libraries (does not require
MPI library, uses scalar error handler)
$LINK_FNL - By default, set to $LINK_FNL_SHARED
$LINK_MPI - Link options required to link with the static
Fortran 90 MP Library (requires MPI library)
This LINK environment variable uses the
parallel IMSL error handler. The parallel
IMSL error handler is designed to behave
correctly in an MPI environment.
$VNI_LICENSE_NUMBER - Contains your license number.
Note: The F90FLAGS or FFLAGS variables do not include any optimization or debugging options. Use the normal compiler flags as you would for any program.
For Fortran 90 applications that do not use subroutines using MPI, the following command will compile and link an application program imsl_prog.f:
$F90 -o imsl_prog $F90FLAGS imsl_prog.f90 $LINK_F90
For Fortran 90 applications(use subroutines using MPI), the following command will compile and link an application program imsl_prog.f:
$MPIF90 -o imsl_prog $F90FLAGS imsl_prog.f90 $LINK_MPI
To use flags more approprate for Fortran 77, the following command will compile and link an application program imsl_prog.f:
$FC -o imsl_prog $FFLAGS imsl_prog.f $LINK_FNL
Note that in many cases, $FC is still the Fortran 90/95 compiler with
appropriate options for fixed-form source.
Compiling and Linking C/C++ Applications
On the ITC Linux clusters, use the modules command to set up the IMSL environment as follows:
module add cimsl
or
module load cimsl
The modules function sets many environment variables and shell aliases/functions. The following is a list of what is useful to the CIMSL Library user. Several other variables are set that are used internally by the IMSL products.
$CC - C compiler $CFLAGS - Compiler options $LINK_CNL - Link the C libraries $LINK_CNL_SMP - Link the threaded C libraries $VNI_LICENSE_NUMBER - Contains your license number.
The CFLAGS variable does not include any optimization or debugging options. The script also does not set the C++ compiler. On Linux, use icpc.
The following command will compile and link an application program imsl_prog.c:
$CC -o imsl_prog $CFLAGS -O imsl_prog.c $LINK_CNL
For C++ use the explicit name of the correct compiler:
icpc -o imsl_prog $CFLAGS -O imsl_prog.c $LINK_CNL
Using Makefiles
Compiling and linking codes with IMSL requires the addition of include paths for compilation and libraries for linking. This task can be greatly simplified by use of the Unix make command. General information about make can be found at our page. A specific example of a Makefile that can compile and link an IMSL example program, imslmp.f, is show below:
FCFLAGS = $(FFLAGS) -O
LIBS = $(LINK_FNL)
LDR = $(FC)
LDFLAGS =
OBJS = imslmp.o
.SUFFIXES: .o .f
.f.o:
$(FC) -c $(FCFLAGS) $<
imslmp: $(OBJS)
$(LDR) $(LDFLAGS) -o imslmp $(OBJS) $(LIBS)
This Makefile requires that the IMSL module be loaded. The
You can view the documentation by accessing the
IMSL Web site.
Our current versions are 6.0 for Fortran and 7.0 for C/C++.
The Documentation for the IMSL Libraries is organized into chapters; each
chapter contains routines with similar computational or analytical
capabilities. To locate the right routine for a given problem, you may use
either the table of contents located in each chapter introduction, or one
of the indexes at the end of this manual. GAMS index uses GAMS classification
(Guide to Available Mathematical Software). Use the GAMS index to
locate which routines pertain to a particular topic or problem.
Often the quickest way to use the IMSL routine is to find an example similar
to your problem and then to mimic the example. Each routine document has at
least one example demonstrating its application. The example for a routine may
be created simply for illustration, it may be from a textbook (with reference
to the source) or it may be from the mathematical or statistical literature.
If users cannot find the answers to their questions in the online
documentation, they should contact UVACSE by uvacse@virginia.edu.
The modules command will set an environment variable that will enable
you to find examples to use as templates for writing your own programs.
For instance, the directory
Users interested in the IMSL Library's parallel capability should look through
the directory,
Similarly, examples for the C library can be found in
Finding the Right Routine
contains the examples documented in the IMSL Fortran Library User's
Guides. Refer to the README file located in the manual directory
for details on how to run these examples.
$FNL_EXAMPLES/manual
which contains the MPI examples documented in the IMSL Fortran Library
User's Guide. These examples make use of the subroutines which can
take advantage of MPI. Refer to the README file
located in the mpi_manual directory for details on how to run these examples.
$FNL_EXAMPLES/mpi_manual
The most useful examples are in
$CNL_EXAMPLES
$CNL_EXAMPLES/validate