MKL multi-threading

MKL multi-threading

Hi:
I'm wondering how do I enable the multi-threaded execution of BLAS operations using MKL. The website says it's no effort work, do I need to set some flags when compiling or linking? Does MKL apply some thresholding on the size to determine when to MT and when not?
Thanks
XW

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hello,
Sorry it took so long to respond to your question. Migrating to the new forum software was bumpier than expected.

MKL uses OpenMP for threading. To take advantage of threaded MKL functions, simply set the OMP_NUM_THREADS environment variable to a value greater than one. It's usually best to set OMP_NUM_THREADS less than or equal to the number of processors in your system.

MKL does have internal thresholds to determine whether to perform a computation in parallel or serial. You can also apply your own thresholdsusing the OpenMP API, specifically theomp_set_num_threads function. The online technical notes havesome additional information about MKL parallelism.

Please let us know if you have any other questions.

Best regards,
Henry

Message Edited by MADhagabb on 12-11-2003 02:44 PM

Leave a Comment

Please sign in to add a comment. Not a member? Join today