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 Fortran applications.
How to Use
The IMSL libraries are installed on Helix using 64-bit Portland Group Compilers. Compiled programs can sometimes be run on the Biowulf cluster depending on the functions they use (some require a license we have only on helix); but this can never work unless they are statically linked against the IMSL libraries, as the libraries are not accessible to the cluster nodes.
Here is a very simple Fortran 90 program named test.f90 with a call to the IMSL function TDATE (remember to indent!):INTEGER IDAY, IYEAR, MONTH EXTERNAL TDATE CALL TDATE(IDAY, MONTH, IYEAR) WRITE(*,*)'Day-Month-Year = ', IDAY, '-', MONTH, '-', IYEAR END
The IMSL Fortran libraries are built for use with the Portland Group Compilers, so environment variables must be set up for both PGI and IMSL:
bash shell:source /usr/local/pgi/pgivars.sh
csh/tcsh shell:source /usr/local/pgi/pgivars.csh
Last, compile test.f90:$F90 -o test $F90FLAGS test.f90 $LINK_F90
Because Helix systems are 64-bit and run Red Hat Linux, you must include -fpic to create shared objects:$F90 -o test $F90FLAGS -fpic test.f90 $LINK_F90
Alternatively, including -mcmodel=medium or -mcmodel=large will accomplish the same goal, as well as allow medium or large arrays in memory.
There are several sets of options for the compiler and library links:
VARIABLE SYNONYMS USE $F90 $FC pgf90 $MPIF90 mpif90 $F90FLAGS $FFLAGS default set of options for compilation $LINK_F90 $LINK_F90_SHARED
default set of options for linking $LINK_F90_HPC $LINK_F90_SHARED_HPC uses external high-performance BLAS and LAPACK libraries $LINK_F90_STATIC statically links libraries, may allow executable to be run on the 64-bit Biowulf cluster nodes $LINK_F90_STATIC_HPC combines $LINK_F90_STATIC and $LINK_F90_HPC $LINK_MPI statically links libraries and uses parallel IMSL error handler, allows compilation in an MPI environment ($MPIF90 required instead of $F90) $LINK_MPI_HPC combines $LINK_MPI and $LINK_F90_HPC $LINK_MPIS see the gruesome README file below $LINK_MPIS_HPC see the gruesome README file below
To compile using MPI, you must add the correct MPI path to your $PATH variable. See Here for more information about using MPI on Helix Systems.
There are a set of example programs in /local/IMSL_6.0_RHL/imsl/fnl600/rdhpg714x64/examples on Helix. The environment variable $FNL_EXAMPLES also points to this directory.