Skip to content

Commit 962608d

Browse files
committed
MAN: updated man-pages for lots of RMA window functions
The updates adds explanations of different MODES for the window synchronization routines as well as providing a bit more context for the baseptr (void *) data-types which are actually void ** types. Also added more cross-links. Finally added explanations of the Win_create_dynamic usage that explicitly requires attention about address spaces. I.e. the actual address at the target is necessary for succesfull operation. Signed-off-by: Nick Papior <nickpapior@gmail.com>
1 parent ff1ba01 commit 962608d

11 files changed

+90
-8
lines changed

ompi/mpi/man/man3/MPI_Alloc_mem.3in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,13 @@ Fortran only: Error status (integer).
5858
.SH DESCRIPTION
5959
.ft R
6060
MPI_Alloc_mem allocates \fIsize\fP bytes of memory. The starting address
61-
of this memory is returned in the variable \fIbase\fP.
61+
of this memory is returned in the variable \fIbaseptr\fP.
6262
.sp
6363

64+
.SH C NOTES
65+
.ft R
66+
While \fIbaseptr\fP is a \fIvoid *\fP type, this is to allow easy use of any pointer object for this parameter. This argument is really a \fIvoid **\fP type.
67+
6468
.SH FORTRAN NOTES
6569
.ft R
6670
There is no portable FORTRAN 77 syntax for using MPI_Alloc_mem.

ompi/mpi/man/man3/MPI_Win_allocate.3in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ elements of type \fItype\fP. The later choice will allow one to use
100100
array indices in RMA calls, and have those scaled correctly to byte
101101
displacements, even in a heterogeneous environment.
102102
.sp
103+
Calling \fBMPI_Win_free\fP will deallocate the memory allocated by \fBMPI_Win_allocate\fP. It will thus be an error to manually free \fIbaseptr\fP.
104+
105+
.SH C NOTES
106+
.ft R
107+
While \fIbaseptr\fP is a \fIvoid *\fP type, this is to allow easy use of any pointer object for this parameter. This argument is really a \fIvoid **\fP type.
108+
.sp
103109

104110
.SH ERRORS
105111
Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument.
@@ -119,3 +125,4 @@ MPI_Alloc_mem
119125
MPI_Free_mem
120126
MPI_Win_create
121127
MPI_Win_allocate_shared
128+
MPI_Win_free

ompi/mpi/man/man3/MPI_Win_allocate_shared.3in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ elements of type \fItype\fP. The later choice will allow one to use
123123
array indices in RMA calls, and have those scaled correctly to byte
124124
displacements, even in a heterogeneous environment.
125125
.sp
126+
Calling \fBMPI_Win_free\fP will deallocate the memory allocated by \fBMPI_Win_allocate_shared\fP. It will thus be an error to manually free \fIbaseptr\fP.
127+
128+
.SH C NOTES
129+
.ft R
130+
While \fIbaseptr\fP is a \fIvoid *\fP type, this is to allow easy use of any pointer object for this parameter. This argument is really a \fIvoid **\fP type.
131+
.sp
126132

127133
.SH ERRORS
128134
Almost all MPI routines return an error value; C routines as the value
@@ -144,3 +150,5 @@ MPI_Free_mem
144150
MPI_Win_allocate
145151
MPI_Win_create
146152
MPI_Win_shared_query
153+
MPI_Win_free
154+

ompi/mpi/man/man3/MPI_Win_create_dynamic.3in

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ Fortran only: Error status (integer).
5353
.SH DESCRIPTION
5454
.ft R
5555
MPI_Win_create_dynamic is a one-sided MPI communication collective call executed by all processes in the group of \fIcomm\fP. It returns a window object without memory attached that can be used by these processes to perform RMA operations.
56+
.sp
57+
A window created with MPI_Win_create_dynamic requires the \fItarget_disp\fP argument for all RMA functions to be the actual address at the target.
58+
5659
.sp
5760
The following info keys are supported:
5861
.ft R
@@ -80,7 +83,14 @@ If set to \fIsame_op\fP, the implementation will assume that all concurrent
8083
accumulate calls to the same target address will use the same
8184
operation. If set to \fIsame_op_no_op\fP, then the implementation will
8285
assume that all concurrent accumulate calls to the same target address
83-
will use the same operation or MPI_NO_OP. The default is \fIsame_op_no_op\fP.
86+
will use the same operation or MPI_NO_OP. The default is \fIsame_op_no_op\fP.
87+
.sp
88+
89+
.SH NOTES
90+
Since dynamically attaching memory to windows are not collective calls, one have to communicate the actual address at the target using MPI_Get_address and some communication.
91+
.sp
92+
Dynamic memory does not have any \fIdisp_unit\fP associated and requires correct offset calculations with proper type handling.
93+
.sp
8494

8595
.SH ERRORS
8696
Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument.
@@ -89,4 +99,10 @@ Before the error value is returned, the current MPI error handler is
8999
called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error.
90100

91101

102+
.SH SEE ALSO
103+
MPI_Win_attach
104+
MPI_Win_detach
105+
MPI_Get_address
106+
.br
107+
92108

ompi/mpi/man/man3/MPI_Win_fence.3in

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,23 @@ MPI_Win_fence synchronizes RMA calls on \fIwin\fP. The call is collective on the
5454
.sp
5555
The call completes an RMA access epoch if it was preceded by another fence call and the local process issued RMA communication calls on \fIwin\fP between these two calls. The call completes an RMA exposure epoch if it was preceded by another fence call and the local window was the target of RMA accesses between these two calls. The call starts an RMA access epoch if it is followed by another fence call and by RMA communication calls issued between these two fence calls. The call starts an exposure epoch if it is followed by another fence call and the local window is the target of RMA accesses between these two fence calls. Thus, the fence call is equivalent to calls to a subset of \fIpost, start, complete, wait\fP.
5656
.sp
57-
A fence call usually entails a barrier synchronization: a process completes a call to MPI_Win_fence only after all other processes in the group have entered their matching call. However, a call to MPI_Win_fence that is known not to end any epoch (in particular, a call with \fIassert\fP = MPI_MODE_NOPRECEDE) does not necessarily act as a barrier.
57+
The \fIassert\fP argument is used to provide assertions on the context of the call that may be used for various optimizations. A value of \fIassert\fP = 0 is always valid. The following assertion value is supported:
58+
.ft R
59+
.TP 1i
60+
MPI_MODE_NOPRECEDE
61+
No locally called RMA calls must be present before this fence. This must be given to all or no members of the window. It may enable faster fence call by bypassing a barrier.
62+
.sp
63+
.TP 1i
64+
MPI_MODE_NOSTORE
65+
Informs that the local window was not updated by local stores or get calls in the preceding epoch.
66+
.TP 1i
67+
MPI_MODE_NOPUT
68+
Informs that the local window will not be updated by any put or accummulate calls in the ensuing epoch (until next fence call).
69+
.TP 1i
70+
MPI_MODE_NOSUCCEED
71+
No locally called RMA calls must be present after this fence. This must be given to all or no members of the window. It may enable a faster fence call by bypassing a barrier.
72+
.sp
73+
5874

5975
.SH NOTE
6076
Calls to MPI_Win_fence should both precede and follow calls to put, get or accumulate that are synchronized with fence calls.

ompi/mpi/man/man3/MPI_Win_free.3in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ Fortran only: Error status (integer).
4848
.ft R
4949
MPI_Win_free frees the window object \fIwin\fP and returns a null handle (equal to MPI_WIN_NULL). This collective call is executed by all processes in the group associated with \fIwin\fP. It can be invoked by a process only after it has completed its involvement in RMA communications on window \fIwin\fP, that is, the process has called MPI_Win_fence, or called MPI_Win_unlock to match a previous call to MPI_Win_lock. When the call returns, the window memory can be freed.
5050

51+
.SH NOTES
52+
.ft R
53+
If the window was created through \fBMPI_Win_allocate\fP or \fBMPI_Win_allocate_shared\fP then the memory buffer from that call would be freed when calling \fBMPI_Win_free\fP.
54+
5155
.SH ERRORS
5256
Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument.
5357
.sp
@@ -56,7 +60,7 @@ called. By default, this error handler aborts the MPI job, except for I/O functi
5660

5761
.SH SEE ALSO
5862
MPI_Win_create
59-
MPI_Win_fence
60-
MPI_Win_unlock
63+
MPI_Win_allocate
64+
MPI_Win_allocate_shared
6165
.br
6266

ompi/mpi/man/man3/MPI_Win_lock.3in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,13 @@ Locks are used to protect accesses to the locked target window effected by RMA c
6363
Accesses that are protected by an exclusive lock will not be concurrent at the window site with other accesses to the same window that are lock protected. Accesses that are protected by a shared lock will not be concurrent at the window site with accesses protected by an exclusive lock to the same window.
6464
.sp
6565
The \fIassert\fP argument is used to provide assertions on the context of the call that may be used for various optimizations. (See Section 6.4.4 of the MPI-2 Standard.) A value of \fIassert\fP = 0 is always valid.
66+
The following assertion value is supported:
67+
.ft R
68+
.TP 1i
69+
MPI_MODE_NOCHECK
70+
No other processes will hold or attempt to acquire a conflicting lock while the caller holds the window.
6671
.sp
67-
.ft
72+
6873
.SH NOTES
6974
.ft R
7075
In a client/server environment in which clients connect to

ompi/mpi/man/man3/MPI_Win_lock_all.3in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,13 @@ Locks are used to protect accesses to the locked target window effected by RMA c
5656
Accesses that are protected by an exclusive lock will not be concurrent at the window site with other accesses to the same window that are lock protected. Accesses that are protected by a shared lock will not be concurrent at the window site with accesses protected by an exclusive lock to the same window.
5757
.sp
5858
The \fIassert\fP argument is used to provide assertions on the context of the call that may be used for various optimizations. (See Section 6.4.4 of the MPI-2 Standard.) A value of \fIassert\fP = 0 is always valid.
59+
The following assertion value is supported:
60+
.ft R
61+
.TP 1i
62+
MPI_MODE_NOCHECK
63+
No other processes will hold or attempt to acquire a conflicting lock while the caller holds the window.
5964
.sp
60-
.ft
65+
6166
.SH NOTES
6267
.ft R
6368
In a client/server environment in which clients connect to

ompi/mpi/man/man3/MPI_Win_post.3in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ Fortran only: Error status (integer).
5555
.SH DESCRIPTION
5656

5757
Starts an RMA exposure epoch for the local window associated with \fIwin\fP. Only the processes belonging to \fIgroup\fP should access the window with RMA calls on \fIwin\fP during this epoch. Each process in \fIgroup\fP must issue a matching call to MPI_Win_start. MPI_Win_post does not block.
58+
.sp
59+
The \fIassert\fP argument is used to provide assertions on the context of the call that may be used for various optimizations. A value of \fIassert\fP = 0 is always valid. The following assertion value is supported:
60+
.ft R
61+
.TP 1i
62+
MPI_MODE_NOCHECK
63+
The matching call MPI_Win_start have not yet occurred ony any origin processes when this call is made. This assertion must be present for all matching MPI_Win_start calls if used.
64+
.TP 1i
65+
MPI_MODE_NOSTORE
66+
Informs that the local window was not updated by local stores or get calls in the preceding epoch.
67+
.TP 1i
68+
MPI_MODE_NOPUT
69+
Informs that the local window will not be updated by put or accummulate calls until the ensuing wait synchronization.
70+
.sp
5871

5972
.SH ERRORS
6073
Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument.

ompi/mpi/man/man3/MPI_Win_shared_query.3in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ all processes in the group attached to the window specified \fIsize\fP
8282
= 0, then the call returns \fIsize\fP = 0 and a \fIbaseptr\fP as if
8383
\fBMPI_Alloc_mem\fP was called with \fIsize\fP = 0.
8484

85+
.SH C NOTES
86+
.ft R
87+
While \fIbaseptr\fP is a \fIvoid *\fP type, this is to allow easy use of any pointer object for this parameter. This argument is really a \fIvoid **\fP type.
88+
8589
.SH ERRORS
8690
Almost all MPI routines return an error value; C routines as the value
8791
of the function and Fortran routines in the last argument.

0 commit comments

Comments
 (0)