Hi all,
The following simple example illustrates
what I wanted to do with one-sided communication.
I have three processors p1, p2, and p3.
On p1 there is a large array A[10000]
that needs to be sent to p2 or p3 depending
on a parameter X which is computed on
p1. X is not available initially on p2 or p3.
if(X < 0.5)
put A[10000] to p2;
else
put A[10000] to p3;
Now after this I want whoever owns A[]
to compute using it. In other words,
p2 or p3, but not p1 will compute using A[].
This is for efficiency.
I would like to have p2 or p3 be interrupted
or awakened by p1 only when the data A[]
is coming to the processor. In other words,
the one who does not get the data should
not waste a single CPU cycle doing busy
waiting. A solution with a global synchronization
or broadcasting is not desirable.
Is there a way to do it with MPI-2 one-sided
communication?
Thanks a lot for your help in advance,
-Lei mailto:pan_at_[hidden]
|