Restrict MKL optimized scipy to single thread

249 views Asked by At

I just installed a intel MKL optimized version of scipy and when running my benchmarks, I got remarkable speedup with it. I then looked closer and found out it was running on 20 cores ... how do I restrict it to single threaded mode? Is there a way I could have installed it to single threaded mode by default, while leaving the option open to run on a specified number of cores?

1

There are 1 answers

0
drjrm3 On BEST ANSWER

Upon further investigation it looks you are able to set the environment variable MKL_NUM_THREADS to achieve this.