<?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 Using MKL with MKL_NUM_THREADS=1 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-MKL-with-MKL-NUM-THREADS-1/m-p/1652980#M36782</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use MKL to calculate on one core only, but within the cycle working in OpenMP parallel regime.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Program A


!OMP PARALLEL DO
 do k=1,N2
  ...
  call getrf(A,ipiv)         ! MKL subroutine to work on one core 
  call getrs(A,ipiv,B)       ! MKL subroutine to work on one core
  ...
 enddo
!OMP END PARALLEL DO&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;In job submission script I set&amp;nbsp;&lt;/P&gt;&lt;P&gt;export OMP_NUM_THREADS=2&lt;/P&gt;&lt;P&gt;export MKL_NUM_THREADS=1&lt;/P&gt;&lt;P&gt;However this gives an error in MKL subroutines!&lt;/P&gt;&lt;P&gt;When I submit the job on one core only (OMP_NUM_THREADS=1) the MKL subroutines work correctly.&lt;/P&gt;&lt;P&gt;How to ask MKL library to calculate on one core correctly when the program runs in OpenMP parallel regime?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Dec 2024 01:13:40 GMT</pubDate>
    <dc:creator>DmitrySkachkov</dc:creator>
    <dc:date>2024-12-30T01:13:40Z</dc:date>
    <item>
      <title>Using MKL with MKL_NUM_THREADS=1</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-MKL-with-MKL-NUM-THREADS-1/m-p/1652980#M36782</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use MKL to calculate on one core only, but within the cycle working in OpenMP parallel regime.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Program A


!OMP PARALLEL DO
 do k=1,N2
  ...
  call getrf(A,ipiv)         ! MKL subroutine to work on one core 
  call getrs(A,ipiv,B)       ! MKL subroutine to work on one core
  ...
 enddo
!OMP END PARALLEL DO&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;In job submission script I set&amp;nbsp;&lt;/P&gt;&lt;P&gt;export OMP_NUM_THREADS=2&lt;/P&gt;&lt;P&gt;export MKL_NUM_THREADS=1&lt;/P&gt;&lt;P&gt;However this gives an error in MKL subroutines!&lt;/P&gt;&lt;P&gt;When I submit the job on one core only (OMP_NUM_THREADS=1) the MKL subroutines work correctly.&lt;/P&gt;&lt;P&gt;How to ask MKL library to calculate on one core correctly when the program runs in OpenMP parallel regime?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 01:13:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-MKL-with-MKL-NUM-THREADS-1/m-p/1652980#M36782</guid>
      <dc:creator>DmitrySkachkov</dc:creator>
      <dc:date>2024-12-30T01:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using MKL with MKL_NUM_THREADS=1</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-MKL-with-MKL-NUM-THREADS-1/m-p/1652986#M36785</link>
      <description>&lt;P&gt;For using oneMKL + OpenMP threading, we recommend you use intel OpenMP -liomp5 link option. For example,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;${MKLROOT}/lib/libmkl_blas95_ilp64.a ${MKLROOT}/lib/libmkl_lapack95_ilp64.a -Wl,--start-group ${MKLROOT}/lib/libmkl_intel_ilp64.a ${MKLROOT}/lib/libmkl_intel_thread.a ${MKLROOT}/lib/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl&lt;/P&gt;
&lt;P&gt;More advisor, please check&amp;nbsp;&lt;A href="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.htm" target="_self"&gt;onemkl-link-line-advisor&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 01:44:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-MKL-with-MKL-NUM-THREADS-1/m-p/1652986#M36785</guid>
      <dc:creator>Ruqiu_C_Intel</dc:creator>
      <dc:date>2024-12-30T01:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using MKL with MKL_NUM_THREADS=1</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-MKL-with-MKL-NUM-THREADS-1/m-p/1652996#M36787</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;With this options MKL works as necessary, in OpenMP regime MKL subroutine runs on one core without errors.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 03:23:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-MKL-with-MKL-NUM-THREADS-1/m-p/1652996#M36787</guid>
      <dc:creator>DmitrySkachkov</dc:creator>
      <dc:date>2024-12-30T03:23:45Z</dc:date>
    </item>
  </channel>
</rss>

