<?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 CPU usage 100% during MPI blocking communication waiting in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1289107#M8419</link>
    <description>&lt;P&gt;&lt;SPAN&gt;In my program, according to the user input, the master process will broadcast data to other worker processes to do computation, after one time computation, the worker processes will wait for new data once again and do the corresponding computation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Worker processes&amp;nbsp; use a do-while loop to keep receiving data from master like this,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;int master_rank =0
int mycmd;
if(my_rank==master_rank )
{
  //wait for user input
  //accept input command
  MPI_Bcast(&amp;amp;mycmd, 1, MPI_INT, master_rank, MPI_COMM_WORLD);  ​
  //do some work
}
else
{
  MPI_Bcast(&amp;amp;mycmd, 1, MPI_INT, master_rank, MPI_COMM_WORLD);
  switch (mycmd)
  {
    case  1:
       // do some work
       break;
    case 2:
       // do some work
       break;
    default:
       std::cout &amp;lt;&amp;lt; "myrank:" &amp;lt;&amp;lt; my_rank &amp;lt;&amp;lt; "Unknown command:" &amp;lt;&amp;lt; mycmd &amp;lt;&amp;lt; std::endl;
       break;

  }
} &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;However, even during waiting for user input, the worker processes will keep 100% cpu running, which make&amp;nbsp; PC too hot.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;After research in web, I found the following parameters can decrease cpu usage ratio,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I_MPI_WAIT_MODE=0&lt;BR /&gt;I_MPI_THREAD_YIELD=3&lt;BR /&gt;I_MPI_THREAD_SLEEP=10&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But this also make computation itself become low performance, that is absolutely not what I want .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Does intel MPI library provide some equivalent function to control the MPI behavior during running? just like openmp's&amp;nbsp; &amp;nbsp;omp_set_xxx function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your help.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jun 2021 13:53:47 GMT</pubDate>
    <dc:creator>yinyin</dc:creator>
    <dc:date>2021-06-11T13:53:47Z</dc:date>
    <item>
      <title>CPU usage 100% during MPI blocking communication waiting</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1289107#M8419</link>
      <description>&lt;P&gt;&lt;SPAN&gt;In my program, according to the user input, the master process will broadcast data to other worker processes to do computation, after one time computation, the worker processes will wait for new data once again and do the corresponding computation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Worker processes&amp;nbsp; use a do-while loop to keep receiving data from master like this,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;int master_rank =0
int mycmd;
if(my_rank==master_rank )
{
  //wait for user input
  //accept input command
  MPI_Bcast(&amp;amp;mycmd, 1, MPI_INT, master_rank, MPI_COMM_WORLD);  ​
  //do some work
}
else
{
  MPI_Bcast(&amp;amp;mycmd, 1, MPI_INT, master_rank, MPI_COMM_WORLD);
  switch (mycmd)
  {
    case  1:
       // do some work
       break;
    case 2:
       // do some work
       break;
    default:
       std::cout &amp;lt;&amp;lt; "myrank:" &amp;lt;&amp;lt; my_rank &amp;lt;&amp;lt; "Unknown command:" &amp;lt;&amp;lt; mycmd &amp;lt;&amp;lt; std::endl;
       break;

  }
} &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;However, even during waiting for user input, the worker processes will keep 100% cpu running, which make&amp;nbsp; PC too hot.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;After research in web, I found the following parameters can decrease cpu usage ratio,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I_MPI_WAIT_MODE=0&lt;BR /&gt;I_MPI_THREAD_YIELD=3&lt;BR /&gt;I_MPI_THREAD_SLEEP=10&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But this also make computation itself become low performance, that is absolutely not what I want .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Does intel MPI library provide some equivalent function to control the MPI behavior during running? just like openmp's&amp;nbsp; &amp;nbsp;omp_set_xxx function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your help.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 13:53:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1289107#M8419</guid>
      <dc:creator>yinyin</dc:creator>
      <dc:date>2021-06-11T13:53:47Z</dc:date>
    </item>
    <item>
      <title>Re:CPU usage 100% during MPI blocking communication waiting</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1289618#M8426</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;&lt;P&gt;We are working on your issue and we will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Jun 2021 11:53:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1289618#M8426</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2021-06-14T11:53:22Z</dc:date>
    </item>
    <item>
      <title>Re:CPU usage 100% during MPI blocking communication waiting</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1290375#M8447</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you please provide us the sample &lt;B&gt;reproducer&lt;/B&gt; code along with the &lt;B&gt;commands&lt;/B&gt; you used to compile and run?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&amp;gt;&amp;gt;"I_MPI_THREAD_SLEEP=10"&lt;/I&gt;&lt;/P&gt;&lt;P&gt;As the sleep time increases, there will be a drop in performance. So try to reduce sleep time in order to enhance the performance.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&amp;gt;&amp;gt;"Does intel MPI library provide some equivalent function to control the MPI behavior during running? just like openmp's&amp;nbsp;&amp;nbsp;omp_set_xxx function."&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Could you please elaborate on what kind of MPI behavior to control?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Jun 2021 13:23:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1290375#M8447</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2021-06-16T13:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Re:CPU usage 100% during MPI blocking communication waiting</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1290449#M8449</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Santosh&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Maybe my description was not clear.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; I want to make an emphasize that&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;- I DO want to drop/decrease response performance during waiting procedure&amp;nbsp; by setting I_MPI_THREAD_SLEEP a big value.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;- But once the worker processes receive the command(which is broadcast from master process), these worker processes should run&amp;nbsp; the computing procedure at their full power, where a zero&amp;nbsp; &amp;nbsp;I_MPI_THREAD_SLEEP is wanted.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I wonder if I can adjust&amp;nbsp;&amp;nbsp;I_MPI_THREAD_SLEEP during program running.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Expecting&amp;nbsp; your reply.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 18:19:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1290449#M8449</guid>
      <dc:creator>yinyin</dc:creator>
      <dc:date>2021-06-16T18:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: CPU usage 100% during MPI blocking communication waiting</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1291026#M8466</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;"&lt;SPAN class="sub_section_element_selectors"&gt;I wonder if I can adjust&amp;nbsp;&amp;nbsp;I_MPI_THREAD_SLEEP during program running&lt;/SPAN&gt;"&lt;BR /&gt;We can not adjust&amp;nbsp;&lt;SPAN class="sub_section_element_selectors"&gt;I_MPI_THREAD_SLEEP during program running.&amp;nbsp;&lt;/SPAN&gt;Please find more information regarding usage of I_MPI_THREAD_SLEEP from the below link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-reference-linux/top/environment-variable-reference/other-environment-variables.html#other-environment-variables_GUID-A0217433-9A3A-42BC-A27E-C5F555026F23" target="_blank" rel="noopener"&gt;https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-reference-linux/top/environment-variable-reference/other-environment-variables.html#other-environment-variables_GUID-A0217433-9A3A-42BC-A27E-C5F555026F23&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We need more information to investigate your issue.&lt;/P&gt;
&lt;P&gt;So, Could you please provide us the sample&amp;nbsp;reproducer&amp;nbsp;code along with the&amp;nbsp;commands&amp;nbsp;you used to compile and run?"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&amp;gt;&amp;gt;"Does intel MPI library provide some equivalent function to control the MPI behavior during running? just like openmp's&amp;nbsp;&amp;nbsp;omp_set_xxx function."&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;Could you please elaborate on what kind of MPI behavior to control?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 06:49:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1291026#M8466</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2021-09-09T06:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: CPU usage 100% during MPI blocking communication waiting</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1293228#M8495</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;We have not heard back from you. Could you please provide the details that have been asked in my previous post?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 05:51:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1293228#M8495</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2021-09-09T05:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: CPU usage 100% during MPI blocking communication waiting</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1293411#M8500</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Santosh&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I haven't solved this. Sorry for my late response.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I will give a minimal program to show this issue in several days.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please keep tracking my issue.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;B.R.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;YIN&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 21:04:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1293411#M8500</guid>
      <dc:creator>yinyin</dc:creator>
      <dc:date>2021-06-25T21:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: CPU usage 100% during MPI blocking communication waiting</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1295398#M8529</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have not heard back from you. Could you please provide us the sample&amp;nbsp;reproducer&amp;nbsp;code along with the&amp;nbsp;commands&amp;nbsp;you used to compile and run?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 05:53:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1295398#M8529</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2021-09-09T05:53:31Z</dc:date>
    </item>
    <item>
      <title>Re:CPU usage 100% during MPI blocking communication waiting</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1297304#M8579</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&amp;gt;&amp;gt;"I will give a minimal program to show this issue in several days.Please keep tracking my issue."&lt;/I&gt;&lt;/P&gt;&lt;P&gt;We have been waiting for your response. But we haven't heard back from you. Can you  provide the reproducer code along with the commands you used to encounter the issue. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Jul 2021 12:09:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1297304#M8579</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2021-07-09T12:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: CPU usage 100% during MPI blocking communication waiting</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1301873#M8637</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As we haven't heard back from you, we are closing this thread for now. However, feel free to raise a new query whenever you can provide us a sample reproducer as this thread will no longer be monitored.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a Good day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 11:35:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/CPU-usage-100-during-MPI-blocking-communication-waiting/m-p/1301873#M8637</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2021-07-29T11:35:31Z</dc:date>
    </item>
  </channel>
</rss>

