Skip to content

Commit e070ace

Browse files
authored
Updates to complete PMIx v4 (#267)
Complete draft of PMIx v4 Standard Includes a broad range of changes and updates that reorganize the document into several new chapters, places attributes next to the functions that primarily utilize them, adds a number of new APIs, deprecates and removes all implementation-related attributes, and cleans up explanations. Signed-off-by: Ralph Castain <[email protected]> Signed-off-by: Joshua Hursey <[email protected]>
1 parent 9a3b49d commit e070ace

27 files changed

+8003
-7773
lines changed

Acknowledgements.tex

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ \chapter{Acknowledgements}
88
Without the hard work and dedication of these people this document would not have been possible.
99
The sections below list some of the active participants and organizations in the various PMIx standard iterations.
1010

11+
%%%%%%%%%% Version 4.0
12+
\section{Version 4.0}
13+
14+
The following list includes some of the active participants in the PMIx v4 standardization process.
15+
16+
\begin{itemize}
17+
\item \ldots
18+
\end{itemize}
19+
20+
The following institutions supported this effort through time and travel support for the people listed above.
21+
22+
\begin{itemize}
23+
\item \ldots
24+
\end{itemize}
25+
1126
%%%%%%%%%% Version 3.0
1227
\section{Version 3.0}
1328

App_Python.tex

Lines changed: 510 additions & 312 deletions
Large diffs are not rendered by default.

Chap_API_Data_Mgmt.tex

Lines changed: 28 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ \chapter{Data Packing and Unpacking}
66

77
\ac{PMIx} intentionally does not include support for internode communications in the standard, instead relying on its host \ac{SMS} environment to transfer any needed data and/or requests between nodes. These operations frequently involve PMIx-defined public data structures that include binary data. Many \ac{HPC} clusters are homogeneous, and so transferring the structures can be done rather simply. However, greater effort is required in heterogeneous environments to ensure binary data is correctly transferred. \ac{PMIx} buffer manipulation functions are provided for this purpose via standardized interfaces to ease adoption.
88

9-
%%%%%%%%%%%
9+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1010
\section{Data Buffer Type}
1111
\declarestruct{pmix_data_buffer_t}
1212

@@ -38,24 +38,19 @@ \section{Data Buffer Type}
3838
\cspecificend
3939

4040

41-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4343
\section{Support Macros}
4444
\label{chap:datamgt:macros}
4545

4646
\ac{PMIx} provides a set of convenience macros for creating, initiating, and releasing data buffers.
4747

4848
%%%%%%%%%%%
49-
\subsection{\code{PMIX_DATA_BUFFER_CREATE}}
49+
\littleheader{\code{PMIX_DATA_BUFFER_CREATE}}
5050
\declaremacro{PMIX_DATA_BUFFER_CREATE}
5151

52-
%%%%
53-
\summary
54-
55-
Allocate memory for a \refstruct{pmix_data_buffer_t} object and initialize it
56-
57-
%%%%
58-
\format
52+
Allocate memory for a \refstruct{pmix_data_buffer_t} object and initialize it.
53+
This macro uses \textit{calloc} to allocate memory for the buffer and initialize all fields in it
5954

6055
\versionMarker{2.0}
6156
\cspecificstart
@@ -68,23 +63,12 @@ \subsection{\code{PMIX_DATA_BUFFER_CREATE}}
6863
\argout{buffer}{Variable to be assigned the pointer to the allocated \refstruct{pmix_data_buffer_t} (handle)}
6964
\end{arglist}
7065

71-
%%%%
72-
\descr
73-
74-
This macro uses \textit{calloc} to allocate memory for the buffer and initialize all fields in it
75-
76-
7766
%%%%%%%%%%%
78-
\subsection{\code{PMIX_DATA_BUFFER_RELEASE}}
67+
\littleheader{\code{PMIX_DATA_BUFFER_RELEASE}}
7968
\declaremacro{PMIX_DATA_BUFFER_RELEASE}
8069

81-
%%%%
82-
\summary
83-
84-
Free a \refstruct{pmix_data_buffer_t} object and the data it contains
85-
86-
%%%%
87-
\format
70+
Free a \refstruct{pmix_data_buffer_t} object and the data it contains.
71+
Free's the data contained in the buffer, and then free's the buffer itself
8872

8973
\versionMarker{2.0}
9074
\cspecificstart
@@ -97,23 +81,12 @@ \subsection{\code{PMIX_DATA_BUFFER_RELEASE}}
9781
\argin{buffer}{Pointer to the \refstruct{pmix_data_buffer_t} to be released (handle)}
9882
\end{arglist}
9983

100-
%%%%
101-
\descr
102-
103-
Free's the data contained in the buffer, and then free's the buffer itself
104-
10584

10685
%%%%%%%%%%%
107-
\subsection{\code{PMIX_DATA_BUFFER_CONSTRUCT}}
86+
\littleheader{\code{PMIX_DATA_BUFFER_CONSTRUCT}}
10887
\declaremacro{PMIX_DATA_BUFFER_CONSTRUCT}
10988

110-
%%%%
111-
\summary
112-
113-
Initialize a statically declared \refstruct{pmix_data_buffer_t} object
114-
115-
%%%%
116-
\format
89+
Initialize a statically declared \refstruct{pmix_data_buffer_t} object.
11790

11891
\versionMarker{2.0}
11992
\cspecificstart
@@ -126,23 +99,11 @@ \subsection{\code{PMIX_DATA_BUFFER_CONSTRUCT}}
12699
\argin{buffer}{Pointer to the allocated \refstruct{pmix_data_buffer_t} that is to be initialized (handle)}
127100
\end{arglist}
128101

129-
%%%%
130-
\descr
131-
132-
Initialize a pre-allocated buffer object
133-
134-
135102
%%%%%%%%%%%
136-
\subsection{\code{PMIX_DATA_BUFFER_DESTRUCT}}
103+
\littleheader{\code{PMIX_DATA_BUFFER_DESTRUCT}}
137104
\declaremacro{PMIX_DATA_BUFFER_DESTRUCT}
138105

139-
%%%%
140-
\summary
141-
142-
Release the data contained in a \refstruct{pmix_data_buffer_t} object
143-
144-
%%%%
145-
\format
106+
Release the data contained in a \refstruct{pmix_data_buffer_t} object.
146107

147108
\versionMarker{2.0}
148109
\cspecificstart
@@ -155,23 +116,13 @@ \subsection{\code{PMIX_DATA_BUFFER_DESTRUCT}}
155116
\argin{buffer}{Pointer to the \refstruct{pmix_data_buffer_t} whose data is to be released (handle)}
156117
\end{arglist}
157118

158-
%%%%
159-
\descr
160-
161-
Free's the data contained in a \refstruct{pmix_data_buffer_t} object
162-
163119

164120
%%%%%%%%%%%
165-
\subsection{\code{PMIX_DATA_BUFFER_LOAD}}
121+
\littleheader{\code{PMIX_DATA_BUFFER_LOAD}}
166122
\declaremacro{PMIX_DATA_BUFFER_LOAD}
167123

168-
%%%%
169-
\summary
170-
171-
Load a blob into a \refstruct{pmix_data_buffer_t} object
172-
173-
%%%%
174-
\format
124+
Load a blob into a \refstruct{pmix_data_buffer_t} object.
125+
Load the given data into the provided \refstruct{pmix_data_buffer_t} object, usually done in preparation for unpacking the provided data. Note that the data is \textit{not} copied into the buffer - thus, the blob must not be released until after operations on the buffer have completed.
175126

176127
\versionMarker{2.0}
177128
\cspecificstart
@@ -186,23 +137,12 @@ \subsection{\code{PMIX_DATA_BUFFER_LOAD}}
186137
\argin{size}{Number of bytes in the blob {\code{size_t}}}
187138
\end{arglist}
188139

189-
%%%%
190-
\descr
191-
192-
Load the given data into the provided \refstruct{pmix_data_buffer_t} object, usually done in preparation for unpacking the provided data. Note that the data is \textit{not} copied into the buffer - thus, the blob must not be released until after operations on the buffer have completed.
193-
194-
195140
%%%%%%%%%%%
196-
\subsection{\code{PMIX_DATA_BUFFER_UNLOAD}}
141+
\littleheader{\code{PMIX_DATA_BUFFER_UNLOAD}}
197142
\declaremacro{PMIX_DATA_BUFFER_UNLOAD}
198143

199-
%%%%
200-
\summary
201-
202-
Unload the data from a \refstruct{pmix_data_buffer_t} object
203-
204-
%%%%
205-
\format
144+
Unload the data from a \refstruct{pmix_data_buffer_t} object.
145+
Extract the data in a buffer, assigning the pointer to the data (and the number of bytes in the blob) to the provided variables, usually done to transmit the blob to a remote process for unpacking. The buffer's internal pointer will be set to NULL to protect the data upon buffer destruct or release - thus, the user is responsible for releasing the blob when done with it.
206146

207147
\versionMarker{2.0}
208148
\cspecificstart
@@ -217,27 +157,22 @@ \subsection{\code{PMIX_DATA_BUFFER_UNLOAD}}
217157
\argout{size}{Variable to be assigned the number of bytes in the blob {\code{size_t}}}
218158
\end{arglist}
219159

220-
%%%%
221-
\descr
222160

223-
Extract the data in a buffer, assigning the pointer to the data (and the number of bytes in the blob) to the provided variables, usually done to transmit the blob to a remote process for unpacking. The buffer's internal pointer will be set to NULL to protect the data upon buffer destruct or release - thus, the user is responsible for releasing the blob when done with it.
224-
225-
226-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
227-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
161+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
162+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
228163
\section{General Routines}
229164
\label{chap:data_mgmt:general}
230165

231166
The following routines are provided to support internode transfers in heterogeneous environments.
232167

233-
%%%%%%%%%%%
168+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
234169
\subsection{\code{PMIx_Data_pack}}
235170
\declareapi{PMIx_Data_pack}
236171

237172
%%%%
238173
\summary
239174

240-
Pack one or more values of a specified type into a buffer, usually for transmission to another process
175+
Pack one or more values of a specified type into a buffer, usually for transmission to another process.
241176

242177
%%%%
243178
\format
@@ -297,7 +232,7 @@ \subsection{\code{PMIx_Data_pack}}
297232
target's namespace.
298233

299234

300-
%%%%%%%%%%%
235+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
301236
\subsection{\code{PMIx_Data_unpack}}
302237
\declareapi{PMIx_Data_unpack}
303238

@@ -345,7 +280,7 @@ \subsection{\code{PMIx_Data_unpack}}
345280

346281
The unpack function unpacks the next value (or values) of a specified type from the given buffer. The buffer must have already been initialized via an \refmacro{PMIX_DATA_BUFFER_CREATE} or \refmacro{PMIX_DATA_BUFFER_CONSTRUCT} call (and assumedly filled with some data) --- otherwise, the unpack_value function will return an error. Providing an unsupported type flag will likewise be reported as an error, as will specifying a data type that \textit{does not} match the type of the next item in the buffer. An attempt to read beyond the end of the stored data held in the buffer will also return an error.
347282

348-
NOTE: it is possible for the buffer to be corrupted and that \ac{PMIx} will \textit{think} there is a proper variable type at the beginning of an unpack region --- but that the value is bogus (e.g., just a byte field in a string array that so happens to have a value that matches the specified data type flag). Therefore, the data type error check is \textit{not} completely safe.
283+
Note that it is possible for the buffer to be corrupted and that \ac{PMIx} will \textit{think} there is a proper variable type at the beginning of an unpack region --- but that the value is bogus (e.g., just a byte field in a string array that so happens to have a value that matches the specified data type flag). Therefore, the data type error check is \textit{not} completely safe.
349284

350285
Unpacking values is a "nondestructive" process --- i.e., the values are not removed from the buffer. It is therefore possible for the caller to re-unpack a value from the same buffer by resetting the unpack_ptr.
351286

@@ -362,7 +297,7 @@ \subsection{\code{PMIx_Data_unpack}}
362297
packer's namespace.
363298

364299

365-
%%%%%%%%%%%
300+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
366301
\subsection{\code{PMIx_Data_copy}}
367302
\declareapi{PMIx_Data_copy}
368303

@@ -405,7 +340,7 @@ \subsection{\code{PMIx_Data_copy}}
405340
Since registered data types can be complex structures, the system needs some way to know how to copy the data from one location to another (e.g., for storage in the registry). This function, which can call other copy functions to build up complex data types, defines the method for making a copy of the specified data type.
406341

407342

408-
%%%%%%%%%%%
343+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
409344
\subsection{\code{PMIx_Data_print}}
410345
\declareapi{PMIx_Data_print}
411346

@@ -446,7 +381,7 @@ \subsection{\code{PMIx_Data_print}}
446381
Since registered data types can be complex structures, the system needs some way to know how to print them (i.e., convert them to a string representation). Primarily for debug purposes.
447382

448383

449-
%%%%%%%%%%%
384+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
450385
\subsection{\code{PMIx_Data_copy_payload}}
451386
\declareapi{PMIx_Data_copy_payload}
452387

0 commit comments

Comments
 (0)