drjrm3
drjrm3

Reputation: 4738

Restrict MKL optimized scipy to single thread

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?

Upvotes: 2

Views: 242

Answers (1)

drjrm3
drjrm3

Reputation: 4738

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

Upvotes: 2

Related Questions