<?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 how to add data already present in the recieve buffer using MPI in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/how-to-add-data-already-present-in-the-recieve-buffer-using-MPI/m-p/833747#M1578</link>
    <description>Hi I am trying to send a data(forces) across 2 Process, using MPI commands(send and recieve) Usually the data will be over written in the received buffer, i do not want to overwrite the data in the received buffer instead i want to add the data it received. i can do following. Store the data in previous time step to a different array and then add it after receiving, but then i have huge number of nodes and i do not want to have a memory allotted for its storage every time step.(or overwrite the same) My question is there a way to add the received data directly to the buffer and store it in the received memory using MPI? any help in this direction , would be really thankful. i am sure collective communication calls (MPI Reduce)cannot be worked out here.. are they any other commands that can do this?</description>
    <pubDate>Thu, 26 Aug 2010 16:34:20 GMT</pubDate>
    <dc:creator>Sunny1</dc:creator>
    <dc:date>2010-08-26T16:34:20Z</dc:date>
    <item>
      <title>how to add data already present in the recieve buffer using MPI</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/how-to-add-data-already-present-in-the-recieve-buffer-using-MPI/m-p/833747#M1578</link>
      <description>Hi I am trying to send a data(forces) across 2 Process, using MPI commands(send and recieve) Usually the data will be over written in the received buffer, i do not want to overwrite the data in the received buffer instead i want to add the data it received. i can do following. Store the data in previous time step to a different array and then add it after receiving, but then i have huge number of nodes and i do not want to have a memory allotted for its storage every time step.(or overwrite the same) My question is there a way to add the received data directly to the buffer and store it in the received memory using MPI? any help in this direction , would be really thankful. i am sure collective communication calls (MPI Reduce)cannot be worked out here.. are they any other commands that can do this?</description>
      <pubDate>Thu, 26 Aug 2010 16:34:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/how-to-add-data-already-present-in-the-recieve-buffer-using-MPI/m-p/833747#M1578</guid>
      <dc:creator>Sunny1</dc:creator>
      <dc:date>2010-08-26T16:34:20Z</dc:date>
    </item>
    <item>
      <title>how to add data already present in the recieve buffer using MPI</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/how-to-add-data-already-present-in-the-recieve-buffer-using-MPI/m-p/833748#M1579</link>
      <description>I'm troubled by your statement that "&lt;EM&gt;Usually the data will be over written in the received buffer&lt;/EM&gt;".If you're using the simple blockingMPI_Send and MPI_Recv, the data should never be overwritten, even if the same process sends additional messages with the same tag. Messages from different processes, even with the same tag, will have a different source process and should not be overwriting anything already stored in the receive buffer. (The above assumes you are talking about the internal MPI receive buffer.)&lt;BR /&gt;&lt;BR /&gt;If the buffer you are referring to is the user-created bufer to hold the contents of a received message, then the fix is simple: don't read a new message into the same memory location. If you receive 10 integers into the array A (that has been declared to hold 10 integers), you will overwrite those ten integers if you receive a new message of 10 integersinto the same array. On the other hand, if you declared A to hold 20 integers, you can avoid this overwriting by giving the first memory location of the second receive buffer as being A[10]. Then, the first ten integers will be in [0]-[9] and the second ten integers will be safely located in [10]-[19].&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;MPI_Recv(A, 10, MPI_INT, 0, 23, &amp;amp;status_0); &lt;BR /&gt;MPI_Recv(&amp;amp;A[10], 10, MPI_INT, 1, 23, &amp;amp;status_1);&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;If all of the message coming into the process are from &lt;SPAN style="text-decoration: underline;"&gt;all&lt;/SPAN&gt; other processes in the computation, you could use the collective communication ofMPI_Gather to collect each message from all the processes and store it into a buffer without overlap. The catch is that the buffer needs to have enough allocated memory space to hold the entire collection of data being received.&lt;BR /&gt;&lt;BR /&gt;Is any of this helpful or close to what you are asking about?&lt;BR /&gt;&lt;BR /&gt;--clay</description>
      <pubDate>Fri, 03 Sep 2010 22:09:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/how-to-add-data-already-present-in-the-recieve-buffer-using-MPI/m-p/833748#M1579</guid>
      <dc:creator>ClayB</dc:creator>
      <dc:date>2010-09-03T22:09:01Z</dc:date>
    </item>
  </channel>
</rss>

