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

Fast poisson solver threading control

Nafees_B_
Beginner
275 Views

I'm trying to control the number of threads used by the fast poisson solver *_Helmholtz_3D.  The code is compiled with -tbb and -mkl, and I'm using tbb::task_scheduler_init() function to control the thread count.  However, this solver seem to be multithreaded regardless of the number of threads I tell tbb to use.  How can I control this?

MKL Version 11.3.2
ICPC Version 2016.2.062

Thanks!

0 Kudos
1 Reply
Ying_H_Intel
Employee
275 Views

Hi Nafees,

As I understand,  in your case  -tbb and -mkl,  there are two kind of thread methods:

 tbb,

and

OpenMP (-mkl, by default mkl routine will use OpenMP thread)

tbb::task_scheduler_init() function to control the thread count.  but it can't control the thread within MKL routine.

How about you to try

>export KMP_AFFINITY= verbose

>export OMP_NUM_THREADS=1 (Linux)

or set OMP_NUM_THREADS=1 (windows)

and see if there is any change.

Best Regards,

Ying

 

0 Kudos
Reply