IMSL(R) Fortran Numerical Library

This README file explains how to install, configure, and use the IMSL Fortran Numerical Library, and it provides additional important updated product information.

News, Notes, and Addenda

Installation Instructions

Environment Variables

The fnlsetup.csh (Linux), fnlsetup.sh (Linux), and fnlsetup.bat (Windows) files set many environment variables and shell aliases/functions. The following is a list of what is useful to the Fortran Numerical Library user. Several other variables are set that are used internally by the Fortran Numerical Library.

The FFLAGS and F90FLAGS variables do not include any optimization or debugging options.

It is recommended that the setup procedure(s) be executed automatically each time you login rather than doing it interactively. This is especially important if you intend to take advantage of MPI. MPI spawns processes when multiple CPUs are specified. Having the appropriate setup procedures executed automatically at login is the only way to ensure that the environment variables required by the spawned processes are set. This can be done in Linux by adding the commands (source and .) to the .cshrc (for C shell) or .profile (for sh).

Compiling and Linking Applications

To ease the creation of IMSL Libraries applications, rely on the environment variables set during installation steps:

Using any supported Fortran compiler with the desired Link Options to create the program, use the following command to compile and link an application:

LINK_FNL can be replaced by any of the LINK_FNL* variables defined in Link Options. This is commonly used to take advantage of multiple-cpus.

Numerous options are available to the IMSL Fortran Numerical Library when building an application. To clarify which option meets your requirements each LINK option will be described in detail below.

Example Applications

Separate subdirectories are included for each installed architecture. The environment variable FNL_EXAMPLES is defined during the setup procedure. This environment variable identifies the directory where the examples associated with your environment are located. To change to the appropriate directory enter:

The examples directory will contain the following subdirectories:

Optional Third-Party Software

IMSL Fortran Numerical Library may utilize optional product components not provided by Rogue Wave Software. These product components are summarized below.

Parallelism

The IMSL Fortran Numerical Library employs both fine-grain parallelism and coarse-grain parallelism to take advantage of multiple CPUs. Both forms of parallelism are made to be transparent to the user other than setting up the system environment. No additional effort is required by the user.

Because of the overhead required by the system to spawn threads, it is not always advantageous to use SMP capabilities. In some cases where the amount of work that can be done in parallel is small when compared to the overhead, the application can actually take a performance hit due to the overhead for parallelism. If performance is a concern, benchmarking of the application should be done using different LINK options.

Once your application is linked, set the environment variable OMP_NUM_THREADS to the number of CPUs you want your application to use.

Using FNL with Visual Studio 2017

  1. Start the Microsoft Visual Studio Developer Environment.
  2. If you have not already defined a Solution Workspace for your application, you must do so before proceeding.
  3. Click on Project -> Properties
  4. Copy Win32 project settings into x64 project configuration (64-bit distributions only)
  5. Next, you must specify the IMSL libraries to link against in your project. For simplicity, we will build a dynamically linked program, which links in the DLL version of IMSL. You can do this by explicitly adding imsl_dll.lib to your Visual Studio Solution, in the Project Explorer or add include 'link_fnl_shared_imsl.h' at the top of the source code.
  6. You should now be ready to build the Solution and run the program. This sample project builds a very simple example, a shared console application, but should illustrate how easy it is to build a Visual Studio project that calls the IMSL libraries.
  7. If desired, the file <ROGUEWAVE_DIR>\imsl\fnl-<ENV>\bin\fnlsetup.bat can be used to prepare the environment. Run this file from the Developer Command Prompt for Visual Studio 2017, then launch the IDE by running the command devenv

Finding System Libraries

By default, the LINK environment variables assume that the system libraries reside in the directories searched by the loader (ld). If the loader cannot find the system libraries, modify the LINK environment variables to include the directory where the system libraries reside. For example, add -L<directory> to the LINK environment variables defined in the files <ENV>.csh and <ENV>.sh.

Modifying the FNL Error Message File

Some IMSL Fortran Numerical Library error messages are stored in an error message file. For most applications of this product, there will be no need to modify this file. There are some situations in which there may be cause to change or add messages (e.g. internationalization, adding application level error handling):

Environment Specific Details