- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I've run openmp code using 8 cores, and I've compiled with -mkl tag.
My openmp code calculates simultaneously each job.(calculation of each thread contain MKL function - dgemm)
Then, I wonder how MKL thread is generated for openmp job.
For example, I use 8 omp_threads for 8 cores(8 calculation run simultaneously, and 8 MKL function run simultaneously)
=> How MKL thread number is generated?(I know that MKL is based on OpenMP threads.)
Only one mkl thread per each one omp thread?
(I've checked this using VTUNE, and it's look like mkl is generated only thread each openmp thread in this case.)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you call MKL from an OpenMP parallel region, but don't set OMP_NESTED, the MKL functions will not generate additional threads. You could have used the -mkl sequential link option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank Tim
I've compiled only using -mkl(using parallel studio 2013), and I didn't use OMP_NESTED keyword in my codes.
You mean that my case
-mkl is equal to mkl=sequential ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, -mkl defaults to threaded. If you want sequential, you must specify it.
As I said, the OpenMP library itself should prevent threaded MKL from starting additional threads inside a parallel region unless OMP_NESTED is set. So it should not make a great deal of difference.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page