Community
cancel
Showing results for 
Search instead for 
Did you mean: 
60 Views

MKL startup latency

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
60 Views

Hi,

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

--Gennady

60 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?

TimP
Black Belt
60 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.
Reply