Hi I am trying to send a data(forces) across 2 Process, using MPI_SendRecv. 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?
A:
In short: no.
In long: your suggestion doesn't really make sense. The machine can't perform any operations on your received value without first putting it into local memory somewhere. You'll need a buffer to receive the newest value, and a separate sum that you will increment by the buffer's content after every receive.
suszterpatt
2010-09-04 23:37:33
yes, i did the same , first i stored the values in the memory to a temp array and then do the communication and then add the received values to the buffer, but then i have to do independently after each send/recv command and in each directions( 3 * 2 for both pos and neg directions), little bit of extra code though it is same ...thanks very much for the response .
lsk1985
2010-09-08 15:26:59