Fwd: [Beowulf] mutex (remote memory access) question for MPI-2

Plinius Frobenius plinius at gmail.com
Tue Aug 2 05:10:16 PDT 2005


Thanks, but I want :
y: 
Get - do some calculations - Put
x: 
Get - do some calculations - Put

So, if it goes wrong, you still can have the following:
y Gets - x Gets - x calculates - x Puts - y calculates - y Puts

Where the calculations of x are completely lost, because y used the wrong 
value to do his calculations.

So, I think (I'm not sure though) that this can't be done with only lock and 
unlock before the gets and puts?

Is this correct? And how would you solve this?
Thanks for ideas and help.

On 8/1/05, William Gropp <gropp at mcs.anl.gov> wrote:
> 
> At 12:49 PM 7/31/2005, Plinius Frobenius wrote:
> >Hi,
> >I've red through the chapter in "Using MPI-2" about mutexes.
> >Suppose that you know in advance that only one cumputer (say node y) can
> >access the memory-window on node x (except node x itself). 
> >How should your mutex-code look like (you still need a mutex, since both 
> x
> >and y can access the memory)? (since you won't need the entire
> >"tree-mutex-code" provided by Rajeev Thakur, I guess, since there are 
> only 
> >two processes able to acces the memory...). I haven't enough experience
> >yet to find this one by myself, and really need it for the program I'm
> >working on.
> 
> You don't need mutexes for this. Simply use MPI_Win_lock with a mode of 
> MPI_LOCK_EXCLUSIVE, followed by either MPI_Put, MPI_Get, or MPI_Accumulate
> (from node y) or simple language access on node x (e.g., *a = 1; where a
> points into node x's memory window)., followed by MPI_Win_unlock. 
> 
> Bill
> 
> 
> >Thanks for any ideas/hints/help...
> >_______________________________________________
> >Beowulf mailing list, Beowulf at beowulf.org
> >To change your subscription (digest mode or unsubscribe) visit 
> >http://www.beowulf.org/mailman/listinfo/beowulf
> 
> William Gropp
> http://www.mcs.anl.gov/~gropp <http://www.mcs.anl.gov/%7Egropp>
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.beowulf.org/pipermail/beowulf/attachments/20050802/64f848f0/attachment.html>


More information about the Beowulf mailing list