<?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 My code is still not working in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937734#M2657</link>
    <description>My code is still not working as I want. My code uses both OpenMP and MPI. I want to do this:

- Start up the code. Put all ranks &amp;gt;0 on barrier and rank 0 stars to work.
- While all other ranks are on the barrier, rank 0 uses multiple OpenMP threads.
- Rank 0 finshes its job, reaches the barrier and all ranks start to work. Each rank uses one thread.
- Work finishes. Ranks &amp;gt;0 loop back to the barrier and rank 0 does more work with OpenMP.

The problem is rank 0 will only launch one OpemMP thread. I then omp_set_num_threads(8) on rank 0. It launches 8 threads, but they are confined to one processor.

So, basically, I want rank 0 to be able to use all 8 processors with OpenMP while the other ranks are on the barrier. Is it possible?</description>
    <pubDate>Tue, 30 Oct 2012 17:10:14 GMT</pubDate>
    <dc:creator>italo1337</dc:creator>
    <dc:date>2012-10-30T17:10:14Z</dc:date>
    <item>
      <title>MPI_Barrier using 100% CPU</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937730#M2653</link>
      <description>&lt;P&gt;In my code, I put all ranks &amp;gt; 0 in a MPI_Barrier while rank 0 does some processing. But while on the barrier, the processes are consuming 100% of the processor.&lt;/P&gt;
&lt;P&gt;Below is a sample code. Rank zero consumes 0% while on scanf but all other ranks consume 100% while on the barrier.&lt;/P&gt;
&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;#include &amp;lt;mpi.h&amp;gt;&lt;BR /&gt;&lt;BR /&gt;int main(int argc, char **argv) {&lt;BR /&gt;&lt;BR /&gt;int rank;&lt;BR /&gt;int dummy;&lt;BR /&gt;&lt;BR /&gt;MPI_Init(&amp;amp;argc, &amp;amp;argv);&lt;BR /&gt;&lt;BR /&gt;MPI_Comm_rank(MPI_COMM_WORLD, &amp;amp;rank);&lt;BR /&gt;&lt;BR /&gt;printf("MPI rank %i reporting in.\n", rank);&lt;BR /&gt;&lt;BR /&gt;if ( rank == 0 ) {&lt;BR /&gt;&lt;BR /&gt;printf("waiting for input\n");&lt;BR /&gt;&lt;BR /&gt;scanf("%i", &amp;amp;dummy);&lt;BR /&gt;&lt;BR /&gt;printf("ok\n");&lt;BR /&gt;&lt;BR /&gt;MPI_Barrier(MPI_COMM_WORLD);&lt;BR /&gt;&lt;BR /&gt;} else {&lt;BR /&gt;&lt;BR /&gt;MPI_Barrier(MPI_COMM_WORLD);&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;return 0;&lt;BR /&gt;&lt;BR /&gt;}&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2012 02:15:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937730#M2653</guid>
      <dc:creator>italo1337</dc:creator>
      <dc:date>2012-10-30T02:15:24Z</dc:date>
    </item>
    <item>
      <title>Hi italo,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937731#M2654</link>
      <description>Hi italo,

If you set I_MPI_WAIT_MODE=1, this will cause the processes to wait at MPI_Barrier instead of constantly polling.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel® Cluster Tools</description>
      <pubDate>Tue, 30 Oct 2012 14:27:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937731#M2654</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2012-10-30T14:27:50Z</dc:date>
    </item>
    <item>
      <title>It worked. Thank you.</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937732#M2655</link>
      <description>It worked. Thank you.</description>
      <pubDate>Tue, 30 Oct 2012 15:12:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937732#M2655</guid>
      <dc:creator>italo1337</dc:creator>
      <dc:date>2012-10-30T15:12:35Z</dc:date>
    </item>
    <item>
      <title>Hi italo,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937733#M2656</link>
      <description>Hi italo,

Good.  Please feel free to contact us again for any future concerns.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel® Cluster Tools</description>
      <pubDate>Tue, 30 Oct 2012 15:14:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937733#M2656</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2012-10-30T15:14:13Z</dc:date>
    </item>
    <item>
      <title>My code is still not working</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937734#M2657</link>
      <description>My code is still not working as I want. My code uses both OpenMP and MPI. I want to do this:

- Start up the code. Put all ranks &amp;gt;0 on barrier and rank 0 stars to work.
- While all other ranks are on the barrier, rank 0 uses multiple OpenMP threads.
- Rank 0 finshes its job, reaches the barrier and all ranks start to work. Each rank uses one thread.
- Work finishes. Ranks &amp;gt;0 loop back to the barrier and rank 0 does more work with OpenMP.

The problem is rank 0 will only launch one OpemMP thread. I then omp_set_num_threads(8) on rank 0. It launches 8 threads, but they are confined to one processor.

So, basically, I want rank 0 to be able to use all 8 processors with OpenMP while the other ranks are on the barrier. Is it possible?</description>
      <pubDate>Tue, 30 Oct 2012 17:10:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937734#M2657</guid>
      <dc:creator>italo1337</dc:creator>
      <dc:date>2012-10-30T17:10:14Z</dc:date>
    </item>
    <item>
      <title>Hi italo,</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937735#M2658</link>
      <description>Hi italo,

How are you determining where the processes are pinned?  Set I_MPI_DEBUG=4 to verify the pinning set for each rank.  You can use I_MPI_PIN_DOMAIN to specify which cores are available to which ranks.  I would recommend looking through the documentation for this environment variable (found in the Reference Manual) and choosing the appropriate settings for your system.  If you want some advice on this, let me know your system's CPU configuration and how you want the ranks and threads pinned and I can offer assistance.

Make certain you are using the multithreaded MPI library.  Use the option -mt_mpi with your MPI compiler script to link to the correct library.

Sincerely,
James Tullos
Technical Consulting Engineer
Intel® Cluster Tools</description>
      <pubDate>Tue, 30 Oct 2012 19:00:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937735#M2658</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2012-10-30T19:00:45Z</dc:date>
    </item>
    <item>
      <title>I_MPI_PIN_DOMAIN=omp</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937736#M2659</link>
      <description>I_MPI_PIN_DOMAIN=omp

That's what I was looking for. Thanks again.</description>
      <pubDate>Thu, 01 Nov 2012 18:34:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937736#M2659</guid>
      <dc:creator>italo1337</dc:creator>
      <dc:date>2012-11-01T18:34:31Z</dc:date>
    </item>
    <item>
      <title>Glad to help!</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937737#M2660</link>
      <description>Glad to help!</description>
      <pubDate>Fri, 02 Nov 2012 13:46:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/MPI-Barrier-using-100-CPU/m-p/937737#M2660</guid>
      <dc:creator>James_T_Intel</dc:creator>
      <dc:date>2012-11-02T13:46:37Z</dc:date>
    </item>
  </channel>
</rss>

