[mpich-discuss] beginner for remote mem access (sufeng)

Pavan Balaji balaji at mcs.anl.gov
Fri Jul 5 10:36:07 CDT 2013


On 07/05/2013 10:28 AM, Sufeng Niu wrote:
> 1.
> MPI_Win_fence is not similar to MPI_Barrier in some cases.  The
> MPICH implementation can turn some calls into no-ops and others into
> MPI_Reduce_scatter.
> I am not quite sure about "turn some calls into no-ops and others into
> MPI_Reduce_scatter" Could you please give an example if possible?
> Another thing is if a process create a window for other process, but the
> data access is available after some operations. Should I use
> MPI_Win_fence or MPI_Barrier to sync? or other methods?

MPI_WIN_FENCE will make sure that all PUT/GET/ACCUMULATE operations are 
complete locally and remotely.  This is probably what you need.

MPI_BARRIER is useless in this case since PUT/GET/ACCUMULATE can be 
nonblocking.

> 2.
> Regarding "use MPI window as thread level", I really don't
> understand your thinking at all.  MPI RMA is not shared memory nor is
> MPI a threading model.
> Sorry for uncleared statements, right now I would like to do
> multithreads and MPI hybrid programming. let me give an example: I have
> 3 processes, each one has 8 threads. thread 0 in process 0 creates a RMA
> window. if I would like all other threads to access it, should I use
> thread 0 in process 1, thread 0 in process 2 to MPI_Get the data from
> window, then use shared memory for internal threads to load the data? i
> am not sure what is the proper way for RMA in hybrid model.

All threads within the OS process are part of the same MPI rank.  Any of 
them can access the window as the same rank.

  -- Pavan

-- 
Pavan Balaji
http://www.mcs.anl.gov/~balaji



More information about the discuss mailing list