MPI one-way: exclusive lock with MPI_Win_lock_all

The MPI-3 standard states that MPI_Win_lock(...) with a lock type of MPI_LOCK_SHARED should be a blocking (exclusive) lock if and only if the source and target processes match. MPI_Win_lock_all is a lock of all processes in a window with the lock type MPI_LOCK_SHARED .

Does this mean that MPI_Win_lock_all also creates an exclusive lock from the origin to the very beginning?

+8
c locking mpi
source share
1 answer

Not. MPI_Win_lock_all causes a general lock on all processes associated with the window (technically in the group associated with the window).

In any case, the common lock and exclusive lock are different. Do not rule out the possibility of locking the shared lock in any remote state with exclusive locking.

+1
source share

All Articles