LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2003-12-11 11:34:39


On Thu, 11 Dec 2003, Zenghui Wu wrote:

> I tried to implement one-sided communication with MPI_Put on two
> processes. On both processes have two vectors, process 0 updates the
> vector v[0] with the value of v[1], i.e. v[0]+=v[1], and send the
> updated values of v[0] to process 1. Process 1 updates the vector v[1]
> with v[1]+=v[0] and send the updated values of v[1] to process 0. I used
> "post, start, complete and wait" synchronizing the processes as the
> program below showed, but the program hanged by MPI_Win_start. Do you
> think if there is still error in this program example?

Yes. According to the definitions of MPI_WIN_POST and MPI_WIN_START (see
MPI-2, section 6.4.2), all members of a group must execute corresponding
MPI_WIN_POST's and MPI_WIN_START's.

So if process A executes MPI_WIN_START, then all others must execute
MPI_WIN_PORT. I think you're trying to effect that with your code.

The mistake is that even process A is in the group; hence, process A must
also execute MPI_WIN_POST to match its own MPI_WIN_START.

> But when I created only one window, it can work and get the right
> result.

Because in that case, everyone *is* invoking both MPI_WIN_START and
MPI_WIN_POST on the window.

> And another question, in some documentes I have read some assert
> arguments for the function MPI_Win_start, MPI_Win_post and
> MPI_Win_fence, e.g. MPI_MODE_NOCHECK, MPI_MODE_NOPUT, etc. but I can't
> use these arguments, the compiler said it could not find it, and I have
> checked in the head files, they are not defined, why?

LAM/MPI does not [yet] implement that functionaly. Sorry! :-(

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/