© 2008 by the Rector and Visitors of the University of Virginia.

The information contained on the University of Virginia’s Department of Information Technology and Communication (ITC) website is provided as a public service with the understanding that ITC makes no representations or warranties, either expressed or implied, concerning the accuracy, completeness, reliability or suitability of the information, including warrantees of title, non-infringement of copyright or patent rights of others. These pages are expected to represent the University of Virginia community and the State of Virginia in a professional manner in accordance with the University of Virginia’s Computing Policies.

ITCWeb: IMSL Support

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 internal code by providing pre-written mathematical and statistical algorithms that you can embed into your C/C++ and Fortran applications.

Availability | Getting Started | Getting Help | Frequent Questions | Examples | Other Resources

---

IMSL Availability

Fortran

UVa has a site license for 2 compile-time and 25 run-time floating network licenses for the IMSL Fortran Library Version 5.0 on the following Unix platforms: RS/6000, SGI, and Sun. We also have 2 compile-time and 25 run-time floating network licenses for the IMSL F90 MP library, Version 6.0, for the Linux clusters using the .

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). An IMSL Technical Report describes how to call the IMSL Fortran Libraries from a C program.

IMSL Fortran Library Functionality
A listing of the mathematical and statistical functionality included in the IMSL Fortran Libraries (in PDF format).

C/C++

UVa has purchased a site license for the IMSL C Library Version 6.0 on all Unix platforms. The library uses the Intel icc or icpc compilers. The routines can be called from either C or C++. 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. Documentation is available at the VNI site (PDF format).

return to top

---

Getting Started with IMSL

Access From Unix Platforms

The filesystem /common should be mounted from the Unix server home1.itc.virginia.edu to the Unix platforms (Sun Solaris, SGI IRIX, IBM AIX, Redhat Linux) that you are using. This is done by default on all ITC maintained Unix machines.

If you do not already have Unix account, start by obtaining a blue.unix account at the Accounts Web page. You can then apply for a research computing enabled account in order to use the IMSL libraries on the research equipment, specifically the Linux clusters.

Setting up the IMSL Libraries Environment:

Before using the IMSL Libraries you must define certain environment variables.

Fortran

On the ITC Linux or Solaris clusters, you should use a modules command to set up the IMSL environment. The command to do this is the following:

  module add imsl
or 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.

  $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. More detailed information can be found in /common/imsl5.0/CTT5.0/notes/f90/README.

Compiling and Linking Fortran Library Applications:

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

We strongly encourage the use of the IMSL Fortran 90 compiler ($F90), which will compile Fortran 77 source code as well. If you feel you must use the Fortran 77 compiler, 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.

C/C++

On the ITC Linux or Solaris clusters, you should use a modules command to set up the IMSL environment. The command to do this is the following:

  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.

Note: The CFLAGS variable does not include any optimization or debugging options. The script also does not set the C++ compiler. On Linux, use icpc; on Solaris use CC (capital letters).

Compiling and Linking C Library Applications:

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 www.itc.virginia.edu/research/make . 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 the IMSL module to be loaded. The make program is aware of environment variables that have been set in the shell from which it is invoked.

return to top

---

Getting Help with IMSL

For the Fortran Library:
On line documentation is supplied as Portable Document Format (PDF) files and the files are linked to below. This documentation system requires the use of Adobe Systems Incorporated Acrobat Reader(R) which can be downloaded from the web site www.adobe.com and configured as a helper applciation for your web browser. You can also view the documentation by accessing the IMSL web site http://www.vni.com/products/imsl/documentation/.

IMSL Fortran Library User's Guide Math/Library Volume 1 of 2

IMSL Fortran Library User's Guide Math/Library Volume 2 of 2

IMSL Fortran Library User's Guide Math/Library Special Functions

IMSL Fortran Library User's Guide Stat/Library Volume 1 of 2

IMSL Fortran Library User's Guide Stat/Library Volume 2 of 2

IMSL Fortran 90 MP Library User's Guide

IMSL Technical Report
How to Call the IMSL Libraries from C.

Finding the Right Routine

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 the ITC Research Computing Support Center (RCSC) by e-mailing Res-Consult@Virginia.EDU, telephoning 243-8800, or dropping by the RCSC in Wilson Hall, Room 244.

return to top

---

Frequent Questions about IMSL

Local FAQ
Frequently asked (or interesting) questions about IMSL the have been submitted to ITC.

IMSL Technical Support
The Visual Numerics technical support webpage for the entire family of IMSL software, including the Fortran Numeric Libraries, F90 MP and C Numeric Libraries.

return to top

---

IMSL Examples
The platform-specific directory (e.g. linux),
     /common/imsl5.0/CTT5.0/examples/linux/f90/manual
contains the examples documented in the IMSL Fortran Library User's Guides. These examples are also useful as templates for writing your own applications. Refer to the README file located in the manual directory for details on how to run these examples.

Users interested in the IMSL Library's parallel capability should look through the directory,

     /common/imsl5.0/CTT5.0/examples/linux/f90/mpi_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. An MPI library is required to run these examples. These examples are also useful as templates for writing your own applications. Refer to the README file located in the mpi_manual directory for details on how to run these examples.

return to top

---

Other IMSL Resources
Fortran Resources
A Web page of Fortran resources maintained at Lahey Compilers website.

Fortran Language Newsgroup
Newsgroup devoted to issues involving the use of Fortran.

Numerical Analysis Newsgroup
Newsgroup devoted to issues involving numerical computation.

return to top