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
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.