Skip to content

Commit bc321de

Browse files
authored
Merge pull request #8744 from zerothi/8680-manpage-win
MAN: updated man-pages for lots of RMA window functions
2 parents 8427757 + 059b601 commit bc321de

13 files changed

+101
-15
lines changed

.mailmap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,7 @@ Anandhi S Jayakumar <anandhi.s.jayakumar@intel.com>
113113
Mohan Gandhi <mohgan@amazon.com>
114114

115115
Harumi Kuno <harumi.kuno@hpe.com>
116+
117+
Nick Papior <nickpapior@gmail.com>
118+
Nick Papior <nickpapior@gmail.com> <nicpa@dtu.dk>
119+
Nick Papior <nickpapior@gmail.com> <zerothi@users.noreply.github.com>

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+
The parameter \fIbaseptr\fP is of type \fIvoid *\fP to allow passing any pointer object for this parameter. The provided argument should be a pointer to a pointer of arbitrary type (e.g., \fIvoid **\fP).
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 is thus erroneous 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 is thus erroneous 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.3in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ may allow the implementation to enable certain optimizations.
8989
.TP 1i
9090
accumulate_ordering
9191
By default, accumulate operations from one initiator to one target on
92-
the same window are strictly ordered. If the info key
92+
the same window memory location are strictly ordered. If the info key
9393
accumulate_ordering is set to \fInone\fP, no ordering of accumulate
94-
operations guaranteed. They key can also be a comma-separated list of
94+
operations guaranteed. They key can also be a comma-separated list of
9595
required orderings consisting of \fIrar\fP, \fIwar\fP, \fIraw\fP, and \fIwaw\fP for
9696
read-after-read, write-after-read, read-after-write, and
9797
write-after-write, respectively. Looser ordering constraints are

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

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,34 +53,44 @@ 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 \fBMPI_Win_create_dynamic\fP requires the \fItarget_disp\fP argument for all RMA communication functions to be the actual address at the target.
58+
5659
.sp
5760
The following info keys are supported:
5861
.ft R
5962
.TP 1i
6063
no_locks
6164
If set to \fItrue\fP, then the implementation may assume that the local
6265
window is never locked (by a call to MPI_Win_lock or
63-
MPI_Win_lock_all). Setting this value if only active synchronization
66+
MPI_Win_lock_all). Setting this value if only active synchronization
6467
may allow the implementation to enable certain optimizations.
6568
.sp
6669
.TP 1i
6770
accumulate_ordering
6871
By default, accumulate operations from one initiator to one target on
69-
the same window are strictly ordered. If the info key
72+
the same window memory location are strictly ordered. If the info key
7073
accumulate_ordering is set to \fInone\fP, no ordering of accumulate
71-
operations guaranteed. They key can also be a comma-separated list of
74+
operations guaranteed. They key can also be a comma-separated list of
7275
required orderings consisting of \fIrar\fP, \fIwar\fP, \fIraw\fP, and \fIwaw\fP for
7376
read-after-read, write-after-read, read-after-write, and
74-
write-after-write, respectively. Looser ordering constraints are
77+
write-after-write, respectively. Looser ordering constraints are
7578
likely to result in improved performance.
7679
.sp
7780
.TP 1i
7881
accumulate_ops
7982
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
81-
operation. If set to \fIsame_op_no_op\fP, then the implementation will
84+
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 \fBMPI_NO_OP\fP. The default is \fIsame_op_no_op\fP.
87+
.sp
88+
89+
.SH NOTES
90+
Since dynamically attaching memory to a window is a local operation, one has to communicate the actual address at the target using \fBMPI_Get_address\fP 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 local RMA calls have been issued before this fence. This assertion must be provided by all or no members of the group of the window. It may enable faster fence call by avoiding unnecessary synchronization.
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 local RMA calls will be issued after this fence. This assertion must be provided by all or no members of the group of the window. It may enable faster fence call by avoiding unnecessary synchronization.
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 allocated in that call will 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 lock.
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 lock.
5964
.sp
60-
.ft
65+
6166
.SH NOTES
6267
.ft R
6368
In a client/server environment in which clients connect to

0 commit comments

Comments
 (0)