Developer Guide

Developer Guide for Intel® oneAPI Math Kernel Library Windows*

ID 766692
Date 11/07/2023
Public

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

Document Table of Contents

Linking with Compiler Run-time Libraries

Dynamically link libiomp5 or tbb library even if you link other libraries statically.

Linking to the libiomp5 statically can be problematic because the more complex your operating environment or application, the more likely redundant copies of the library are included. This may result in performance issues (oversubscription of threads) and even incorrect results.

To link libiomp5 or tbb dynamically, be sure the PATH environment variable is defined correctly.

Sometimes you may improve performance of your application with threaded Intel® oneAPI Math Kernel Library (oneMKL) by using the/MT compiler option. The compiler driver will pass the option to the linker and the latter will load multi-thread (MT) static run-time libraries.

However, to link a Vector Mathematics (VM) application that uses the errno variable for error reporting, compile and link your code using the option that depends on the linking model:

  • /MTfor linking with static Intel® oneAPI Math Kernel Library (oneMKL) libraries

  • /MDfor linking with dynamic Intel® oneAPI Math Kernel Library (oneMKL) libraries