Quantcast
Channel: Intel® Software - Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 3005

How do I get the current number of MKL threads

$
0
0

Hi, I'm trying to make a section of code that runs with a certain number of MKL threads without affecting the number of MKL threads used in other sections of the code. To do this I want to store the status of the MKL_DYNAMIC and the MKL_NUM_THREADS parameters at a given moment in time.

I know that I can use the calls mkl_set_num_threads and mkl_set_dynamic to define the number of threads used by MKL, and that there's a mkl_get_dynamic() call, however there's no mkl_get_num_threads(), there's only a mkl_get_max_threads(). 

Why is it a max and not a num? Is there a way to get the current number of mkl threads? Is it reliable to use the omp_get_num_threads to know this?

Thanks for your help.

 

Viewing all articles
Browse latest Browse all 3005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>