<?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 This question is outdated. I in Intel® MPI Library</title>
    <link>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111825#M5373</link>
    <description>&lt;P&gt;This question is outdated. I've already solved this problem.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Feb 2016 03:35:50 GMT</pubDate>
    <dc:creator>ArthurRatz</dc:creator>
    <dc:date>2016-02-10T03:35:50Z</dc:date>
    <item>
      <title>My MPI program doesn't work (hangs) when you launch processes on different nodes (hosts)</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111822#M5370</link>
      <description>&lt;P&gt;My MPI program doesn't work (hangs) when you launch processes on different nodes (hosts). In my program I use MPI_Win_allocate_shared function to allocate shared memory using RMA window. And I'm wondering&amp;nbsp;what is the possible cause why my program doesn't work.&amp;nbsp;Do&amp;nbsp;I actually&amp;nbsp;need to implement intercommunicators for that purpose? Here's the code:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;MPI_Comm_split_type(MPI_COMM_WORLD, MPI_COMM_TYPE_SHARED, proc_rank, MPI_INFO_NULL, &amp;amp;comm_sm);
MPI_Comm_rank(comm_sm, &amp;amp;rank_sm);
MPI_Comm_size(comm_sm, &amp;amp;numprocs_sm);

MPI_Info info_noncontig;
MPI_Info_create(&amp;amp;info_noncontig);
MPI_Info_set(info_noncontig, "alloc_shared_noncontig", "true");

int disp_size = sizeof(ullong);
MPI_Aint array_size = number_of_items * disp_size;
MPI_Win_allocate_shared(array_size, disp_size, info_noncontig, comm_sm, &amp;amp;array, &amp;amp;win_sm);
MPI_Win_shared_query(win_sm, 0, &amp;amp;array_size, &amp;amp;disp_size, &amp;amp;array);

MPI_Barrier(comm_sm);

ullong i_start = proc_rank * number_of_items / (ullong)numprocs;
ullong i_end = (proc_rank + 1) * number_of_items / (ullong)numprocs;

MPI_Win_lock_all(MPI_MODE_NOCHECK, win_sm);

if (proc_rank == 0)
{
&amp;nbsp;ullong value = number_of_items - 1;
&amp;nbsp;srand((unsigned)time(NULL) + proc_rank * numprocs + namelen);
&amp;nbsp;for (ullong index = 0; index &amp;lt; number_of_items; index++, value--)
&amp;nbsp;&amp;nbsp;array[index] = (rand_mode == 1) ? rand() % rand_seed + 1 : value;

}

MPI_Barrier(comm_sm);

for (ullong index = i_start; index &amp;lt;= i_end; index++)
fprintf(stdout, "%llu ", array[index]);

fprintf(stdout, "\n\n");
fflush(stdout);

MPI_Barrier(comm_sm);&lt;/PRE&gt;

&lt;P&gt;Output:&lt;/P&gt;

&lt;P&gt;[COMP-PC.MYHOME.NET@mpiexec] Process 0 of 2&lt;BR /&gt;
	71 81 12 56 66 49 70 39 100 90 27 57 46 66 6 13 39 20 70 4 6 13 16 5&lt;BR /&gt;
	&amp;nbsp;56 60 90 44 97 5 87 51 44 12 7 54 70 5 29 65 95 69 70 44 45 38 87 1 9 80 54 78&lt;BR /&gt;
	67 77 68 13 16 78 79 40 98 50 74 6 52&lt;/P&gt;

&lt;P&gt;[WIN-9MFH3O78GLQ.MYHOME.NET@mpiexec] Process 1 of 2&lt;BR /&gt;
	0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;BR /&gt;
	0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0&lt;/P&gt;

&lt;P&gt;As you can see the process 1 doesn't receive the array buffer address ?!?!?!?!?!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 07:02:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111822#M5370</guid>
      <dc:creator>ArthurRatz</dc:creator>
      <dc:date>2016-02-01T07:02:40Z</dc:date>
    </item>
    <item>
      <title>hi</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111823#M5371</link>
      <description>&lt;P&gt;hi&lt;/P&gt;

&lt;P&gt;as i can see at line 21 there is condition:&lt;/P&gt;

&lt;P&gt;&lt;CODE class="keyword bold" style="font-size: 13.008px; line-height: 14.3088px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-weight: bold !important; min-height: auto !important; color: rgb(0, 102, 153) !important; background-image: none !important; background-attachment: initial !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;"&gt;if&lt;/CODE&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13.008px; line-height: 14.3088px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="plain" style="font-size: 13.008px; line-height: 14.3088px; color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; min-height: auto !important; background-image: none !important; background-attachment: initial !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;"&gt;(proc_rank == 0)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE class="plain" style="font-size: 13.008px; line-height: 14.3088px; color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; min-height: auto !important; background-image: none !important; background-attachment: initial !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;"&gt;it seems proc_rank is rank number in COMM_WORLD, right? in this case only one rank in COMM_WORLD fills array, and it fills array on same node only. but as i can see from output there are 2 different hosts:&amp;nbsp;&lt;/CODE&gt;&lt;A href="mailto:COMP-PC.MYHOME.NET@mpiexec" style="font-size: 12px; line-height: 18px;"&gt;COMP-PC.MYHOME.NET&lt;/A&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;A href="mailto:WIN-9MFH3O78GLQ.MYHOME.NET@mpiexec" style="font-size: 12px; line-height: 18px;"&gt;WIN-9MFH3O78GLQ.MYHOME.NET&lt;/A&gt;&amp;nbsp;(BTW, which OS used? Windows or Linux?), and array on host different from COMM_WORLD:rank 0 will not be updated.&lt;/P&gt;

&lt;P&gt;it seems you should update your condition at line 21 to:&lt;/P&gt;

&lt;P&gt;&lt;CODE class="keyword bold" style="font-size: 13.008px; line-height: 14.3088px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-weight: bold !important; min-height: auto !important; color: rgb(0, 102, 153) !important; background-image: none !important; background-attachment: initial !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;"&gt;if&lt;/CODE&gt;&lt;SPAN style="font-size: 13.008px; color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 14.3088px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="plain" style="font-size: 13.008px; line-height: 14.3088px; color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; min-height: auto !important; background-image: none !important; background-attachment: initial !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;"&gt;(rank_sm == 0)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE class="plain" style="font-size: 13.008px; line-height: 14.3088px; color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; min-height: auto !important; background-image: none !important; background-attachment: initial !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;"&gt;thank you for bug report&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE class="plain" style="font-size: 13.008px; line-height: 14.3088px; color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; min-height: auto !important; background-image: none !important; background-attachment: initial !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;"&gt;--Sergey&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 07:45:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111823#M5371</guid>
      <dc:creator>Sergey_O_Intel</dc:creator>
      <dc:date>2016-02-03T07:45:24Z</dc:date>
    </item>
    <item>
      <title>Hello, Sergey. Thank you very</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111824#M5372</link>
      <description>&lt;P&gt;Hello, Sergey. Thank you very much for your reply. I'm going to check this.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 10:10:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111824#M5372</guid>
      <dc:creator>ArthurRatz</dc:creator>
      <dc:date>2016-02-03T10:10:57Z</dc:date>
    </item>
    <item>
      <title>This question is outdated. I</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111825#M5373</link>
      <description>&lt;P&gt;This question is outdated. I've already solved this problem.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 03:35:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111825#M5373</guid>
      <dc:creator>ArthurRatz</dc:creator>
      <dc:date>2016-02-10T03:35:50Z</dc:date>
    </item>
    <item>
      <title>And one more question is</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111826#M5374</link>
      <description>&lt;P&gt;And one more question is there any difference between contiguous and non-contiguous memory ?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 03:37:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111826#M5374</guid>
      <dc:creator>ArthurRatz</dc:creator>
      <dc:date>2016-02-10T03:37:41Z</dc:date>
    </item>
    <item>
      <title>hi</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111827#M5375</link>
      <description>&lt;P&gt;hi&lt;/P&gt;

&lt;P&gt;could you clarify your question?&lt;/P&gt;

&lt;P&gt;in general: &lt;SPAN style="color: rgb(0, 0, 0); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 16px;"&gt;Contiguous means it's all in one chunk, so from the start to the end there's nothing else in it. Non-contiguous is the opposite, it means that the memory is fragmented and there are one or more sections that are allocated&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 05:18:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111827#M5375</guid>
      <dc:creator>Sergey_O_Intel</dc:creator>
      <dc:date>2016-02-11T05:18:15Z</dc:date>
    </item>
    <item>
      <title>Thanks for reply.</title>
      <link>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111828#M5376</link>
      <description>&lt;P&gt;Thanks for reply.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2016 18:31:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-MPI-Library/My-MPI-program-doesn-t-work-hangs-when-you-launch-processes-on/m-p/1111828#M5376</guid>
      <dc:creator>ArthurRatz</dc:creator>
      <dc:date>2016-02-11T18:31:06Z</dc:date>
    </item>
  </channel>
</rss>

