Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

compile code with /MT option?

knowdat
Beginner
914 Views

In the user's guide for mkl 10 on chapter5 page 7, it says, "To use threaded Intel MKL, it is highly recommended to compile your code with the /MT option. The compiler driver will pass the option to the linker and the latter will load multi-thread (MT) run-time libraries."

As a background, I'm compiling a static fortran lib and linking that into a c++ dll compiled with visual studio, /MD, and libguide40.dll. What is the benefit to compiling the c++ code with /MT vs /MD?

Thank you,
Jon
0 Kudos
1 Reply
TimP
Honored Contributor III
914 Views
/MT ought to be smaller, perhaps faster,than /MD, but the latter should have better diagnostics, if you are trying to trace events which occur ina Microsoftlibrary. I don't think that comment in the user's guide distinguishes between /MD and /MT; rather, it is meant to warn against mixing non-thread-safe libraries of past Microsoft 32-bit compilers with threaded code.
0 Kudos
Reply