[mpich-discuss] MPI_Win_create synch

Rajeev Thakur thakur at mcs.anl.gov
Mon Jul 7 22:28:25 CDT 2008


Win_create is a collective operation. All processes in the communicator
(COMM_WORLD in this case) must call it. Does it hang if you call a second
Win_create in both master and slave?

Rajeev  

> -----Original Message-----
> From: owner-mpich-discuss at mcs.anl.gov 
> [mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Robert Kubrick
> Sent: Monday, July 07, 2008 9:23 PM
> To: mpich-discuss at mcs.anl.gov
> Subject: [mpich-discuss] MPI_Win_create synch
> 
> I want to create a window region in my master process. Slave 
> processes are connecting to the region for some one-sided 
> operations and I don't need to create extra windows in each slave.
> The code will look something like this:
> 
> if( rank == 0 ) { // Master
>    ...
>    pMem = MPI::Alloc_mem(memSize, MPI_INFO_NULL);
>    winQueue = MPI::Win::Create(pMem, memSize, sizeof(int), 
> MPI_INFO_NULL, MPI::COMM_WORLD);
>    ...
> } else { // Slaves
>    ...
>    winQueue = MPI::Win::Create((void*)0, 0, sizeof(int), 
> MPI_INFO_NULL, MPI::COMM_WORLD);
>    ...
> }
> 
> How does MPI match the correct window handle in the slave. 
> Lets say I create more than one window in the master, which 
> window handle is returned to the slave after Create()?
> I noticed that if I add Create() calls to the master, the 
> program hangs, I think because it must match the extra 
> windows in each slave.  
> Is there a sort of barrier embedded in each Win::Create()?
> 
> Rob 
> 
> 




More information about the mpich-discuss mailing list