[mpich-discuss] MPI_Win_create synch

Robert Kubrick robertkubrick at gmail.com
Mon Jul 7 21:22:33 CDT 2008


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