<?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: Re:CPU usage in pardiso in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1575355#M35875</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;then it looks like a problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which version of oneMKL do you use?&lt;/P&gt;
&lt;P&gt;and how did you link against oneMKL?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2024 09:33:26 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2024-02-26T09:33:26Z</dc:date>
    <item>
      <title>CPU usage in pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1572254#M35826</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my application, I use the pardiso_64 function to solve a sparse matrix.&lt;/P&gt;&lt;P&gt;I have a problem&amp;nbsp; where the CPU usage is always 100% regardless of the value set for the number of threads.&lt;/P&gt;&lt;P&gt;Before the pardiso function was called, mkl_set_num_threads( n ); was called to set the number of threads to 'n'.&amp;nbsp;&amp;nbsp;I monitored the CPU usage using the task manager in Windows and found that the usage is 100% even when n is 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also used the environment variable "MKL_NUM_THREADS" for comparison.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MKL_NUM_THREADS&amp;nbsp; /&amp;nbsp; n&amp;nbsp; /&amp;nbsp; cpu usage&lt;/P&gt;&lt;P&gt;not set / 1 / 100%&lt;/P&gt;&lt;P&gt;1 / 1 / 20%&lt;/P&gt;&lt;P&gt;1 / 8 / 100%&lt;/P&gt;&lt;P&gt;8 / 1 / 100%&lt;/P&gt;&lt;P&gt;8 / 8 / 100%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as I know, regardless of the value of MKL_NUM_THREADS, the number of threads is set to the value in the mkl_set_num_threads function. But, this looks like using the larger of the two values as the number of threads.&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 11:31:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1572254#M35826</guid>
      <dc:creator>kwjung</dc:creator>
      <dc:date>2024-02-14T11:31:22Z</dc:date>
    </item>
    <item>
      <title>Re:CPU usage in pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1574430#M35860</link>
      <description>&lt;P&gt;Hi Kwangog,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;When you call mkl’s routine and environment variable both at the same time, then routine has larger priority vs environment variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;Wrt CPU usage: you might initialize message level parameter ( msglvl == 1 ) which is switch off by the default &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;and check how many threads has been used in the real case with the real workloads. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;This is the only way to choose how MKL Pardiso uses available CPU resources. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;Example: &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;Calling MKL Pardiso with 1 thread – we could see as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;Statistics:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;===========&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;Parallel Direct Factorization is running on &lt;/SPAN&gt;&lt;STRONG style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;1 OpenMP&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;And /Or when we run with the default number of OpenMP threads ( Sapphire Rapids CPU, 112 physical cores )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;Statistics:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;===========&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;Parallel Direct Factorization is running on&lt;/SPAN&gt;&lt;STRONG style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt; 112 OpenMP&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;The full logs I added to this treads when running the 503712 x 503712 input with &amp;nbsp;18660027&amp;nbsp;nnz.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: &amp;quot;IntelOne Text&amp;quot;, sans-serif;"&gt;--Gennady&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Feb 2024 08:25:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1574430#M35860</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2024-02-22T08:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Re:CPU usage in pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1574432#M35861</link>
      <description>&lt;P&gt;forget to add logs when running inline.mtx workloads with 1 and 112 threads.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 08:29:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1574432#M35861</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2024-02-22T08:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Re:CPU usage in pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1575311#M35869</link>
      <description>&lt;P&gt;Hello Gennady,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I set msglvl to 1 and tried running my program.&lt;/P&gt;&lt;P&gt;This is part of my code:&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;cout &amp;lt;&amp;lt; "num threads : " &amp;lt;&amp;lt; nthread_smp &amp;lt;&amp;lt; endl;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;mkl_set_num_threads(nthread_smp);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PARDISO_64(pardiso_handle, &amp;amp;maxfct, &amp;amp;mnum, &amp;amp;mtype, &amp;amp;phase,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;amp;nrow64, Value_CSR, vSptJac, vColIndexGlobal, &amp;amp;perm[0], &amp;amp;idum,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;pardiso_iparm, &amp;amp;msglvl, &amp;amp;ddum, &amp;amp;ddum, &amp;amp;error);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I have attached the result printed.&lt;/P&gt;&lt;P&gt;The value of "nthread_smp" printed on cout is 1.&lt;/P&gt;&lt;P&gt;However, the number of OpenMP threads output by the pardiso function seems to be 6.&lt;/P&gt;&lt;P&gt;Is there something wrong?&lt;/P&gt;&lt;P&gt;If needed, I'll create reproducible code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 07:15:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1575311#M35869</guid>
      <dc:creator>kwjung</dc:creator>
      <dc:date>2024-02-26T07:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re:CPU usage in pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1575344#M35872</link>
      <description>&lt;P&gt;I couldn't reproduce such behavior on Lin* OS with my local test suite. Could you give us yours case to check?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you really run with #rhs ~50 mln?&lt;/P&gt;
&lt;PRE class="bp-text bp-text-plain hljs bp-is-scrollable" tabindex="0"&gt;&lt;CODE class="bp-text-code txt"&gt;number of right-hand sides:    49229824&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Feb 2024 09:04:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1575344#M35872</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2024-02-26T09:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Re:CPU usage in pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1575353#M35874</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello Gennady,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;An uninitialized value was used for "nrhs".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This probably wasn't an issue during the reordering phase, as the value would not have been used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, I still have the same problem even when I set the correct value.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I've also tested it on Linux and didn't get any problems.&lt;/P&gt;&lt;P&gt;This seems to be an issue with Windows.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 09:26:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1575353#M35874</guid>
      <dc:creator>kwjung</dc:creator>
      <dc:date>2024-02-26T09:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Re:CPU usage in pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1575355#M35875</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;then it looks like a problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which version of oneMKL do you use?&lt;/P&gt;
&lt;P&gt;and how did you link against oneMKL?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 09:33:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1575355#M35875</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2024-02-26T09:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Re:CPU usage in pardiso</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1575400#M35876</link>
      <description>&lt;P&gt;Hello Gennady,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using version 2023.1 (included in oneAPI 2023.1).&lt;/P&gt;&lt;P&gt;However, I was using the version shared from internal repository, not the one I installed from Intel.&lt;/P&gt;&lt;P&gt;To check if it was an installation issue, I installed and linked to OneAPI 2023.1&amp;nbsp;directly.&lt;/P&gt;&lt;P&gt;Fortunately, the issue was resolved. It was probably a internal package problem.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 12:39:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/CPU-usage-in-pardiso/m-p/1575400#M35876</guid>
      <dc:creator>kwjung</dc:creator>
      <dc:date>2024-02-26T12:39:09Z</dc:date>
    </item>
  </channel>
</rss>

