Introduction
This article explains how to install, configure and use the IMSL* Fortran Numerical Library, as provided with Intel® Visual Fortran Composer XE 2013 for Windows with IMSL 6.0. 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 a separate download from the Intel Software Development Products Registration Center. For the IMSL library distributed with Intel Visual Fortran Composer XE 2013, there is one download which supplies libraries for both IA-32 and Intel® 64 architecture targets.. The file name is of the form:
- w_fcompxe_imsl_2013.0.xxx.exe - for building applications that run on the IA-32 or Intel® 64 architectures
You must install the Intel Visual Fortran compiler before installing the IMSL libraries.
Configuring for Use from the Command Line
Intel Visual Fortran automatically establishes the environment for using IMSL when a command prompt session is started through the provided shortcuts: Start > All Programs > Intel Parallel Studio XE 2013 > Command Prompt > Parallel Studio XE with Intel Compiler 13.0
Configuring for Use from Microsoft Visual Studio*
It is necessary to add the paths for the IMSL INCLUDE and library files to Visual Studio.
- Open Microsoft Visual Studio 2008,, 2010 or 2012
- Select Tools > Options
- Under Options, select Intel® Composer XE > Visual Fortran > Compilers
- Select the Target Platform for which you want to make changes. The default of "Win32" is for the IA-32 architecture target. Select "x64" for the Intel® 64 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,
$(FNL_DIR)\IA32\lib(for IA-32 architecture target, or)$(FNL_DIR)\Intel64\lib(for Intel 64 architecture target) - Click OK.
- At the right of Includes, click the "..." button.
- Add to the end of the list,
$(FNL_DIR)\IA32\include\dll(for IA-32 architecture target, or)$(FNL_DIR)\Intel64\include\dll( for Intel 64 architecture target) - Click OK
- Repeat for the other target architecture if desired
- Click OK to save the changes.
Building Applications
You must specify the set of IMSL libraries you want to use. The easiest way to do this is to add one or two lines to a convenient source file in your application, such as the main program. The library sets are described in detail in the compiler documentation, but most users will want one of the following:
For static linking to the IMSL libraries:INCLUDE 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'
For DLL linking to the IMSL libraries:
INCLUDE 'link_fnl_shared.h'
Common Problems
Problem: When compiling, you receive an error similar to:
error #5102: Cannot open include file 'link_fnl_static.h'
orerror #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 need assistance using the product, please visit our User Forum or see this support page for further options.
