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

Throughout this process, <ROGUEWAVE_DIR> denotes the main IMSL installation directory. By default, this is set to C:\Program Files (x86)\RogueWave\ but may be different if you installed IMSL in a different directory.

The directory <ROGUEWAVE_DIR>\imsl\fnl-<VER>\<ENV>\lib must be present in the environment variable PATH prior to starting Microsoft Visual Studio. This can be verified in: Control Panel -> System and Security -> System -> Advanced system settings -> Environment Variables.

  1. Initialize environment and 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. Set x64 Project Settings
  4. Add Source Code to the Project
  5. Configure the project
  6. Add the Include Files Directory
  7. Choose compiler
  8. Link the IMSL Numerical Library
  9. Build and Run

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