Skip to content

Commit fec1f42

Browse files
authored
Merge pull request #294 from rhc54/rfc/v4fix
Final touchups to PMIx_Get and PMIx_server_init attributes
2 parents 5a319b3 + d86b031 commit fec1f42

File tree

4 files changed

+24
-29
lines changed

4 files changed

+24
-29
lines changed

Chap_API_Server.tex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ \subsection{\code{PMIx_server_init}}
106106
memory backing files or cached key-value pairs) at library finalize.
107107
\pasteAttributeItemEnd{}
108108
\pasteAttributeItem{PMIX_SERVER_ENABLE_MONITORING}
109+
\pasteAttributeItem{PMIX_HOMOGENEOUS_SYSTEM}
109110

110111
\optattrend
111112

@@ -228,6 +229,10 @@ \subsection{Server Initialization Attributes}
228229
\declareAttributeNEW{PMIX_EXTERNAL_PROGRESS}{"pmix.evext"}{bool}{
229230
The host shall progress the \ac{PMIx} library via calls to \refapi{PMIx_Progress}
230231
}
232+
%
233+
\declareAttributeNEW{PMIX_HOMOGENEOUS_SYSTEM}{"pmix.homo"}{bool}{
234+
The nodes comprising the session are homogeneous - i.e., they each contain the same number of identical packages, fabric interfaces, \acp{GPU}, and other devices.
235+
}
231236

232237
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
233238
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Chap_API_Sync_Access.tex

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,9 @@ \section{\code{PMIx_Get}}
208208
Returns one of the following:
209209

210210
\begin{itemize}
211-
\item \refconst{PMIX_SUCCESS} The requested data has been returned.
211+
\item \refconst{PMIX_SUCCESS} The requested data has been returned in the manner requested (i.e., in a provided static memory location )
212+
\item \refconst{PMIX_ERR_BAD_PARAM} A bad parameter was passed to the function call - e.g., the request included the \refattr{PMIX_GET_STATIC_VALUES} directive, but the provided storage location was \code{NULL}
212213
\item \refconst{PMIX_ERR_NOT_FOUND} The requested data was not available.
213-
\item \refconst{PMIX_ERR_GET_MALLOC_REQD} Indicating that the returned value
214-
involves dynamically allocated memory instead of pointing to a static location
215-
as requested (only applies if \refattr{PMIX_GET_STATIC_VALUES} was included in the request).
216214
\item a non-zero \ac{PMIx} error constant indicating a reason for the request's failure.
217215
\end{itemize}
218216

@@ -227,6 +225,7 @@ \section{\code{PMIx_Get}}
227225
\pasteAttributeItem{PMIX_APP_INFO}
228226
\pasteAttributeItem{PMIX_NODE_INFO}
229227
\pasteAttributeItem{PMIX_GET_STATIC_VALUES}
228+
\pasteAttributeItem{PMIX_GET_POINTER_VALUES}
230229

231230
\reqattrend
232231

@@ -240,7 +239,13 @@ \section{\code{PMIx_Get}}
240239
%%%%
241240
\descr
242241

243-
Retrieve information for the specified \refarg{key} associated with the process identified in the given \refstruct{pmix_proc_t}, returning a pointer to the \refstruct{pmix_value_t} containing the result in the given address. See Chapters \ref{chap:api_rsvd_keys} and \ref{chap:nrkeys} for details on rules governing retrieval of information.
242+
Retrieve information for the specified \refarg{key} associated with the process identified in the given \refstruct{pmix_proc_t}. See Chapters \ref{chap:api_rsvd_keys} and \ref{chap:nrkeys} for details on rules governing retrieval of information. Information will be returned according to provided directives:
243+
244+
\begin{itemize}
245+
\item In the absence of any directive, the returned \refstruct{pmix_value_t} shall be an allocated memory object. The caller is responsible for releasing the object when done.
246+
\item If \refattr{PMIX_GET_POINTER_VALUES} is given, then the function shall return a pointer to a \refstruct{pmix_value_t} in the \ac{PMIx} library's memory that contains the requested information.
247+
\item If \refattr{PMIX_GET_STATIC_VALUES} is given, then the function shall return the information in the provided \refstruct{pmix_value_t} pointer. In this case, the caller must provide storage for the structure and pass the pointer to that storage in the \refarg{val} parameter.
248+
\end{itemize}
244249

245250
This is a blocking operation - the caller will block until the retrieval rules of Chapters \ref{chap:api_rsvd_keys} or \ref{chap:nrkeys} are met.
246251

@@ -290,9 +295,6 @@ \subsection{\code{PMIx_Get_nb}}
290295
\begin{itemize}
291296
\item \refconst{PMIX_SUCCESS} The requested data has been returned.
292297
\item \refconst{PMIX_ERR_NOT_FOUND} The requested data was not available.
293-
\item \refconst{PMIX_ERR_GET_MALLOC_REQD} Indicating that the returned value
294-
involves dynamically allocated memory instead of pointing to a static location
295-
as requested (only applies if \refattr{PMIX_GET_STATIC_VALUES} was included in the request).
296298
\item a non-zero \ac{PMIx} error constant indicating a reason for the request's failure.
297299
\end{itemize}
298300

@@ -306,7 +308,7 @@ \subsection{\code{PMIx_Get_nb}}
306308
\pasteAttributeItem{PMIX_JOB_INFO}
307309
\pasteAttributeItem{PMIX_APP_INFO}
308310
\pasteAttributeItem{PMIX_NODE_INFO}
309-
\pasteAttributeItem{PMIX_GET_STATIC_VALUES}
311+
\pasteAttributeItem{PMIX_GET_POINTER_VALUES}
310312
\pasteAttributeItem{PMIX_GET_REFRESH_CACHE}
311313

312314
\divider
@@ -328,20 +330,7 @@ \subsection{\code{PMIx_Get_nb}}
328330
\descr
329331

330332
The callback function will be executed once the retrieval rules of Chapters \ref{chap:api_rsvd_keys} or \ref{chap:nrkeys} are met.
331-
See \refapi{PMIx_Get} for a full description.
332-
333-
334-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
335-
\subsection{Retrieval-specific constants}
336-
337-
The following constants are defined for use by retrieval \acp{API}:
338-
339-
\begin{constantdesc}
340-
%
341-
\declareconstitemNEW{PMIX_ERR_GET_MALLOC_REQD}
342-
The data returned by \refapi{PMIx_Get} contains values that include dynamic memory allocations (i.e., "malloc"), despite a request for static pointers to the values in the key-value store. User is responsible for releasing the memory when done with the information.
343-
%
344-
\end{constantdesc}
333+
See \refapi{PMIx_Get} for a full description. Note that the non-blocking form of this function cannot support the \refattr{PMIX_GET_STATIC_VALUES} attribute as the user cannot pass in the required pointer to storage for the result.
345334

346335

347336
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -359,8 +348,12 @@ \subsection{Retrieval attributes}
359348
Specified operation should immediately return an error from the \ac{PMIx} server if the requested data cannot be found - do not request it from the host \ac{RM}.
360349
}
361350
%
351+
\declareAttributeNEW{PMIX_GET_POINTER_VALUES}{"pmix.get.pntrs"}{bool}{
352+
Request that any pointers in the returned value point directly to values in the key-value store. The user \emph{must not} release any returned data pointers.
353+
}
354+
%
362355
\declareAttributeNEW{PMIX_GET_STATIC_VALUES}{"pmix.get.static"}{bool}{
363-
Request that any pointers in the returned value point directly to values in the key-value store. The user \emph{must not} release any returned data pointers. Note that a return status of \refconst{PMIX_ERR_GET_MALLOC_REQD} indicates that direct pointers could not be supported - in which case, the returned data contains allocated memory that the user must release.
356+
Request that the data be returned in the provided storage location. The caller is responsible for destructing the \refstruct{pmix_value_t} using the \refmacro{PMIX_VALUE_DESTRUCT} macro when done.
364357
}
365358
%
366359
\declareAttributeNEW{PMIX_GET_REFRESH_CACHE}{"pmix.get.refresh"}{bool}{

Chap_Revisions.tex

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,6 @@ \subsection{Added Constants}
428428
\refconst{PMIX_LOCTYPE}
429429
\refconst{PMIX_DATA_TYPE_MAX}
430430

431-
\littleheader{Query constants}
432-
\refconst{PMIX_ERR_GET_MALLOC_REQD}
433-
%
434431
%
435432
\littleheader{Server constants}
436433
\refconst{PMIX_ERR_REPEAT_ATTR_REGISTRATION}
@@ -530,6 +527,7 @@ \subsection{Added Attributes}
530527
%
531528
\pasteAttributeItem{PMIX_COLLECT_GENERATED_JOB_INFO}
532529
\pasteAttributeItem{PMIX_ALL_CLONES_PARTICIPATE}
530+
\pasteAttributeItem{PMIX_GET_POINTER_VALUES}
533531
\pasteAttributeItem{PMIX_GET_STATIC_VALUES}
534532
\pasteAttributeItem{PMIX_GET_REFRESH_CACHE}
535533
\pasteAttributeItem{PMIX_QUERY_RESULTS}
@@ -564,6 +562,7 @@ \subsection{Added Attributes}
564562
\pasteAttributeItem{PMIX_MAX_VALUE}
565563
\pasteAttributeItem{PMIX_MIN_VALUE}
566564
\pasteAttributeItem{PMIX_ENUM_VALUE}
565+
\pasteAttributeItem{PMIX_HOMOGENEOUS_SYSTEM}
567566
%
568567
%
569568
\littleheader{Job-Mgmt attributes}

Chap_Terms.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ \chapter{PMIx Terms and Conventions}
3434

3535
\item \declaretermAlt{clone}{clones} refers to a process that was directly started by a \ac{PMIx} client (e.g., using \emph{fork/exec}) and calls \refapi{PMIx_Init}, thus connecting to its local \ac{PMIx} server using the same namespace and rank as its parent process.
3636

37-
\item \declaretermAlt{slot}{slots} refers to an allocated entry for a process. \acp{WLM} frequently allocate entire nodes to a \emph{session}, but can also be configured to define the maximum number of processes that can simultaneously be executed on each node. This often corresponds to the number of hardware \acp{PU} (typically cores, but can also be defined as hardware threads) on the node. However, the correlation between hardware \acp{PU} and slot allocations strictly depends upon system configuration.
38-
3937
\item \declareterm{rank} refers to the numerical location (starting from zero) of a process within the defined scope. Thus, \emph{job rank} is the rank of a process within its \emph{job} and is synonymous with its unqualified \emph{rank}, while \emph{application rank} is the rank of that process within its \emph{application}.
4038

4139
\item \declaretermAlt{peer}{peers} refers to another process within the same \refterm{job}.

0 commit comments

Comments
 (0)