- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to use the parallel version of sgemm, but no matter how many threads I set to use, the program runs on one core only (on a 12-core westmere). Can anyone help me?
I am using Intel Compiler 11.1.073, and my makefile is:
icc -o blassgemm blassgemm.c -openmp -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_lapack -lmkl_core -liomp5 -lpthread
I set the number of threads using mkl_set_num_threads.
Thanks,
Jacky
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you also tell us what are the values for the thread control env variables like, MKL_SET_NUM_THREADS, MKL_DYNAMIC etc?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didn't set MKL_SET_NUM_THREADS. Instead, I set OMP_NUM_THREADS to 4 and in the program I used mkl_set_num_threads(4).
Do I still need to set MKL_SET_NUM_THREADS and MKL_DYNAMIC? Thanks.
Do I still need to set MKL_SET_NUM_THREADS and MKL_DYNAMIC? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you leave MKL_DYNAMIC unset, MKL will be limited to 1 thread per core, as this normally gives best performance. If your problem isn't large enough to use all cores, MKL would automatically choose a smaller number. When you call omp_set_num_threads or mkl_set_num_threads in your program, that over-rides the environment variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
what is the task size are you trying to solve?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That seems to solve my problem. Thanks a lot!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page