Installing and using the IMSL* Libraries

Submit New Article

Last Modified On :   February 4, 2009 6:53 AM PST
Rate
 



Introduction

This article explains how to install, configure and use the IMSL* Fortran Numerical Library, as provided with Intel® Visual Fortran Professional Edition with IMSL*, version 11. It is not applicable to versions of IMSL obtained from other sources.

This article supplements the on-disk documentation provided at Building Applications > Using Libraries > Using the IMSL* Mathematical and Statistics Libraries. Please refer to that text for more detail on using IMSL.


Installation

The IMSL* libraries are supplied on a second DVD in boxed products and as separate downloads from the Intel Software Development Products Registration Center. There are three installation files, one for each target architecture. The file names are of the form:

  • w_cprofimsl_p_11.0.xxx_ia32.exe - for building applications that run on IA-32
  • w_cprofimsl_p_11.0.xxx_intel64.exe - for building applications that run in Intel® 64
  • w_cprofimsl_p_11.0.xxx_ia64.exe - for building applications that run on IA-64

You must install the Intel Visual Fortran compiler before installing the IMSL libraries. If you will be developing applications to run on more than one architecture, we recommend that you install the IMSL package for your development computer's architecture last.


Configuring for Use from the Command Line

Intel Visual Fortran 11.0.061 and 11.0.066 does not automatically establish the IMSL environment when the command line Build Environment scripts are run. Until this is corrected in a future update, you will have to edit the compiler .bat files manually to also set the IMSL environment.

For the IA-32 architecture target, open the file

C:\Program Files\Intel\Compiler\11.0\066\fortran\Bin\IA32\ifortvars_IA32.bat

in Notepad or another text editor. Add the following line at the end of the file:

IF EXIST "C:\Program Files\VNI\imsl\fnl600\IA32\bin\fnlsetup.bat" @call "C:\Program Files\VNI\imsl\fnl600\IA32\bin\fnlsetup.bat"

 

Make sure that the added text is contained on one line only.

For the Intel 64 architecture target, the file to edit is

...\Intel64\ifortvars_intel64.bat
or
...\IA32_Intel64\ifortvars_ia32_intel64.bat

and the line to add is:

IF EXIST "C:\Program Files\VNI\imsl\fnl600\Intel64\bin\fnlsetup.bat" @call "C:\Program Files\VNI\imsl\fnl600\Intel64\bin\fnlsetup.bat"


For the IA-64 architecture target, the file to edit is

...\IA64\ifortvars_ia64.bat


and the line to add is:

IF EXIST "C:\Program Files\VNI\imsl\fnl600\IA64\bin\fnlsetup.bat" @call "C:\Program Files\VNI\imsl\fnl600\IA64\bin\fnlsetup.bat"


Configuring for Use from Microsoft Visual Studio*

It may be necessary to add the paths for the IMSL INCLUDE and library files to Visual Studio.

  • Open Microsoft Visual Studio 2003, 2005 or 2008
  • Select Tools > Options
  • Under Options, select Intel® Fortran > Compilers
  • In Visual Studio 2005 or 2008 only, select the Target Platform for which you want to make changes. The default of Win32 is for the IA-32 architecture target.
  • Make sure that the desired compiler version is selected.
  • At the right of Libraries., click the "..." button.
  • Add to the end of the list,
    C:\Program Files\VNI\imsl\fnl600\IA32\lib (for IA-32 architecture target)
    C:\Program Files\VNI\imsl\fnl600\Intel64\lib (for Intel 64 architecture target or)
    C:\Program Files\VNI\imsl\fnl600\IA64\lib (for IA-64 architecture target)
  • Click OK.
  • At the right of Includes, click the "..." button.
  • Add to the end of the list,
    C:\Program Files\VNI\imsl\fnl600\IA32\include\dll (for IA-32 architecture target)
    C:\Program Files\VNI\imsl\fnl600\Intel64\include\dll ( for Intel 64 architecture target or)
    C:\Program Files\VNI\imsl\fnl600\IA64\include\dll for (IA-64 architecture targe)
  • Click OK
  • Click OK to save the changes.

Building Applications

If you were using the IMSL libraries with Intel Visual Fortran 10.x, you may need to make a change to your source or build options to reflect the change in the default OpenMP* libraries used by the Intel Fortran compiler.

If you followed the recommendation of Visual Numerics* and enabled OpenMP processing for your application, you will probably not have to make changes.

If you were instructed to add to a source file the line:

!DEC$ OBJCOMMENT LIB:'libguide.lib'


change this to:

!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'


If you added libguide.lib to your build options in other ways, replace it with libiomp5md.lib. You must not specify the /Qopenmp-libs:legacy option as this is incompatible with IMSL.

If you are building a new application, you will need to select one of the sets of IMSL libraries and add the necessary line(s), as described in the compiler documentation, in one of your Fortran source files. Most applications will use these:

INCLUDE 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'


Common Problems

Problem: When compiling, you receive an error similar to:

error #5102: Cannot open include file 'link_fnl_static.h'
or
error #7002: Error in opening the compiled module file. Check INCLUDE paths.

Resolution:
Follow the steps in the sections above for configuring for use from the command line or from Microsoft Visual Studio.

Problem:
When linking, you receive errors similar to:

imsls_err.lib(e1pos.obj) : error LNK2001: unresolved external symbol ___kmpc_threadprivate_cached

Resolution:
Add the line:

!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'

to one of your Fortran sources. An alternative is to enable OpenMP processing (/Qopenmp), but this may have unwanted side effects if you are not using OpenMP in your application.


Conclusion

If you have comments on this article, specifically, please add them below. If you need assistance using the product, please visit our User Forum or see this support page for further options.


 





This article applies to: Intel® Visual Fortran Compiler for Windows* Knowledge Base