Skip to content

Commit

Permalink
Ensure all attributes are referenced at least once
Browse files Browse the repository at this point in the history
Update the check-attr-refs.py script to ignore PMIX_ATTR_UNDEF as it
cannot be referenced.

Signed-off-by: Ralph Castain <rhc@pmix.org>
  • Loading branch information
rhc54 committed Oct 3, 2020
1 parent ac8bccb commit cfbf42a
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 7 deletions.
9 changes: 9 additions & 0 deletions Chap_API_Event.tex
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,15 @@ \subsubsection{Fault tolerance event attributes}
The time in seconds before the \ac{RM} will execute the indicated operation.
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Hybrid programming event attributes}
\label{api:struct:attributes:hybrid}

The following attributes may be used by programming models to coordinate their use of common resources within a process in conjunction with the \refconst{PMIX_OPENMP_PARALLEL_ENTERED} event:
%
\pasteAttributeItem{PMIX_MODEL_PHASE_NAME}
\pasteAttributeItem{PMIX_MODEL_PHASE_TYPE}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Notification Function}
\declareapi{pmix_notification_fn_t}
Expand Down
4 changes: 0 additions & 4 deletions Chap_API_Fabric.tex
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,6 @@ \section{Fabric Support Attributes}
Total number of fabric devices in the overall system - corresponds to the number of rows or columns in the cost matrix.
}
%
\declareAttributeNEW{PMIX_FABRIC_VIEW}{"pmix.fab.view"}{pmix_coord_view_t}{
Used purely as a qualifier to requests, specifies the view type (e.g., local vs. physical) for the requested information.
}
%
\declareAttributeNEW{PMIX_FABRIC_DIMS}{"pmix.fab.dims"}{uint32_t}{
Number of dimensions in the specified fabric plane/view. If no plane is specified in a request, then the dimensions of all planes in the overall system will be returned as a \refstruct{pmix_data_array_t} containing an array of \code{uint32_t} values. Default is to provide dimensions in \emph{logical} view.
}
Expand Down
13 changes: 13 additions & 0 deletions Chap_API_Init.tex
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,19 @@ \section{\code{PMIx_Init}}
\pasteAttributeItemBegin{PMIX_TCP_DISABLE_IPV6} If the library supports IPV6 connections, this attribute may be supported for disabling it.
\pasteAttributeItemEnd{}
\pasteAttributeItem{PMIX_EXTERNAL_PROGRESS}

\vspace{\baselineskip}
If provided, the following attributes are used by the event notification system for inter-library coordination:

\pasteAttributeItem{PMIX_PROGRAMMING_MODEL}
\pasteAttributeItem{PMIX_MODEL_LIBRARY_NAME}
\pasteAttributeItem{PMIX_MODEL_LIBRARY_VERSION}
\pasteAttributeItem{PMIX_THREADING_MODEL}
\pasteAttributeItem{PMIX_MODEL_NUM_THREADS}
\pasteAttributeItem{PMIX_MODEL_NUM_CPUS}
\pasteAttributeItem{PMIX_MODEL_CPU_TYPE}
\pasteAttributeItem{PMIX_MODEL_AFFINITY_POLICY}

\optattrend

%%%%
Expand Down
8 changes: 8 additions & 0 deletions Chap_API_Job_Mgmt.tex
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ \subsection{\code{PMIx_Process_monitor}}
\pasteAttributeItem{PMIX_MONITOR_FILE_MODIFY}
\pasteAttributeItem{PMIX_MONITOR_FILE_CHECK_TIME}
\pasteAttributeItem{PMIX_MONITOR_FILE_DROPS}
\pasteAttributeItem{PMIX_SEND_HEARTBEAT}

\optattrend

Expand Down Expand Up @@ -771,6 +772,7 @@ \subsection{\code{PMIx_Process_monitor_nb}}
\pasteAttributeItem{PMIX_MONITOR_FILE_MODIFY}
\pasteAttributeItem{PMIX_MONITOR_FILE_CHECK_TIME}
\pasteAttributeItem{PMIX_MONITOR_FILE_DROPS}
\pasteAttributeItem{PMIX_SEND_HEARTBEAT}

\optattrend

Expand Down Expand Up @@ -952,6 +954,9 @@ \subsection{\code{PMIx_Log}}
\pasteAttributeItem{PMIX_LOG_XML_OUTPUT}
\pasteAttributeItem{PMIX_LOG_EMAIL}
\pasteAttributeItem{PMIX_LOG_EMAIL_ADDR}
\pasteAttributeItem{PMIX_LOG_EMAIL_SENDER_ADDR}
\pasteAttributeItem{PMIX_LOG_EMAIL_SERVER}
\pasteAttributeItem{PMIX_LOG_EMAIL_SRVR_PORT}
\pasteAttributeItem{PMIX_LOG_EMAIL_SUBJECT}
\pasteAttributeItem{PMIX_LOG_EMAIL_MSG}
\pasteAttributeItem{PMIX_LOG_JOB_RECORD}
Expand Down Expand Up @@ -1038,6 +1043,9 @@ \subsection{\code{PMIx_Log_nb}}
\pasteAttributeItem{PMIX_LOG_XML_OUTPUT}
\pasteAttributeItem{PMIX_LOG_EMAIL}
\pasteAttributeItem{PMIX_LOG_EMAIL_ADDR}
\pasteAttributeItem{PMIX_LOG_EMAIL_SENDER_ADDR}
\pasteAttributeItem{PMIX_LOG_EMAIL_SERVER}
\pasteAttributeItem{PMIX_LOG_EMAIL_SRVR_PORT}
\pasteAttributeItem{PMIX_LOG_EMAIL_SUBJECT}
\pasteAttributeItem{PMIX_LOG_EMAIL_MSG}
\pasteAttributeItem{PMIX_LOG_JOB_RECORD}
Expand Down
6 changes: 6 additions & 0 deletions Chap_API_Proc_Mgmt.tex
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ \subsection{\code{PMIx_Spawn}}
\pasteAttributeItem{PMIX_ALLOC_FABRIC_PLANE}
\pasteAttributeItem{PMIX_ALLOC_FABRIC_ENDPTS}
\pasteAttributeItem{PMIX_ALLOC_FABRIC_ENDPTS_NODE}
\pasteAttributeItem{PMIX_COSPAWN_APP}
\pasteAttributeItem{PMIX_SPAWN_TOOL}
\pasteAttributeItem{PMIX_EVENT_SILENT_TERMINATION}

\optattrend

Expand Down Expand Up @@ -282,6 +285,9 @@ \subsection{\code{PMIx_Spawn_nb}}
\pasteAttributeItem{PMIX_ALLOC_FABRIC_PLANE}
\pasteAttributeItem{PMIX_ALLOC_FABRIC_ENDPTS}
\pasteAttributeItem{PMIX_ALLOC_FABRIC_ENDPTS_NODE}
\pasteAttributeItem{PMIX_COSPAWN_APP}
\pasteAttributeItem{PMIX_SPAWN_TOOL}
\pasteAttributeItem{PMIX_EVENT_SILENT_TERMINATION}

\optattrend

Expand Down
17 changes: 17 additions & 0 deletions Chap_API_Server.tex
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,12 @@ \subsection{\code{PMIx_server_register_nspace}}
\item \pasteAttributeItemBegin{PMIX_CLUSTER_ID}As this information is not related to the namespace, it is best passed using the \refapi{PMIx_server_register_resources} \ac{API}.
\pasteAttributeItemEnd
\item \pasteAttributeItem{PMIX_ALLOCATED_NODELIST}
\item \pasteAttributeItemBegin{PMIX_RM_NAME}As this information is not related to the namespace, it is best passed using the \refapi{PMIx_server_register_resources} \ac{API}.
\pasteAttributeItemEnd
\item \pasteAttributeItemBegin{PMIX_RM_VERSION}As this information is not related to the namespace, it is best passed using the \refapi{PMIx_server_register_resources} \ac{API}.
\pasteAttributeItemEnd
\item \pasteAttributeItemBegin{PMIX_SERVER_HOSTNAME}As this information is not related to the namespace, it is best passed using the \refapi{PMIx_server_register_resources} \ac{API}.
\pasteAttributeItemEnd
\end{itemize}

Job-realm information may be passed as individual \refstruct{pmix_info_t} entries, or as part of a \refstruct{pmix_data_array_t} using the \refattr{PMIX_JOB_INFO_ARRAY} attribute. The list of data referenced in this way shall include:
Expand Down Expand Up @@ -414,6 +420,8 @@ \subsection{\code{PMIx_server_register_nspace}}
\item \pasteAttributeItem{PMIX_BINDTO}
\item \pasteAttributeItem{PMIX_HOSTNAME_KEEP_FQDN}
\item \pasteAttributeItem{PMIX_ANL_MAP}
\item \pasteAttributeItem{PMIX_TDIR_RMCLEAN}
\item \pasteAttributeItem{PMIX_CRYPTO_KEY}
\end{itemize}

If more than one application is included in the namespace, then the host environment is also required to supply data consisting of the following items for each application in the job, passed as a \refstruct{pmix_data_array_t} using the \refattr{PMIX_APP_INFO_ARRAY} attribute:
Expand All @@ -435,6 +443,10 @@ \subsection{\code{PMIx_server_register_nspace}}

\begin{itemize}
\item \pasteAttributeItem{PMIX_PSET_NAMES}
\item \pasteAttributeItemBegin{PMIX_APP_MAP_TYPE}This attribute may be provided as an individual \refstruct{pmix_info_t} entry if only one application is included in the namespace.
\pasteAttributeItemEnd
\item \pasteAttributeItemBegin{PMIX_APP_MAP_REGEX}This attribute may be provided as an individual \refstruct{pmix_info_t} entry if only one application is included in the namespace.
\pasteAttributeItemEnd
\end{itemize}

The data may also include attributes provided by the host environment that identify the programming model (as specified by the user) being executed within the application. The \ac{PMIx} server library may utilize this information to customize the environment to fit that model (e.g., adding environmental variables specified by the corresponding standard for that model):
Expand Down Expand Up @@ -2471,6 +2483,11 @@ \subsection{\code{pmix_server_dmodex_req_fn_t}}

\reqattrstart
\ac{PMIx} libraries are required to pass any provided attributes to the host environment for processing.

All host environments are required to support the following attributes:

\pasteAttributeItem{PMIX_REQUIRED_KEY}

\reqattrend

\optattrstart
Expand Down
12 changes: 12 additions & 0 deletions Chap_API_Sync_Access.tex
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ \subsection{\code{PMIx_Query_info}}
\pasteAttributeItem{PMIX_JOB_INFO}
\pasteAttributeItem{PMIX_APP_INFO}
\pasteAttributeItem{PMIX_NODE_INFO}
\pasteAttributeItem{PMIX_PROC_INFO}
\pasteAttributeItemBegin{PMIX_PROCID}In this context, specifies the process ID whose information is being requested - e.g., a query asking for the \refstruct{pmix_proc_info_t} of a specified process. Only required when the request is for information on a specific process.
\pasteAttributeItemEnd
\pasteAttributeItemBegin{PMIX_NSPACE}Specifies the namespace of the process whose information is being requested. Must be accompanied by the \refattr{PMIX_RANK} attribute. Only required when the request is for information on a specific process.
Expand Down Expand Up @@ -562,6 +563,11 @@ \subsection{\code{PMIx_Query_info}}
\pasteAttributeItemEnd
\pasteAttributeItemBegin{PMIX_PROC_URI} Requests the URI of the specified \ac{PMIx} server's out-of-band connection. Defaults to requesting the information for the local \ac{PMIx} server.
\pasteAttributeItemEnd
\pasteAttributeItem{PMIX_CLIENT_AVG_MEMORY}
\pasteAttributeItem{PMIX_DAEMON_MEMORY}
\pasteAttributeItem{PMIX_QUERY_AUTHORIZATIONS}
\pasteAttributeItem{PMIX_PROC_PID}
\pasteAttributeItem{PMIX_PROC_STATE_STATUS}

\optattrend

Expand Down Expand Up @@ -638,6 +644,7 @@ \subsection{\code{PMIx_Query_info_nb}}
\pasteAttributeItem{PMIX_JOB_INFO}
\pasteAttributeItem{PMIX_APP_INFO}
\pasteAttributeItem{PMIX_NODE_INFO}
\pasteAttributeItem{PMIX_PROC_INFO}
\pasteAttributeItemBegin{PMIX_PROCID}In this context, specifies the process ID whose information is being requested - e.g., a query asking for the \refstruct{pmix_proc_info_t} of a specified process. Only required when the request is for information on a specific process.
\pasteAttributeItemEnd
\pasteAttributeItemBegin{PMIX_NSPACE}Specifies the namespace of the process whose information is being requested. Must be accompanied by the \refattr{PMIX_RANK} attribute. Only required when the request is for information on a specific process.
Expand Down Expand Up @@ -676,6 +683,11 @@ \subsection{\code{PMIx_Query_info_nb}}
\pasteAttributeItemEnd
\pasteAttributeItemBegin{PMIX_PROC_URI} Requests the URI of the specified \ac{PMIx} server's out-of-band connection. Defaults to requesting the information for the local \ac{PMIx} server.
\pasteAttributeItemEnd
\pasteAttributeItem{PMIX_CLIENT_AVG_MEMORY}
\pasteAttributeItem{PMIX_DAEMON_MEMORY}
\pasteAttributeItem{PMIX_QUERY_AUTHORIZATIONS}
\pasteAttributeItem{PMIX_PROC_PID}
\pasteAttributeItem{PMIX_PROC_STATE_STATUS}

\optattrend

Expand Down
6 changes: 3 additions & 3 deletions bin/check-attr-refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
if p.returncode != 0:
print("Error: Failed to verify declared attribute \""+attr+"\". grep error code "+str(p.returncode)+")");
sys.exit(2)

# List of Definition is larger than attribute list
for line in p.stdout:
line = line.rstrip()
Expand Down Expand Up @@ -181,10 +181,10 @@
#
for attr in sorted(attr_declared):
if attr_declared[attr] <= 0:
if attr not in deprecated_attr:
if attr not in deprecated_attr and attr != "PMIX_ATTR_UNDEF":
print("Attribute Missing Reference: "+attr)
count_not_used += 1
elif args.verbose is True:
elif args.verbose is True and attr != "PMIX_ATTR_UNDEF":
print("=====> Deprecated Attribute Missing Reference: "+attr)


Expand Down

0 comments on commit cfbf42a

Please sign in to comment.