Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MPI One Sided: Exclusive Lock with MPI_Win_lock_all

Tags:

c

locking

mpi

The MPI-3 Standard states that MPI_Win_lock(...) with lock type MPI_LOCK_SHARED must be a blocking (exclusive) lock if and only if the origin and target process are the same. MPI_Win_lock_all is the locking of all processes in the window with lock type MPI_LOCK_SHARED.

Does this imply that MPI_Win_lock_all creates also an exclusive lock from the origin to the origin itself?

like image 533
kowwwa Avatar asked Apr 23 '15 13:04

kowwwa


1 Answers

No. MPI_Win_lock_all induces a shared lock at all processes associated with the window (technically, in the group associated with the window).

In any case, a shared lock and an exclusive lock are different. Please do not conflate the possibility that shared lock acquisition will block on some remote state with an exclusive lock.

like image 161
Jeff Hammond Avatar answered Oct 23 '22 21:10

Jeff Hammond