NAG Fortran Library, Mark 25

FLW3225DEL - License Managed

Microsoft Windows, 32-bit, Intel Fortran

Users' Note



Contents


1. Introduction

This document is essential reading for every user of the NAG Fortran Library implementation specified in the title. It provides implementation-specific detail that augments the information provided in the NAG Mark 25 Library Manual (which we will refer to as the Library Manual). Wherever that manual refers to the "Users' Note for your implementation", you should consult this note.

In addition, NAG recommends that before calling any Library routine you should read the following reference material (see Section 5):

(a) Essential Introduction
(b) Chapter Introduction
(c) Routine Document

2. Supplementary Information

Please check the following URL:

http://www.nag.co.uk/doc/inun/fl25/w32del/supplementary.html

for details of any new information related to the applicability or usage of this implementation.

3. General Information

This implementation of the NAG Fortran Library provides static and shared libraries that use a third-party vendor performance library to provide Basic Linear Algebra Subprograms (BLAS) and Linear Algebra PACKage (LAPACK) routines (see below). It also provides static and shared libraries that use the NAG versions of these routines (referred to as the self-contained libraries).

This implementation of the NAG Fortran Library has been tested with version 11.3.1 of the Intel ® Math Kernel Library for Windows (MKL) which is supplied as a part of this product. Please see the Intel website for further information about MKL (https://software.intel.com/intel-mkl).

For best performance, we recommend that you use a variant of the NAG Fortran Library which is based on the supplied MKL, i.e. nag_mkl_MT.lib, nag_mkl_MD.lib or FLW3225DE_mkl.lib/FLW3225DE_mkl.dll. These libraries do not contain the NAG versions of the BLAS and LAPACK routines (except for any routines listed in Section 4(a)).

The self-contained libraries, nag_nag_MT.lib, nag_nag_MD.lib and FLW3225DE_nag.lib/FLW3225DE_nag.dll, are also supplied. These contain the NAG versions of the BLAS and LAPACK routines.

Which static variant of the NAG Library you should use will also depend on how you wish to link to the Microsoft run-time libraries. For example, if you are linking with the multithreaded static run-time libraries, you should use nag_mkl_MT.lib or nag_nag_MT.lib, whereas if you are linking with the multithreaded dynamic link run-time libraries, you should use nag_mkl_MD.lib or nag_nag_MD.lib. Alternatively, if you wish to call a dynamic link library (DLL) variant of the NAG Library, you should link with the import library FLW3225DE_mkl.lib or FLW3225DE_nag.lib (and, at run time, make sure that the corresponding DLL, FLW3225DE_mkl.dll or FLW3225DE_nag.dll, is on your path). For more details, see Section 3.1.1.

The version of Intel MKL supplied is multithreaded. If the environment variable OMP_NUM_THREADS is undefined, MKL may create multiple threads to speed up computation on systems with more than one processor or a multicore chip. If you do not want MKL to make use of multiple cores or processors, OMP_NUM_THREADS must be set to 1.

Alternatively, set the environment variable to the number of threads required. Note that the Chapter X06 routines do not change the behaviour of MKL threading in serial implementations of the Library.

Intel have introduced a conditional bitwise reproducibility (BWR) option in MKL. Provided a user's code adheres to certain conditions (see https://software.intel.com/en-us/node/528579), BWR can be forced by setting the MKL_CBWR environment variable. See the MKL documentation for further details. It should be noted, however, that many NAG routines do not adhere to these conditions. This means that for a given NAG library built on top of MKL, it may not be possible to ensure BWR for all NAG routines across different CPU architectures by setting MKL_CBWR. See Section 3.13 of the Essential Introduction for more general information on bitwise reproducibility.

This implementation of the NAG Library is appropriate for use with the compilers described in Section 2.1 of the Installer's Note. Although it contains DLL versions of the NAG Library these are not intended for use from other packages and environments such as Visual Basic or Excel; see the supplementary information page on our website (described in Section 2 above) for further details.

3.1. Accessing the Library

The NAG Fortran Library has been built using the version of Intel Fortran described in the Installer's Note, Section 2.2. Some required Intel Fortran compiler run-time DLLs are available in the install_dir\rtl\bin folder, and you may or may not need to have that folder on your path at program run time, depending on whether or not you have the Intel Fortran compiler installed elsewhere and which version it is.

In this section we assume that the Library has been installed in the default folder, namely

  C:\Program Files\NAG\FL25\flw3225del
(Note that if a 32-bit Library is installed on a 64-bit machine, the default location will actually be
  C:\Program Files (x86)\NAG\FL25\flw3225del
 
instead.) The actual name of the "Program Files" folder may appear differently, depending on your locale. If the above folder does not exist, please consult the system manager (or the person who did the installation). In some of the following subsections, this folder is referred to as install_dir.

We also assume that the shortcut for the Library command prompt is in the NAG section of the Start Menu/All apps under:

      NAG FLW3225DEL Command Prompt
If this shortcut does not exist, please consult the system manager (or the person who did the installation). (Other shortcuts created as part of the Library installation procedure are also assumed to be in this location.)

If you are using one of the DLL forms of the Library (see Section 3.1.1), you need to ensure that the NAG DLL (FLW3225DE_mkl.dll or FLW3225DE_nag.dll) is accessible at run time; therefore the install_dir\bin folder must be on the path. The install_dir\rtl\bin folder must be on the path too (unless you have the appropriate Intel run-time libraries on your path already). If an MKL-based version of the Library is to be used, the install_dir\mkl_ia32_11.3.1\bin folder must also be on the path, but should appear later in the path than the install_dir\bin folder, since the NAG versions of a few BLAS / LAPACK routines may be included in the NAG Libraries to avoid problems with the vendor versions. (See Section 4 for details.)

To check the accessibility of the NAG DLLs, run the program NAG_Fortran_DLL_info.exe which is available from the Start Menu/All apps shortcut

      Check NAG FLW3225DEL DLL Accessibility
See Section 4.2.2 of the Installer's Note for details of this utility.

3.1.1. From a Command Window

To access this implementation from a command window some environment variables need to be set.

The shortcut:

      NAG FLW3225DEL Command Prompt
may be used to start a command prompt window with the correct settings for the INCLUDE, LIB and PATH environment variables for the Library and the supplied MKL. The environment variable NAG_FLW3225DEL, which is needed by the nag_example_*.bat batch files is also set.

If the shortcut is not used, you can set the environment variables by running the batch file envvars.bat for this implementation. The default location for this file is:

  C:\Program Files\NAG\FL25\flw3225del\batch\envvars.bat
If this file is not in the default location, you can locate it by searching for the file envvars.bat containing flw3225del.

You may then compile and link to the NAG Fortran Library on the command line using one of the following commands. Note that each command should be issued on a single line; some of the commands are shown split over two lines here to avoid truncation if this note is printed.

  ifort /MT driver.f90 nag_mkl_MT.lib mkl_intel_c.lib
      mkl_intel_thread.lib mkl_core.lib libiomp5md.lib user32.lib

  ifort /MT driver.f90 nag_nag_MT.lib user32.lib

  ifort /MD driver.f90 nag_mkl_MD.lib mkl_intel_c.lib
      mkl_intel_thread.lib mkl_core.lib libiomp5md.lib user32.lib

  ifort /MD driver.f90 nag_nag_MD.lib user32.lib

  ifort /MD driver.f90 FLW3225DE_mkl.lib

  ifort /MD driver.f90 FLW3225DE_nag.lib
where driver.f90 is your application program. The order of the libraries is important because certain parts of the MKL should not be used (see Section 4).

The first two commands use libraries compiled with the /MT option. The first command will use the static library without the NAG version of the BLAS/LAPACK procedures (nag_mkl_MT.lib) in addition to the MKL static libraries. (N.B. newer versions of the Intel compiler no longer have the MT version of the OMP run-time library libiomp5mt.lib, so it is necessary to link to libiomp5md.lib instead.) The second command will use the library containing the NAG version of the BLAS/LAPACK procedures (nag_nag_MT.lib). The option /MT should be used to ensure linking with the correct run-time libraries (multithreaded static run-time libraries in this case).

The third and fourth commands use static libraries compiled with the /MD option. The third command will use the static library without the NAG version of the BLAS/LAPACK procedures (nag_mkl_MD.lib) in addition to the MKL static libraries. The fourth command will use the library containing the NAG version of the BLAS/LAPACK procedures (nag_nag_MD.lib). The option /MD should be used to ensure linking with the correct run-time libraries (multithreaded dynamic link run-time libraries in this case).

The last two commands use DLL import libraries compiled with the /MD option. The difference between the two is that the former will use the DLL without the NAG version of the BLAS/LAPACK procedures (FLW3225DE_mkl.dll) in addition to the MKL DLLs. It is not necessary to add the path to the MKL import libraries here, since the BLAS and LAPACK symbols are exported from the NAG import library (FLW3225DE_mkl.lib) in this instance. (Note that this behaviour may be different from some other NAG Library implementations.) The last command will use the DLL containing the NAG version of the BLAS/LAPACK procedures (FLW3225DE_nag.dll). The option /MD should be used to ensure linking with the correct run-time libraries.

Note that /MT is equivalent to specifying /libs:static /threads and /MD is equivalent to specifying /libs:dll /threads.

Please note that the Intel Visual Fortran compiler environment variables must be set in the command window. For more details refer to the Users' Guide for the compiler.

3.1.2. From Microsoft Visual Studio

The instructions given here are for Visual Studio 2015 with Intel Fortran Compiler 16.0. Other versions may vary.

When you installed the NAG Library, if you allowed the installer to update your environment variables, then changes will already have been made to your PATH, LIB and INCLUDE variables which allow Visual Studio to locate various NAG interface block files and libraries at compile time and run time. Otherwise, to ensure that the NAG DLLs are accessible at run time, the PATH environment variable must be set such that the location of the NAG DLLs, specifically the folder install_dir\bin, is on the path. If the MKL version of the DLL is required, the location of the MKL DLLs, install_dir\mkl_ia32_11.3.1\bin must also be on the path, but should appear after the install_dir\bin folder.

The library is intended to be run in fully optimized mode, so to avoid any warning messages, you might decide to set the active configuration to Release. Once Visual Studio has been opened, you can do this from the Toolbar or alternatively via the Build|Configuration Manager menus. Note that if you work in Debug mode, you may receive a warning message about conflicting run-time libraries.

The following steps show how to add the NAG Library to the Intel Fortran project:

  1. Open the Property Pages for the project. There are several ways of doing this including:

  2. From the Property Pages form, click/expand Fortran in the leftmost panel and then choose General. Under Additional Include Directories set the full name of the folder install_dir\nag_interface_blocks

  3. Next on the Property Pages form, click/expand Linker in the leftmost panel and then choose General. In the right hand panel, next to Additional Library Directories add the three folders install_dir\lib install_dir\mkl_ia32_11.3.1\lib install_dir\rtl\lib. You may also need to add the location of the libucrt.lib file. (On Windows 10 this is typically in a location such as C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64 but this may vary depending on your system. On older versions of Windows, you may need to install the appropriate Windows update.)

  4. Next in the Linker section, choose Input. The right hand panel will now have an Additional Dependencies entry, and you need to type nag_mkl_MT.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib user32.lib in this location to use the nag_mkl_MT.lib library and MKL. Please note that the library names are separated by a space only and that nag_mkl_MT.lib must be the first one. Click on the Apply button to accept the changes. If you wish to use the self-contained NAG library nag_nag_MT.lib then you need to add nag_nag_MT.lib user32.lib instead of the libraries listed above. Similary, to use one of the other NAG Libraries, insert the appropriate library or libraries (as detailed below) in the Additional Dependencies field.

  5. Before you can compile the project you need to specify the correct run-time library needed. From the Properties form, click/expand Fortran in the leftmost panel and then choose Libraries. The right hand panel will now have a Runtime Library entry, and you need to select Multithreaded if your project uses one of the two libraries nag_nag_MT.lib or nag_mkl_MT.lib. If your project uses any of the other NAG libraries you need to select Multithread DLL. After you select the correct run-time library click on the Apply button to accept the changes.

  6. Click on the OK button to close the form.

In summary, the setting of the project Additional Dependencies, the project Runtime Library and the PATH environment variable must be consistent as follows:

If you are running on a 64-bit system, make sure the Target CPU is set to x86 (to ensure compatibility with this 32-bit implementation of the NAG Library). The project should now compile and link using the appropriate choice from the Build menu.

To run a program from within the Microsoft Development Environment, the program may be executed via the Debug menu (by selecting Start Without Debugging (Ctrl+F5), for example).

If a data file needs to be attached to the standard input or the output of a program needs to be redirected to the standard output, this can be achieved by selecting the Debugging section on the Properties form and inserting the appropriate commands in the Command Arguments field, e.g.

  < input_file > output_file
If the input and output files are not in the application's working directory, full or relative paths may need to be specified. For NAG examples that use an .opt file, this should be placed in the working directory. This directory may be set via the Working Directory field, which is also on the Debugging page of the Properties form.

3.1.3. Note on Module Files

The .mod module files supplied with this NAG Library implementation in the nag_interface_blocks folder were compiled with the Intel ifort compiler. Such module files are compiler-dependent and will not be suitable for use with other Fortran compilers. If you wish to use the NAG example programs, or use the interface blocks in your own programs, when using another compiler, you will first need to create your own module files. See Section 3.2 for details.

3.1.4. Calling the Library from Microsoft or Intel C or C++

With care, the NAG Fortran Library may be used from within a C or C++ environment. To assist the user make the mapping between Fortran and C types, a C/C++ header file (nagmk25.h) is provided. It is recommended that users wishing to use a Fortran Library routine either copy and paste the relevant section of the file into their C or C++ application (making sure that the relevant #defines etc. are also copied from the top of the file) or simply include the header file with their application.

Examples of the use of the DLLs from C and C++ are given in the install_dir\samples\c_examples and install_dir\samples\cpp_examples folders.

A document, techdoc.html, giving more detailed advice on calling the DLLs from C and C++ is available in install_dir\c_headers. There is also a shortcut to this document in the NAG section of the Start Menu/All apps under

      Calling NAG FLW3225DEL from C & C++
by default. Note that some changes will be needed if you paste code from one of the C examples given there into a C++ file since, if __cplusplus is defined, the header file provided uses C++ reference arguments for scalars, and therefore the "address of" operator should not be used. See Section 3 of the techdoc.html document for more details.

Key information:

Assuming that the folder containing the libraries has been added to the LIB environment variable, you may compile and link your C application program to the DLL version of the NAG Fortran Library on the command line in the following manner (assuming you are using Microsoft C, e.g. from a VS2015 x86 Native Tools Command Prompt window):
  cl driver.c FLW3225DE_mkl.lib
or
  cl driver.c FLW3225DE_nag.lib
where driver.c is your application program. This assumes that the folder containing the header file has been added to the INCLUDE environment variable. If not, you could use:
  cl /I"install_dir\c_headers" driver.c FLW3225DE_mkl.lib
or
  cl /I"install_dir\c_headers" driver.c FLW3225DE_nag.lib
To link to one of the static libraries instead of a DLL, you will also need access to the compiler run-time library directory install_dir\rtl\lib. It is most convenient if you add that directory to your LIB environment variable, then use, for example:
   cl /MD /I"install_dir\c_headers" driver.c nag_nag_MD.lib libifcoremd.lib user32.lib
 
or
   cl /MT /I"install_dir\c_headers" driver.c nag_nag_MT.lib libifcoremt.lib user32.lib
 

Note that the Intel compiler run-time libraries libifcoremd.lib and libifcoremt.lib are used here to avoid a possible run-time issue. They are required here only when using Microsoft C with nag_nag_MD.lib or nag_nag_MT.lib.

Linking to MKL-based static NAG libraries may require you to add further link libraries, as shown in Section 3.1.1.

The Intel C compiler icl may be used in the same way as the Microsoft compiler cl, though it may not be necessary to add the rtl\lib directory to your LIB environment variable.

The following instructions apply to Visual Studio 2015. Other versions may vary.

If you are working under the Visual Studio IDE, set the following values to enable linking to work. Under the project's Properties, select Configuration Properties | Linker | Input and add FLW3225DE_mkl.lib or FLW3225DE_nag.lib to the Additional Dependencies field. Then select Configuration Properties | Linker | General and add install_dir\lib to the Additional Library Directories field. You will also need to either add nagmk25.h to the Header Files section of the Solution Explorer or add the c_headers directory to the C/C++ | General | Additional Include Directories field on the Properties form.

Note that, with Microsoft C++, you may need to use the /EHsc compiler switch with the command line C++ examples.

3.1.5. Calling the Library from NAG Fortran Builder

It is possible to link to the DLL versions of the NAG Library using nagfor, the Fortran Compiler which comes with NAG Fortran Builder. Interface blocks for use with a version of Fortran Builder are supplied in folder install_dir\nag_interface_blocks_nagfor. If you have a different version of the NAG compiler, you may first need to recompile the module files as described in Section 3.2.

From a Windows Command Prompt, first make sure that the PATH environment variable is correctly set, as described in Section 3.1.1.

You may then compile and link to the NAG Fortran Library on the command line using one of the following commands:

  nagfor -abi=32 -I"install_dir\nag_interface_blocks_nagfor" driver.f90
         "install_dir\lib\FLW3225DE_mkl.lib" -o driver.exe
  nagfor -abi=32 -I"install_dir\nag_interface_blocks_nagfor" driver.f90
         "install_dir\lib\FLW3225DE_nag.lib" -o driver.exe
depending on whether you wish to link to the MKL-supported version of the library or the all-NAG version.

The full pathname of the FLW3225DE_mkl or FLW3225DE_nag library file must be specified and must be enclosed within quotes if it contains spaces.

Using the DLLs from within the Fortran Builder IDE itself is also easy, following steps like these:

Note that if you build your project in Debug mode (the default), it is not possible to use the Undefined variables option which is accessible on the Fortran Compiler / Runtime Check tab of Project Settings. This is because the NAG Library was not compiled with this option. Trying to use it will cause a compile-time error in Fortran Builder, showing an "Incompatible option setting" when using the NAG interface blocks.

3.1.6. Calling the Library from Other Environments

Information on calling the NAG Fortran Library from environments not mentioned above may be available from the Supplementary Information page:

http://www.nag.co.uk/doc/inun/fl25/w32del/supplementary.html

3.2. Interface Blocks

The NAG Fortran Library interface blocks define the type and arguments of each user callable NAG Fortran Library routine. These are not essential to calling the NAG Fortran Library from Fortran programs. However, they are required if the supplied examples are used. Their purpose is to allow the Fortran compiler to check that NAG Fortran Library routines are called correctly. The interface blocks enable the compiler to check that:

(a) subroutines are called as such;
(b) functions are declared with the right type;
(c) the correct number of arguments are passed; and
(d) all arguments match in type and structure.

The NAG Fortran Library interface block files are organised by Library chapter. They are aggregated into one module named

  nag_library

The modules are supplied in pre-compiled form (.mod files) for use by the Intel Fortran compiler, ifort.

If you use the Library command prompt shortcut or set the environment variables by running the batch file envvars.bat for this implementation (see Section 3.1.1), and the Intel ifort compiler, you can use any of the commands described in Section 3.1.1 to access these modules since the environment variable INCLUDE will be set.

The .mod module files were compiled with the compiler shown in Section 2.2 of the Installer's Note. Such module files are compiler-dependent, so if you wish to use the NAG example programs, or use the interface blocks in your own programs, when using a compiler that is incompatible with these modules, you will first need to create your own module files, as described here.

Create a folder named nag_interface_blocks_original in a location of your choice (the exact folder name is not important), and copy the contents of nag_interface_blocks to nag_interface_blocks_original, thus saving the original set of interface blocks.

Then in folder nag_interface_blocks recompile all the .f90 files into objects using your compiler. Because the interface blocks contain some inter-dependencies, the order of compilation is important, but the following compilation order should work, where FCOMP is the name of your Fortran compiler:

  FCOMP -c nag_precisions.f90
  FCOMP -c nag_a_ib.f90
  FCOMP -c nag_blast_ib.f90
  FCOMP -c nag_blas_consts.f90
  FCOMP -c nag_blas_ib.f90
  FCOMP -c nag_c_ib.f90
  FCOMP -c nag_d_ib.f90
  FCOMP -c nag_e_ib.f90
  FCOMP -c nag_f_ib.f90
  FCOMP -c nag_g_ib.f90
  FCOMP -c nag_h_ib.f90
  FCOMP -c nag_lapack_ib.f90
  FCOMP -c nag_m_ib.f90
  FCOMP -c nag_s_ib.f90
  FCOMP -c nag_x_ib.f90
  FCOMP -c nag_long_names.f90
  FCOMP -c nag_library.f90
The object files generated by the compilation may be discarded - only the module files are needed.

You should now be able to use the newly compiled module files in the usual way.

3.3. Example Programs

The example results distributed were generated at Mark 25, using the software described in Section 2.2 of the Installer's Note. These example results may not be exactly reproducible if the example programs are run in a slightly different environment (for example, a different Fortran compiler, a different compiler library, or a different set of BLAS or LAPACK routines). The results which are most sensitive to such differences are: eigenvectors (which may differ by a scalar multiple, often -1, but sometimes complex); numbers of iterations and function evaluations; and residuals and other "small" quantities of the same order as the machine precision.

The distributed example results are those obtained with the library nag_mkl_MD.lib (i.e. using the MKL BLAS and LAPACK routines). Running the examples with NAG BLAS or LAPACK may give slightly different results.

Note that the example material has been adapted, if necessary, from that published in the Library Manual, so that programs are suitable for execution with this implementation with no further changes. The distributed example programs should be used in preference to the versions in the Library Manual wherever possible.

The example programs are most easily accessed using one of the batch files nag_example_DLL.bat, nag_example_static_MT.bat and nag_example_static_MD.bat, which can be found in the install_dir\batch folder. The batch file will provide you with a copy of an example program (and its data, if any), compile the program and link it with the appropriate libraries (showing you the compile command so that you can recompile your own version of the program). Finally, the executable program will be run, with the results being sent to a file and to the command window.

The batch file requires that the environment variables for your Fortran compiler and the NAG Fortran Library are set. In particular, the environment variable NAG_FLW3225DEL needs to be set to the location of the NAG Fortran Library. Please see Section 3.1.1 for details of how to do this.

The example program concerned is specified by the argument to the command, e.g.

  nag_example_DLL e04ucf
will copy the example program and its data and options files (e04ucfe.f90, e04ucfe.d and e04ucfe.opt) into the current folder, compile and link the program and run it to produce the example program results in the file e04ucfe.r.

nag_example_DLL.bat links to the DLL version of the NAG Library using NAG BLAS/LAPACK.

To link with the MKL version of the DLL, use the -mkl option, e.g.

  nag_example_DLL -mkl e04ucf

The nag_example_static_MD batch file is used in the same way and links to the static NAG library compiled with /MD.

  nag_example_static_MD e04ucf
 
Again, it is possible to link the MKL BLAS/LAPACK by using the -mkl option
  nag_example_static_MD -mkl e04ucf
 

The nag_example_static_MT.bat batch file links to the static library using NAG BLAS/LAPACK compiled with /MT, e.g.

  nag_example_static_MT e04ucf
  nag_example_static_MT -mkl e04ucf
 
The first command links with the static library using NAG BLAS/LAPACK. To link with the MKL version of the library, use the -mkl option, as shown in the second command.

3.4. Fortran Types and Interpretation of Bold Italicised Terms

This implementation of the NAG Fortran Library uses 32-bit integers.

The NAG Library and documentation use parameterized types for floating-point variables. Thus, the type

      REAL(KIND=nag_wp)
appears in documentation of all NAG Fortran Library routines, where nag_wp is a Fortran KIND parameter. The value of nag_wp will vary between implementations, and its value can be obtained by use of the nag_library module. We refer to the type nag_wp as the NAG Library "working precision" type, because most floating-point arguments and internal variables used in the Library are of this type.

In addition, a small number of routines use the type

      REAL(KIND=nag_rp)
where nag_rp stands for "reduced precision type". Another type, not currently used in the Library, is
      REAL(KIND=nag_hp)
for "higher precision type" or "additional precision type".

For correct use of these types, see almost any of the example programs distributed with the Library.

For this implementation, these types have the following meanings:

      REAL (kind=nag_rp)      means REAL (i.e. single precision)
      REAL (kind=nag_wp)      means DOUBLE PRECISION
      COMPLEX (kind=nag_rp)   means COMPLEX (i.e. single precision complex)
      COMPLEX (kind=nag_wp)   means double precision complex (e.g. COMPLEX*16)

In addition, the Manual has adopted a convention of using bold italics to distinguish some terms. See Section 4.4 of the Essential Introduction for details.

3.5. Maintenance Level

The maintenance level of the Library can be determined by compiling and executing the example that calls A00AAF, or you could call the nag_example_DLL.bat batch file with the argument a00aaf. See Section 3.3. This example prints out details of the implementation, including title and product code, compiler and precision used, mark and maintenance level.

Alternatively, run the diagnostic program NAG_Fortran_DLL_info.exe which itself calls A00AAF (see Installer's Note, Section 4.2.2).

4. Routine-specific Information

Any further information which applies to one or more routines in this implementation is listed below, chapter by chapter.
  1. F06, F07, F08 and F16

    Many LAPACK routines have a "workspace query" mechanism which allows a caller to interrogate the routine to determine how much workspace to supply. Note that LAPACK routines from the MKL may require a different amount of workspace from the equivalent NAG versions of these routines.

    In this implementation calls to the NAG version of the following BLAS and LAPACK routines are included in the libraries nag_mkl_MT.lib, nag_mkl_MD.lib and FLW3225DE_mkl.dll to avoid problems with the vendor version:

      None
    
  2. S07 - S21

    The behaviour of functions in these Chapters may depend on implementation-specific values.

    General details are given in the Library Manual, but the specific values used in this implementation are as follows:

    S07AAF  F_1 = 1.0E+13
            F_2 = 1.0E-14
    
    S10AAF  E_1 = 1.8715E+1
    S10ABF  E_1 = 7.080E+2
    S10ACF  E_1 = 7.080E+2
    
    S13AAF  x_hi = 7.083E+2
    S13ACF  x_hi = 1.0E+16
    S13ADF  x_hi = 1.0E+17
    
    S14AAF  IFAIL = 1 if X > 1.70E+2
            IFAIL = 2 if X < -1.70E+2
            IFAIL = 3 if abs(X) < 2.23E-308
    S14ABF  IFAIL = 2 if X > x_big = 2.55E+305
    
    S15ADF  x_hi = 2.65E+1
    S15AEF  x_hi = 2.65E+1
    S15AGF  IFAIL = 1 if X >= 2.53E+307
            IFAIL = 2 if 4.74E+7 <= X < 2.53E+307
            IFAIL = 3 if X < -2.66E+1
    
    S17ACF  IFAIL = 1 if X > 1.0E+16
    S17ADF  IFAIL = 1 if X > 1.0E+16
            IFAIL = 3 if 0 < X <= 2.23E-308
    S17AEF  IFAIL = 1 if abs(X) > 1.0E+16
    S17AFF  IFAIL = 1 if abs(X) > 1.0E+16
    S17AGF  IFAIL = 1 if X > 1.038E+2
            IFAIL = 2 if X < -5.7E+10
    S17AHF  IFAIL = 1 if X > 1.041E+2
            IFAIL = 2 if X < -5.7E+10
    S17AJF  IFAIL = 1 if X > 1.041E+2
            IFAIL = 2 if X < -1.9E+9
    S17AKF  IFAIL = 1 if X > 1.041E+2
            IFAIL = 2 if X < -1.9E+9
    S17DCF  IFAIL = 2 if abs(Z) < 3.92223E-305
            IFAIL = 4 if abs(Z) or FNU+N-1 > 3.27679E+4
            IFAIL = 5 if abs(Z) or FNU+N-1 > 1.07374E+9
    S17DEF  IFAIL = 2 if AIMAG(Z) > 7.00921E+2
            IFAIL = 3 if abs(Z) or FNU+N-1 > 3.27679E+4
            IFAIL = 4 if abs(Z) or FNU+N-1 > 1.07374E+9
    S17DGF  IFAIL = 3 if abs(Z) > 1.02399E+3
            IFAIL = 4 if abs(Z) > 1.04857E+6
    S17DHF  IFAIL = 3 if abs(Z) > 1.02399E+3
            IFAIL = 4 if abs(Z) > 1.04857E+6
    S17DLF  IFAIL = 2 if abs(Z) < 3.92223E-305
            IFAIL = 4 if abs(Z) or FNU+N-1 > 3.27679E+4
            IFAIL = 5 if abs(Z) or FNU+N-1 > 1.07374E+9
    
    S18ADF  IFAIL = 2 if 0 < X <= 2.23E-308
    S18AEF  IFAIL = 1 if abs(X) > 7.116E+2
    S18AFF  IFAIL = 1 if abs(X) > 7.116E+2
    S18DCF  IFAIL = 2 if abs(Z) < 3.92223E-305
            IFAIL = 4 if abs(Z) or FNU+N-1 > 3.27679E+4
            IFAIL = 5 if abs(Z) or FNU+N-1 > 1.07374E+9
    S18DEF  IFAIL = 2 if REAL(Z) > 7.00921E+2
            IFAIL = 3 if abs(Z) or FNU+N-1 > 3.27679E+4
            IFAIL = 4 if abs(Z) or FNU+N-1 > 1.07374E+9
    
    S19AAF  IFAIL = 1 if abs(X) >= 5.04818E+1
    S19ABF  IFAIL = 1 if abs(X) >= 5.04818E+1
    S19ACF  IFAIL = 1 if X > 9.9726E+2
    S19ADF  IFAIL = 1 if X > 9.9726E+2
    
    S21BCF  IFAIL = 3 if an argument < 1.583E-205
            IFAIL = 4 if an argument >= 3.765E+202
    S21BDF  IFAIL = 3 if an argument < 2.813E-103
            IFAIL = 4 if an argument >= 1.407E+102
    
  3. X01

    The values of the mathematical constants are:

    X01AAF (pi) = 3.1415926535897932
    X01ABF (gamma) = 0.5772156649015328
    
  4. X02

    The values of the machine constants are:

    The basic parameters of the model

    X02BHF   = 2
    X02BJF   = 53
    X02BKF   = -1021
    X02BLF   = 1024
    

    Derived parameters of the floating-point arithmetic

    X02AJF   = 1.11022302462516E-16
    X02AKF   = 2.22507385850721E-308
    X02ALF   = 1.79769313486231E+308
    X02AMF   = 2.22507385850721E-308
    X02ANF   = 2.22507385850721E-308
    

    Parameters of other aspects of the computing environment

    X02AHF   = 1.42724769270596E+45
    X02BBF   = 2147483647
    X02BEF   = 15
    
  5. X04

    The default output units for error and advisory messages for those routines which can produce explicit output are both Fortran Unit 6.

5. Documentation

The Library Manual is available as a separate installation, via download from the NAG website. The most up-to-date version of the documentation is accessible via the NAG website at http://www.nag.co.uk/numeric/fl/fldocumentation.asp.

The Library Manual is supplied in the following formats:

The following main index files have been provided for these formats:

  nagdoc_fl25\html\frontmatter\manconts.html
  nagdoc_fl25\pdf\frontmatter\manconts.pdf
  nagdoc_fl25\pdf\frontmatter\manconts.html
If the Library Manual has been installed locally, these index files are available from the NAG section of the Start Menu/All apps under
      NAG Library Manual Mark 25 (HTML5)
      NAG Library Manual Mark 25 (PDF)
      NAG Library Manual Mark 25 (PDF + HTML Index)
respectively, by default. Use your web browser to navigate from here. For convenience, a master index file containing links to the above files has been provided at
  nagdoc_fl25\index.html

Advice on viewing and navigating the formats available can be found in the Online Documentation document.

The Library Manual is also available as an HTML Help file, which is available from the NAG section of the Start Menu/All apps under

      NAG Library Manual Mark 25 HTML Help
If the NAG Library materials have been installed on a network drive, you may need to copy the HTML Help file (nagdoc_fl25.chm) to a local drive. If you still have trouble seeing the correct help file materials, e.g. if you see a message such as
  Navigation to the webpage was canceled
the file might have been blocked by security updates in Windows or Internet Explorer. Right-click on nagdoc_fl25.chm in Windows Explorer and select Properties from the pop-up menu. If there is an Unblock button at the bottom click on it to unblock the file and then click on OK to close the Properties dialog box.

In addition the following are provided:

The latter is available from the NAG section of the Start Menu/All apps under
      NAG FLW3225DEL Users' Note
by default.

6. Support from NAG

Please see

http://www.nag.co.uk/support_tech_supp.asp

for information about the NAG Technical Support Service, including details of the NAG Technical Support Service contact points. We would also be delighted to receive your feedback on NAG's products and services.

7. Contact Addresses

Please see

http://www.nag.co.uk/contact_us.asp

for worldwide contact details for the Numerical Algorithms Group.