Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

MKL startup latency

Marshall__Michael_B
919 Views

The first time I run code using the MKL for 1D FFTs it is significantly slower than all subsequent runs. I assume there is some sort of DLL load or initialization going on.

Is there any way that I can manually initialize the MKL library?

I am using MKL 10.2.4, Visual Studio 2005, XP Pro SP 3, and I am linking statically except for the openmp library

Thanks,

0 Kudos
3 Replies
Gennady_F_Intel
Moderator
919 Views

Hi,

there is no such possibility for MKL. May be you have the similar cases thatdiscussedin this article?

--Gennady

0 Kudos
Marshall__Michael_B
919 Views

That seems like what I am seeing. I am linking statically against mkl_core, mkl_thread_c, mkl_intel_c, but I have to link dynamically to libiomp5md.

Other calling a dummy FFT function at my application's init time to make sure the DLL is loaded then, is there a quick call that will ensure the DLL is loaded?

0 Kudos
TimP
Honored Contributor III
919 Views
If you are using MKL threaded functions, the OpenMP thread team persists for the time (adjustable by KMP_BLOCKTIME) (default 0.20 seconds) so as to save some of the overhead in OpenMP initialization, should you use the same number of threads again within that interval. The time spent initializing OpenMP the first time presumably depends on the size of your data set and your platform. This would not depend directly on whether you linked the static or dynamic libiomp5.
0 Kudos
Reply