- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the MKL User's Guide, Managing Performance and Memory, I find this:
Note that a number of other LAPACK routines, which are based on threaded LAPACK or
BLAS routines, make effective use of parallelism: *gesv, *posv, *gels, *gesvd,
*syev, *heev, etc.
I would expect, then, to be able to see multiple cores running when I call sgesvd_, but I don't. Is there some gotcha?
Our application uses Windows OS threading in places, but the particular place where sgesvd_ is called is running from the main thread and there are no other active computational threads.
Any advice would be gratefully appreciated!
Thanks,
John Weeks
WaveMetrics, Inc.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi John, What is the size of the matrix with which you work?
--Gennady
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-John Weeks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi John,
This is abigenought size for use of parallism.
If you don't see that MKL creates threads, this means that for some reasonmkl runs sequential code.For example it could be calling the function from OpenMPparallel region like below expecting nested parallelism:
#pragma omp parallel {
...
#pragma omp single {
sgesvd(...);
}
}
Workaround: use mkl_set_num_threads(the_number_of_threads_desired) andmkl_set_dynamic(false).Some details arehere.
You also could diagnose maximal amount of threads for MKL by calling mkl_get_max_threads() befor your MKL call.
Other reasons for runing sequential code branch if threaded library is linked and MKL_DYNAMIC=true(default) could be: single core machine(even with HT), too small problems size(not the case and problem dependent), environment variables OMP_NUM_THREADS=1 orMKL_NUM_THREADS=1.
Regards,
Alexander.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The matrix I was testing (provided by a customer) is so big that the initial stage takes a very long time- like more than an hour!
-John
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page