[mpich-discuss] MPI One Sided Comm
Rajeev Thakur
thakur at mcs.anl.gov
Thu Jul 9 13:14:54 CDT 2009
MPICH2 requires some MPI call to be made at the target in order for
progress to occur. For your testing, you could call a barrier after
unlock as follows.
Rank 0 Rank 1
MPI_Win_lock
MPI_Put
MPI_Win_unlock
MPI_Barrier MPI_Barrier
The barrier on rank 1 will cause progress to occur.
Another option is to spawn a thread on rank 1 that blocks on an MPI_Recv
that is not satisfied until the very end of the program. You need to
call MPI_Init_thread with MPI_THREAD_MULTIPLE for that to work.
Rajeev
> -----Original Message-----
> From: mpich-discuss-bounces at mcs.anl.gov
> [mailto:mpich-discuss-bounces at mcs.anl.gov] On Behalf Of
> Balasingam, Sashi
> Sent: Thursday, July 09, 2009 12:27 PM
> To: mpich-discuss at mcs.anl.gov
> Subject: [mpich-discuss] MPI One Sided Comm
>
> Hi All,
>
> I am trying a simple example (with MPICH-2, on Windows) to
> test the One
> sided communication with 'passive' synchronization. There are 2
> processes, where proc-0 (target) is updating a window in a loop, at
> 100ms interval, while proc-1 (origin) is trying to read that
> window in a
> tight loop. The loop in Proc-1 has this code: MPI_Win_lock(),
> MPI_Win_Get(), MPI_Win_unlock().
>
> When I run it, I see inconsistent results....most times, I
> see only the
> very last update of proc-0, but occasionally I see all updates.
>
> - I was wondering if this is related to MPI sync calls from proc-1 not
> getting thru to proc-0, in a consistent manner ?
>
> - Also, is there a way to get MPI services running on its own thread,
> separate from the Main thread...if so how is it done ?
>
> Thanks,
> Sashi
More information about the mpich-discuss
mailing list