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

Numpy linked against MKL not utilizing all cores

Peter_L_4
Beginner
342 Views

Hey Guys,

I'm using MKL to speed up numpy and doing some benchmark of matrix multiplication. Mostly I followed the instruction in https://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl. It works great on my dev Mac machine but when I build it the same way on a ec2 c3.2xlarge instance, only one core is used with the benchmark script. I'm pretty sure it has 8 physical core... 

Has anyone encounter this before or the processor on ec2 doesn't support MKL?

Thanks,

Peter

0 Kudos
1 Reply
VipinKumar_E_Intel
342 Views

Hi Peter,

   I see https://aws.amazon.com/ec2/instance-types/ ec2 c3.2xlarge the details. ( I do not have any experience in using aws).

  Since your build/installation of numpy/scipy with MKL was successful and your benchmark is also running properly with MKL functions, from my understanding, and you mentioned it is using only 1 core,  it may be something related to the threading control is not done for MKL.

You can set the MKL threading environment variables to the number of cores and see whether that helps. Please refer below document. 

    https://software.intel.com/en-us/node/528546

--Vipin

 

 

0 Kudos
Reply