<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to set number of LAPACK threads during runtime? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1640054#M36577</link>
    <description>&lt;P&gt;Hi Ruqui,&lt;/P&gt;&lt;P&gt;Thanks for your response. For the specific project through which I encountered the problem, setting&amp;nbsp;&lt;SPAN&gt;MKL_DOMAIN_ALL suffices.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Looking at the broader picture, however, it would be nice to have the option of setting&amp;nbsp;MKL_DOMAIN_LAPACK, or at least setting&amp;nbsp;MKL_DOMAIN_LAPACK together with&amp;nbsp;MKL_DOMAIN_BLAS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;I'm working on a research project, and I write codes in Julia programming language.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I use a simple Julia package (&lt;A href="https://github.com/JuliaLinearAlgebra/MKL.jl" target="_blank" rel="noopener"&gt;MKL.jl&lt;/A&gt;)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;that automatically switches the BLAS+LAPACK backend from OpenBLAS to MKL. In Julia, there is a function (&lt;A href="https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.BLAS.set_num_threads" target="_self"&gt;BLAS.set_num_threads&lt;/A&gt;) that sets the BLAS+LAPACK thread number when OpenBLAS is used, but it can only call&amp;nbsp;mkl_domain_set_num_threads with MKL_DOMAIN_BLAS when MKL is active.&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;The reason why it is not viable to set&amp;nbsp;MKL_DOMAIN_ALL when&amp;nbsp;BLAS.set_num_threads is called is that there is another Julia package (&lt;A href="https://github.com/JuliaMath/FFTW.jl" target="_self"&gt;FFTW.jl&lt;/A&gt;) that offers MKL as an optional backend, and this package also has a function that sets the number of threads used by FFT functions...&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;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.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2024 19:43:53 GMT</pubDate>
    <dc:creator>hakkelt</dc:creator>
    <dc:date>2024-10-29T19:43:53Z</dc:date>
    <item>
      <title>How to set number of LAPACK threads during runtime?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1638274#M36554</link>
      <description>&lt;P&gt;I want to set the number of BLAS+LAPACK threads but not FFT. The documentation page&amp;nbsp;&lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2024-2/threading-control.html#GUID-BA946DFB-85E7-4289-94AD-311454A6D366" target="_blank" rel="noopener"&gt;Threading Control&lt;/A&gt;&amp;nbsp;states that I can specifically set the thread number for different domains, but this page only mentions BLAS, not LAPACK. Another page of documentation (&lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-windows/2024-2/mkl-domain-num-threads.html" target="_blank" rel="noopener"&gt;MKL_DOMAIN_NUM_THREADS&lt;/A&gt;) shows, however, that the&amp;nbsp;&lt;SPAN&gt;MKL_DOMAIN_LAPACK environment variable is available, suggesting that there should be a "LAPACK" domain.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there any way to change &lt;EM&gt;only&lt;/EM&gt; the number of LAPACK threads &lt;EM&gt;during runtime&lt;/EM&gt;?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 09:22:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1638274#M36554</guid>
      <dc:creator>hakkelt</dc:creator>
      <dc:date>2024-10-21T09:22:34Z</dc:date>
    </item>
    <item>
      <title>Re:How to set number of LAPACK threads during runtime?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1638938#M36558</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: sans-serif; font-size: 16px;"&gt;Thanks for posting the issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: sans-serif; font-size: 16px;"&gt;You are right, MKL_DOMAIN_LAPACK doesn't enable in C interface yet.  &lt;/SPAN&gt;&lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2024-2/threading-control.html#GUID-BA946DFB-85E7-4289-94AD-311454A6D366" rel="noopener noreferrer" target="_blank" style="font-family: sans-serif; font-size: 16px;"&gt;Threading Control&lt;/A&gt;&lt;SPAN style="font-family: sans-serif; font-size: 16px;"&gt;&amp;nbsp;states correct, another page of documentation (&lt;/SPAN&gt;&lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-windows/2024-2/mkl-domain-num-threads.html" rel="noopener noreferrer" target="_blank" style="font-family: sans-serif; font-size: 16px;"&gt;MKL_DOMAIN_NUM_THREADS&lt;/A&gt;&lt;SPAN style="font-family: sans-serif; font-size: 16px;"&gt;) should be updated in the future.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: sans-serif; font-size: 16px;"&gt;Is&amp;nbsp;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: sans-serif; font-size: 16px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: sans-serif; font-size: 16px;"&gt;ruqiu&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Oct 2024 02:35:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1638938#M36558</guid>
      <dc:creator>Ruqiu_C_Intel</dc:creator>
      <dc:date>2024-10-24T02:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to set number of LAPACK threads during runtime?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1640054#M36577</link>
      <description>&lt;P&gt;Hi Ruqui,&lt;/P&gt;&lt;P&gt;Thanks for your response. For the specific project through which I encountered the problem, setting&amp;nbsp;&lt;SPAN&gt;MKL_DOMAIN_ALL suffices.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Looking at the broader picture, however, it would be nice to have the option of setting&amp;nbsp;MKL_DOMAIN_LAPACK, or at least setting&amp;nbsp;MKL_DOMAIN_LAPACK together with&amp;nbsp;MKL_DOMAIN_BLAS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;I'm working on a research project, and I write codes in Julia programming language.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I use a simple Julia package (&lt;A href="https://github.com/JuliaLinearAlgebra/MKL.jl" target="_blank" rel="noopener"&gt;MKL.jl&lt;/A&gt;)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;that automatically switches the BLAS+LAPACK backend from OpenBLAS to MKL. In Julia, there is a function (&lt;A href="https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.BLAS.set_num_threads" target="_self"&gt;BLAS.set_num_threads&lt;/A&gt;) that sets the BLAS+LAPACK thread number when OpenBLAS is used, but it can only call&amp;nbsp;mkl_domain_set_num_threads with MKL_DOMAIN_BLAS when MKL is active.&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;The reason why it is not viable to set&amp;nbsp;MKL_DOMAIN_ALL when&amp;nbsp;BLAS.set_num_threads is called is that there is another Julia package (&lt;A href="https://github.com/JuliaMath/FFTW.jl" target="_self"&gt;FFTW.jl&lt;/A&gt;) that offers MKL as an optional backend, and this package also has a function that sets the number of threads used by FFT functions...&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;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.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 19:43:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1640054#M36577</guid>
      <dc:creator>hakkelt</dc:creator>
      <dc:date>2024-10-29T19:43:53Z</dc:date>
    </item>
    <item>
      <title>Re:How to set number of LAPACK threads during runtime?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1640604#M36592</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: sans-serif;"&gt;Thank you for the reply with the introduction of your project . &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; font-family: sans-serif;"&gt;Based on your inputs, we will consider to add the thread setting for&amp;nbsp;MKL_DOMAIN_LAPACK in the future release.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Nov 2024 05:26:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1640604#M36592</guid>
      <dc:creator>Ruqiu_C_Intel</dc:creator>
      <dc:date>2024-11-01T05:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re:How to set number of LAPACK threads during runtime?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1686084#M37097</link>
      <description>&lt;P&gt;What is the state of this? The documentation for 2025.1 is still contradictory about it. &lt;A href="https://github.com/JuliaLinearAlgebra/libblastrampoline/issues/151" target="_blank"&gt;https://github.com/JuliaLinearAlgebra/libblastrampoline/issues/151&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2025 18:39:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1686084#M37097</guid>
      <dc:creator>VinceNeede1</dc:creator>
      <dc:date>2025-04-28T18:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Re:How to set number of LAPACK threads during runtime?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1688569#M37133</link>
      <description>&lt;P&gt;The addition of thread setting for MKL_DOMAIN_LAPACK is on track to be added in the 2025.2 release&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 19:31:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-set-number-of-LAPACK-threads-during-runtime/m-p/1688569#M37133</guid>
      <dc:creator>Rahim_H_Intel</dc:creator>
      <dc:date>2025-05-08T19:31:01Z</dc:date>
    </item>
  </channel>
</rss>

