Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Math Libraries

The Intel® Fortran Compiler includes the following math libraries:

Library

OS Support

Description

libimf.a

Linux* and macOS

Intel® Fortran Compiler Classic and Intel® Fortran Compiler Math Libraries, in addition to libm.a, the math library provided with gcc*

Both of these libraries are linked in by default because certain math functions supported by the GNU* math library are not available in the Intel® Fortran Compiler Classic and Intel® Fortran Compiler Math Library. This linking arrangement allows the GNU users to have all functions available when using ifort, with Intel optimized versions available when supported.

libimf.a is linked in before libm.a. If you link in libm.a first, it will change the versions of the math functions that are used.

Many routines in the libimf library are more optimized for Intel® microprocessors than for non-Intel microprocessors.

libm.lib (static library) and libmmd.dll (the DLL version)

Windows*

Math Libraries provided by Intel.

Many routines in the libimf library are more optimized for Intel® microprocessors than for non-Intel microprocessors.

Intel® Math Kernel Library (Intel® MKL)

Linux, macOS , Windows

Math library of Fortran routines and functions that perform a wide variety of operations on vectors and matrices. The library also includes fast Fourier transform (fft) functions, as well as vector mathematical and vector statistical functions. For more information, see Using Intel® Performance Libraries with Microsoft Visual Studio* and the Intel® Math Kernel Library documentation.

NOTE:

It is strongly recommended to use the default rounding mode (round-to-nearest-even) when calling math library transcendental functions and compiling with default optimization or higher. Faster implementations (in terms of latency and/or throughput) of these functions are validated under the default round-to-nearest-even mode. Using other rounding modes may make results generated by these faster implementations less accurate, or set unexpected floating-point status flags. This behavior may be avoided by -no-fast-transcendentals, which disables calls to the faster implementations of math functions, or by -fp-model strict, which warns the compiler that it cannot assume default settings for the floating-point environment.

Many routines in the Math Library are more optimized for Intel® microprocessors than for non-Intel microprocessors.

NOTE:
The Intel Compiler Math Libraries contain performance-optimized implementations for various Intel platforms. By default, the best implementation for the underlying hardware is selected at runtime. The library dispatch of multi-threaded code may lead to apparent data races, which may be detected by certain software analysis tools. However, as long as the threads are running on cores with the same CPUID, these data races are harmless and are not a cause for concern.

Product and Performance Information

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.

Notice revision #20201201