You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Chap_API_Publish.tex
+33-47Lines changed: 33 additions & 47 deletions
Original file line number
Diff line number
Diff line change
@@ -76,23 +76,31 @@ \section{\code{PMIx_Publish}}
76
76
ranges. Custom ranges are consider different if they have different members.
77
77
Duplicate keys being published on the same data range shall return the
78
78
\refconst{PMIX_ERR_DUPLICATE_KEY} error.
79
+
publishing to a \declareconstitem{PMIX_RANGE_CUSTOM}
80
+
range which does not include the publisher will prevent
81
+
any processes from using \refapi{PMIX_Lookup} to access the published data.
79
82
80
83
In some cases, implementations may be incapable of distinguishing which
81
84
info keys in the \refarg{info} array are for publishing and which info keys are
82
85
directives. To make it clear, it is recommended that the keys to be published
83
86
are designated by passing them as a \refstruct{pmix_data_array_t} using the
84
87
\refattr{PMIX_DATA_TO_PUBLISH} directive.
85
-
86
-
For the purpose of distinguishing between info array elements that specify keys and attributes, implementations should attempt to
87
-
recognize all standardized attributes to the publish call,
88
-
even attributes the implementation does not support. Non-supported attributes
88
+
If the \refarg{info} array contains a \refattr{PMIX_DATA_TO_PUBLISH} info,
89
+
all other elements of the info array will be treated as directives.
90
+
If the info array does not include a \refattr{PMIX_DATA_TO_PUBLISH} info,
91
+
the implementation should
92
+
distinguishing between info array elements that specify keys and directives as follows:
93
+
All standardized directives to the publish call,
94
+
including optional attributes the implementation does not support,
95
+
should be treated as
96
+
directives. Non-supported directives
89
97
may be ignored as outlined in Section \ref{intro:portability:attributes},
90
98
but should not be treated as data to
91
-
publish. Only if a member of the \refarg{info} array is not recognized
92
-
as an attribute, should it be assumed to be data to be published.
93
-
Since implementations may support custom directives, it is always preferable that
94
-
clients use the \refattr{PMIX_DATA_TO_PUBLISH} directive to clearly designate the
95
-
keys to be published.
99
+
publish. The implementation may treat any custom (non-standardized) directives it
100
+
supports as directives. All other \refarg{info} array elements
101
+
should it be assumed to be data to be published.
102
+
Since additional directives may be added to the standard and implementations may add support for additional custom directives, the use of \refattr{PMIX_DATA_TO_PUBLISH} is the only reliable way to ensure that
103
+
future implementations will not mis-classify elements of an \refarg{info} array.
96
104
97
105
98
106
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -368,8 +376,10 @@ \section{\code{PMIx_Lookup}}
368
376
\descr
369
377
370
378
Lookup information published by a process or host environment using \refapi{PMIx_Publish} or \refapi{PMIx_Publish_nb}.
371
-
By default, the search will be constrained to publishers that fall within the \refconst{PMIX_RANGE_SESSION} range in case duplicate keys exist on different ranges.
372
-
Changes to the range (e.g., expanding the search to all potential publishers via the \refconst{PMIX_RANGE_GLOBAL} constant), and any additional directives, can be provided in the \refstruct{pmix_info_t} array. Data is returned per the retrieval rules of Section \ref{chap:pub:retrules}.
379
+
A lookup operation is always performed on a range which can be specified using the directive \refconst{PMIX_RANGE} or otherwise defaults to \refconst{PMIX_RANGE_SESSION}.
380
+
The lookup operation will be constrained to publishers that fall within
381
+
the range and that published data to the range.
382
+
Data is returned per the retrieval rules of Section \ref{chap:pub:retrules}.
373
383
374
384
The \argref{data} parameter consists of an array of \refstruct{pmix_pdata_t} structures with the keys specifying the requested information.
375
385
Data will be returned for each \code{key} field in the associated \code{value} field of this structure as per the above description of return values. The \code{proc} field in each \refstruct{pmix_pdata_t} structure will contain the namespace/rank of the process that published the data.
@@ -569,44 +579,27 @@ \subsubsection{Lookup data structure support macros}
The retrieval rules for published data primarily revolve around enforcing data access permissions and range constraints.
583
583
All publish and lookup operations operate on a range. If not specified, the range defaults to \refconst{PMIX_RANGE_SESSION}.
584
584
The key being looked up will match with a published key only if all of the following conditions are met:
585
585
586
586
\begin{enumerate}
587
587
\item The lookup key matches the published key.
588
-
\item The publisher of the published key falls within the lookup range specified by the requester.
589
-
\item The requester falls within the range specified by the publisher.
588
+
\item The type of range specified by the publisher is the same as the type of range specified by the requester.
589
+
\item If a custom range is specified by the publisher and the requester, the members described in both cases must be identical.
590
+
\item The publisher must be a member of the requestors range.
591
+
\item The requestor must be a member of the publishers range.
592
+
593
+
%%option2:
594
+
%%
595
+
%% \item The publisher's range must describe the same set of processes as the requestor's range.
596
+
%% \item The requestor must be a member of the range specified.
597
+
%%
598
+
%% The difference here is in how custom ranges are handled in which the publisher is not a member of the custom range it describes. The later case allows the publisher to publish to a custom range that includes a set of processes not including itself.
599
+
590
600
\item If the publisher specified access permissions, the effective \ac{UID} and \ac{GID} of the requester must meet those requirements.
591
601
\end{enumerate}
592
602
593
-
Fig.~\ref{fig:publish_lookup} shows process P0 executing on Host X in Namespace 1 in Session A publishing the key "tree" on three ranges. Publishing to different ranges is allowed.
594
-
However, as the figure demonstrates, doing so must be done carefully to ensure predictable outcomes across different implementations. The figure shows processes P1 and P2 performing various lookup operation on the key "tree" using different ranges.
595
-
Process P1 does not successfully lookup a value for "tree" on the range \refconst{PMIX_RANGE_LOCAL}
596
-
because the only publisher is not within P1's specified range which covers only its
597
-
local host. Similarly, P1 will not successfully lookup a value for "tree" on the range
598
-
\refconst{PMIX_RANGE_NAMESPACE} since the only publisher is not within P1's namespace.
599
-
A lookup of "tree" by P1 on the range \refconst{PMIX_RANGE_GLOBAL} does permit possible matches of keys published by P0. P0 has published "tree" three times,
600
-
but P1 is outside of the P0's node and namespace ranges. Therefore, only the value of "tree"
601
-
published to the session level is retrievable by P1. Notice that the lookup range
602
-
does not need to match the publishing range for a match to occur. The requirement
603
-
is that the requester is in the range specified by the publisher and the publisher is in the range specified by the requester.
604
-
605
-
The figure shows a similar scenario for P2. However, unlike P1, P2 is in the same namespace as P0 which results in two possible published values of
606
-
"tree" that could be returned by a call to \refapi{PMIx_Lookup} by P2 on the range \refconst{PMIX_RANGE_SESSION} or \refconst{PMIX_RANGE_NAMESPACE}.
607
-
An implementation is required to return one of the possible matches in such cases where
608
-
there are multiple possible matches.
609
-
610
603
The status returned by the datastore shall be set to:
611
604
612
605
\begin{itemize}
@@ -622,13 +615,6 @@ \section{Retrieval rules for published data}
622
615
\item a non-zero \ac{PMIx} error constant indicating a reason for the request's failure.
623
616
\end{itemize}
624
617
625
-
\adviceuserstart
626
-
Note that duplicate keys are allowed to exist on different ranges, and that ranges do overlap each other. Thus, if duplicate keys are published on overlapping ranges, it is possible for the datastore to successfully find multiple responses for a given key should publisher and requester specify sufficiently broad ranges. In this situation, the choice of resolving the duplication is left to the datastore implementation - e.g., it may return the first value found in its search, or the value corresponding to the most limited range of the found values, or it may choose to simply return an error.
627
-
628
-
Users are advised to avoid this ambiguity by careful selection of key values and ranges - e.g., by creating range-specific keys where necessary.
0 commit comments