Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
6743 Discussions

Multicore performance drop under Windows x64

lajszlo
Beginner
248 Views
I'm using MKL for matrix multiplication (cblas_sgemm function) under 64-bit Windows. This far I'been using 32-bit code, and -- according to the Windows Task Manager -- my routine exploited both my cores to 100%. Now I compiled a 64-bit version from the code, and now Windows Task Manager shows only 50-60% processor use. interestingly, one of the cores is used at about 80%, and the other one about 20% (compared to the earlier 100%-100%). Is there anything I can do to have the same performance with the 64-bit version than with the 32-bit version?
Thanks a lot,
0 Kudos
1 Solution
Gennady_F_Intel
Moderator
248 Views

No, that not correct. You are using non-threaded libraries. Please try to use,

mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.liblibiomp5md.lib

as an examplefor static linking with supporting LP64 interface.

For more info, please refer to the Users Guide or see here the Linker Adviser.

View solution in original post

6 Replies
TimP
Black Belt
248 Views
It looks like you're getting just one thread. This would be expected MKL default behavior if you run on a single core HyperThreaded CPU. In case the OS is confusing MKL into thinking you have a single core when you have dual, does MKL_DYNAMIC help?
Windows 7 is said to have scheduling improvements over earlier versions of Windows X64.
lajszlo
Beginner
248 Views
You are right, the 32-bit executable has 3 threads (according to Task Manager), while the 64-bit version has only 1 thread. I forgot to mention that I have Windows XP 64-bit version.
I'm absolutely not familiar with threading in MKL. I added the following two lines to my code:
mkl_set_dynamic(0);
mkl_set_num_threads(2, MKL_BLAS);
but nothing has changed, still there is only one thread. Do you mean this or something else by "does MKL_DYNAMIC help"?
Thanks
Gennady_F_Intel
Moderator
248 Views
Which libraries do you use for linking application?
lajszlo
Beginner
248 Views
I'm using MKL 10.1.1.022. For the 32-bit version (which works fine) I link mkl_c.lib, mkl_sequential.lib, libiomp5md.lib from the ia32\lib directory. For the x64 version there is no mkl_c.lib in the em64t\lib directory, so I link mkl_core.lib, mkl_intel_lp64.lib, mkl_sequential.lib, libiomp5md.lib. Is that OK? Thanks.
Gennady_F_Intel
Moderator
249 Views

No, that not correct. You are using non-threaded libraries. Please try to use,

mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.liblibiomp5md.lib

as an examplefor static linking with supporting LP64 interface.

For more info, please refer to the Users Guide or see here the Linker Adviser.

lajszlo
Beginner
248 Views
This solved the problem, thanks a lot!!
Reply