- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to set the number of BLAS+LAPACK threads but not FFT. The documentation page Threading Control states that I can specifically set the thread number for different domains, but this page only mentions BLAS, not LAPACK. Another page of documentation (MKL_DOMAIN_NUM_THREADS) shows, however, that the MKL_DOMAIN_LAPACK environment variable is available, suggesting that there should be a "LAPACK" domain.
In practice, I experienced that setting the BLAS threads doesn't affect the number of LAPACK threads (e.g., when calculating SVD). I only managed to control the number of threads for the LAPACK functions by setting the number of threads for MKL_DOMAIN_ALL.
Is there any way to change only the number of LAPACK threads during runtime?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the reply with the introduction of your project .
Based on your inputs, we will consider to add the thread setting for MKL_DOMAIN_LAPACK in the future release.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for posting the issue.
You are right, MKL_DOMAIN_LAPACK doesn't enable in C interface yet. Threading Control states correct, another page of documentation (MKL_DOMAIN_NUM_THREADS) should be updated in the future.
Is it sufficient to use MKL_DOMAIN_ALL instead of MKL_DOMAIN_LAPACK ? If not, how important is it for your project to enable set MKL_DOMAIN_LAPACK thread numbers? We would appreciate it if you could share your project information.
Regards,
ruqiu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ruqui,
Thanks for your response. For the specific project through which I encountered the problem, setting MKL_DOMAIN_ALL suffices. Looking at the broader picture, however, it would be nice to have the option of setting MKL_DOMAIN_LAPACK, or at least setting MKL_DOMAIN_LAPACK together with MKL_DOMAIN_BLAS.
I'm working on a research project, and I write codes in Julia programming language. I use a simple Julia package (MKL.jl) that automatically switches the BLAS+LAPACK backend from OpenBLAS to MKL. In Julia, there is a function (BLAS.set_num_threads) that sets the BLAS+LAPACK thread number when OpenBLAS is used, but it can only call mkl_domain_set_num_threads with MKL_DOMAIN_BLAS when MKL is active.
The reason why it is not viable to set MKL_DOMAIN_ALL when BLAS.set_num_threads is called is that there is another Julia package (FFTW.jl) that offers MKL as an optional backend, and this package also has a function that sets the number of threads used by FFT functions...
In my case, I need to set the BLAS/LAPACK/FFTW thread number because part of my program contains nested parallelism. In these parts, I needed to disable BLAS/LAPACK/FFTW threading temporarily, and therefore, setting threads for the "ALL" domain is fine. On the other hand, the lack of controllability of LAPACK threads makes it impossible to write convenient wrappers that allow users to forget about the backends they are using.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the reply with the introduction of your project .
Based on your inputs, we will consider to add the thread setting for MKL_DOMAIN_LAPACK in the future release.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page