Linking with Compiler Run-time
Libraries
Dynamically link
libiomp5
or
library even if you link other libraries statically.
tbb
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
dynamically, be sure the
tbb
PATH
environment variable is defined correctly.
Sometimes you may improve performance of your application with threaded by using the
Intel® oneAPI Math Kernel Library
/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 staticlibrariesIntel® oneAPI Math Kernel Library
- /MDfor linking with dynamiclibrariesIntel® oneAPI Math Kernel Library