\hypertarget{proc_8h}{\section{ompi/proc/proc.h File Reference}
\label{proc_8h}\index{ompi/proc/proc.\+h@{ompi/proc/proc.\+h}}
}


\hyperlink{structProcess}{Process} identification structure interface.  


{\ttfamily \#include \char`\"{}ompi\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/constants.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/types.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+list.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/dss/dss\+\_\+types.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/paffinity/paffinity.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}orte/types.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t}
\begin{DoxyCompactList}\small\item\em Remote Open M\+P\+I process structure. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{proc_8h_ab8b44db4a2042508886c3a4b1d4d936f}{typedef struct \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} {\bfseries ompi\+\_\+proc\+\_\+t}}\label{proc_8h_ab8b44db4a2042508886c3a4b1d4d936f}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{proc_8h_ab6b06286d7940f41a8b75cf8a6e1531a}{{\bfseries O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+D\+E\+C\+L\+A\+R\+A\+T\+I\+O\+N} (\hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t})}\label{proc_8h_ab6b06286d7940f41a8b75cf8a6e1531a}

\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{proc_8h_a0ff92ba13d2a6e0a59fd535c528e1fe1}{ompi\+\_\+proc\+\_\+init} (void)
\begin{DoxyCompactList}\small\item\em Initialize the O\+M\+P\+I process subsystem. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{proc_8h_a0a2dba5e93b9ba85b14e962ad6c187b3}{ompi\+\_\+proc\+\_\+complete\+\_\+init} (void)
\begin{DoxyCompactList}\small\item\em Complete filling up the proc information (arch, name and locality) for all procs related to this job. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{proc_8h_a56825702552fe308daf592bce0089294}{ompi\+\_\+proc\+\_\+finalize} (void)
\begin{DoxyCompactList}\small\item\em Finalize the O\+M\+P\+I \hyperlink{structProcess}{Process} subsystem. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$$\ast$ \hyperlink{proc_8h_ae584d65061cb75c341a0bdef1a64a82d}{ompi\+\_\+proc\+\_\+world} (size\+\_\+t $\ast$size)
\begin{DoxyCompactList}\small\item\em Returns the list of proc instances associated with this job. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$$\ast$ \hyperlink{proc_8h_a1e5d3f74027f39c54d26a1651d71005f}{ompi\+\_\+proc\+\_\+all} (size\+\_\+t $\ast$size)
\begin{DoxyCompactList}\small\item\em Returns the list of all known proc instances. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$$\ast$ \hyperlink{proc_8h_ac2839f4a0c6a883221c142a4a7958ffd}{ompi\+\_\+proc\+\_\+self} (size\+\_\+t $\ast$size)
\begin{DoxyCompactList}\small\item\em Returns a list of the local process. \end{DoxyCompactList}\item 
static \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$ \hyperlink{proc_8h_a8b6e8f2715fa72beda564292d7e39f18}{ompi\+\_\+proc\+\_\+local} (void)
\begin{DoxyCompactList}\small\item\em Returns a pointer to the local process. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$ \hyperlink{proc_8h_a4f6a2f5b49153c31f6245d1ead06f6d1}{ompi\+\_\+proc\+\_\+find} (const \hyperlink{structorte__process__name__t}{orte\+\_\+process\+\_\+name\+\_\+t} $\ast$name)
\begin{DoxyCompactList}\small\item\em Returns the proc instance for a given name. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{proc_8h_af9a8a900ea53804ec4a3eaecae86d9ff}{ompi\+\_\+proc\+\_\+pack} (\hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$$\ast$proclist, int proclistsize, \hyperlink{structopal__buffer__t}{opal\+\_\+buffer\+\_\+t} $\ast$buf)
\begin{DoxyCompactList}\small\item\em Pack proc list into portable buffer. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{proc_8h_a0e05067a6e171309533e6842b1e922eb}{ompi\+\_\+proc\+\_\+unpack} (\hyperlink{structopal__buffer__t}{opal\+\_\+buffer\+\_\+t} $\ast$buf, int proclistsize, \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$$\ast$$\ast$proclist, int $\ast$newproclistsize, \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$$\ast$$\ast$newproclist)
\begin{DoxyCompactList}\small\item\em Unpack a portable buffer of procs. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int \hyperlink{proc_8h_a489d06c27dd4a56e7a873e868fc47d75}{ompi\+\_\+proc\+\_\+refresh} (void)
\begin{DoxyCompactList}\small\item\em Refresh the O\+M\+P\+I process subsystem. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$ \hyperlink{proc_8h_a00c53158b9980d35d2b61f95cbf122da}{ompi\+\_\+proc\+\_\+local\+\_\+proc}
\begin{DoxyCompactList}\small\item\em Pointer to the \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} structure for the local process. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{structProcess}{Process} identification structure interface. 

\hyperlink{structProcess}{Process} identification structure interface. The \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} structure contatins basic information about the remote (and local) processes. 

\subsection{Function Documentation}
\hypertarget{proc_8h_a1e5d3f74027f39c54d26a1651d71005f}{\index{proc.\+h@{proc.\+h}!ompi\+\_\+proc\+\_\+all@{ompi\+\_\+proc\+\_\+all}}
\index{ompi\+\_\+proc\+\_\+all@{ompi\+\_\+proc\+\_\+all}!proc.\+h@{proc.\+h}}
\subsubsection[{ompi\+\_\+proc\+\_\+all}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C {\bf ompi\+\_\+proc\+\_\+t}$\ast$$\ast$ ompi\+\_\+proc\+\_\+all (
\begin{DoxyParamCaption}
\item[{size\+\_\+t $\ast$}]{size}
\end{DoxyParamCaption}
)}}\label{proc_8h_a1e5d3f74027f39c54d26a1651d71005f}


Returns the list of all known proc instances. 

Returns the list of all known proc instances, including those in other M\+P\+I\+\_\+\+C\+O\+M\+M\+\_\+\+W\+O\+R\+L\+Ds. It is possible that we may no longer be connected to some of the procs returned (in the M\+P\+I sense of the word connected). In a strictly M\+P\+I-\/1 application, this function will return the same information as \hyperlink{proc_8h_ae584d65061cb75c341a0bdef1a64a82d}{ompi\+\_\+proc\+\_\+world()}.

\begin{DoxyNote}{Note}
The reference count of each process in the array is incremented and the caller is responsible for releasing each process in the array, as well as freeing the array.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em size} & Number of processes in the \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} array\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Array of pointers to proc instances in the current known universe, or N\+U\+L\+L if there is an internal failure. 
\end{DoxyReturn}


References O\+B\+J\+\_\+\+R\+E\+T\+A\+I\+N, opal\+\_\+list\+\_\+get\+\_\+end(), opal\+\_\+list\+\_\+get\+\_\+first(), opal\+\_\+list\+\_\+get\+\_\+next, opal\+\_\+list\+\_\+get\+\_\+size(), O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, and O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K.

\hypertarget{proc_8h_a0a2dba5e93b9ba85b14e962ad6c187b3}{\index{proc.\+h@{proc.\+h}!ompi\+\_\+proc\+\_\+complete\+\_\+init@{ompi\+\_\+proc\+\_\+complete\+\_\+init}}
\index{ompi\+\_\+proc\+\_\+complete\+\_\+init@{ompi\+\_\+proc\+\_\+complete\+\_\+init}!proc.\+h@{proc.\+h}}
\subsubsection[{ompi\+\_\+proc\+\_\+complete\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int ompi\+\_\+proc\+\_\+complete\+\_\+init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{proc_8h_a0a2dba5e93b9ba85b14e962ad6c187b3}


Complete filling up the proc information (arch, name and locality) for all procs related to this job. 

This function is to be called only after the modex exchange has been completed.


\begin{DoxyRetVals}{Return values}
{\em O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S} & All information correctly set. \\
\hline
{\em O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R} & Some info could not be initialized.\\
\hline
\end{DoxyRetVals}
Complete filling up the proc information (arch, name and locality) for all procs related to this job.

The second step is the important one, it sets the properties of the remote process, such as architecture, node name and locality flags.

This function is to be called {\bfseries only} after the modex exchange has been performed, in order to allow the modex to carry the data instead of requiring the runtime to provide it. 

References orte\+\_\+proc\+\_\+info\+\_\+t\+::nodename, O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E, ompi\+\_\+modex\+\_\+recv\+\_\+key\+\_\+value(), opal\+\_\+list\+\_\+get\+\_\+end(), opal\+\_\+list\+\_\+get\+\_\+first(), opal\+\_\+list\+\_\+get\+\_\+next, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+U\+I\+N\+T32, O\+R\+T\+E\+\_\+\+P\+R\+O\+C\+\_\+\+M\+Y\+\_\+\+N\+A\+M\+E, orte\+\_\+process\+\_\+info, orte\+\_\+show\+\_\+help(), ompi\+\_\+proc\+\_\+t\+::proc\+\_\+arch, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+convertor, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+flags, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+hostname, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+name, and orte\+\_\+process\+\_\+name\+\_\+t\+::vpid.



Referenced by ompi\+\_\+mpi\+\_\+init().

\hypertarget{proc_8h_a56825702552fe308daf592bce0089294}{\index{proc.\+h@{proc.\+h}!ompi\+\_\+proc\+\_\+finalize@{ompi\+\_\+proc\+\_\+finalize}}
\index{ompi\+\_\+proc\+\_\+finalize@{ompi\+\_\+proc\+\_\+finalize}!proc.\+h@{proc.\+h}}
\subsubsection[{ompi\+\_\+proc\+\_\+finalize}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int ompi\+\_\+proc\+\_\+finalize (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{proc_8h_a56825702552fe308daf592bce0089294}


Finalize the O\+M\+P\+I \hyperlink{structProcess}{Process} subsystem. 

Finalize the Open M\+P\+I process subsystem. This function will release all memory created during the life of the application, including all \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} structures.


\begin{DoxyRetVals}{Return values}
{\em O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S} & System successfully finalized \\
\hline
\end{DoxyRetVals}


References O\+B\+J\+\_\+\+D\+E\+S\+T\+R\+U\+C\+T, O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E, opal\+\_\+list\+\_\+get\+\_\+end(), and opal\+\_\+list\+\_\+get\+\_\+first().



Referenced by ompi\+\_\+mpi\+\_\+finalize().

\hypertarget{proc_8h_a4f6a2f5b49153c31f6245d1ead06f6d1}{\index{proc.\+h@{proc.\+h}!ompi\+\_\+proc\+\_\+find@{ompi\+\_\+proc\+\_\+find}}
\index{ompi\+\_\+proc\+\_\+find@{ompi\+\_\+proc\+\_\+find}!proc.\+h@{proc.\+h}}
\subsubsection[{ompi\+\_\+proc\+\_\+find}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C {\bf ompi\+\_\+proc\+\_\+t}$\ast$ ompi\+\_\+proc\+\_\+find (
\begin{DoxyParamCaption}
\item[{const {\bf orte\+\_\+process\+\_\+name\+\_\+t} $\ast$}]{name}
\end{DoxyParamCaption}
)}}\label{proc_8h_a4f6a2f5b49153c31f6245d1ead06f6d1}


Returns the proc instance for a given name. 

Returns the proc instance for the specified process name. The reference count for the proc instance is not incremented by this function.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em name} & The process name to look for\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the process instance for {\ttfamily name} 
\end{DoxyReturn}


References opal\+\_\+list\+\_\+get\+\_\+end(), opal\+\_\+list\+\_\+get\+\_\+first(), opal\+\_\+list\+\_\+get\+\_\+next, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K, orte\+\_\+ns\+\_\+cmp\+\_\+bitmask\+\_\+t, and ompi\+\_\+proc\+\_\+t\+::proc\+\_\+name.



Referenced by mca\+\_\+pml\+\_\+bfo\+\_\+recv\+\_\+frag\+\_\+callback\+\_\+rndvrestartnotify().

\hypertarget{proc_8h_a0ff92ba13d2a6e0a59fd535c528e1fe1}{\index{proc.\+h@{proc.\+h}!ompi\+\_\+proc\+\_\+init@{ompi\+\_\+proc\+\_\+init}}
\index{ompi\+\_\+proc\+\_\+init@{ompi\+\_\+proc\+\_\+init}!proc.\+h@{proc.\+h}}
\subsubsection[{ompi\+\_\+proc\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int ompi\+\_\+proc\+\_\+init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{proc_8h_a0ff92ba13d2a6e0a59fd535c528e1fe1}


Initialize the O\+M\+P\+I process subsystem. 

Initialize the Open M\+P\+I process subsystem. This function will query the run-\/time environment and build a list of the proc instances in the current M\+P\+I\+\_\+\+C\+O\+M\+M\+\_\+\+W\+O\+R\+L\+D. The local information not easily determined by the run-\/time ahead of time (architecture and hostname) will be published during this call.

\begin{DoxyNote}{Note}
While an \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} will exist with mostly valid information for each process in the M\+P\+I\+\_\+\+C\+O\+M\+M\+\_\+\+W\+O\+R\+L\+D at the conclusion of this call, some information will not be immediately available. This includes the architecture and hostname, which will be available by the conclusion of the stage gate.
\end{DoxyNote}

\begin{DoxyRetVals}{Return values}
{\em O\+M\+P\+I\+\_\+\+S\+U\+C\+E\+S\+S} & System successfully initialized \\
\hline
{\em O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R} & Initialization failed due to unspecified error \\
\hline
\end{DoxyRetVals}


References orte\+\_\+process\+\_\+name\+\_\+t\+::jobid, orte\+\_\+proc\+\_\+info\+\_\+t\+::nodename, orte\+\_\+proc\+\_\+info\+\_\+t\+::num\+\_\+procs, O\+B\+J\+\_\+\+C\+O\+N\+S\+T\+R\+U\+C\+T, ompi\+\_\+modex\+\_\+send\+\_\+key\+\_\+value(), opal\+\_\+list\+\_\+append, O\+P\+A\+L\+\_\+\+U\+I\+N\+T32, O\+R\+T\+E\+\_\+\+P\+R\+O\+C\+\_\+\+M\+Y\+\_\+\+N\+A\+M\+E, orte\+\_\+process\+\_\+info, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+arch, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+flags, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+hostname, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+name, and orte\+\_\+process\+\_\+name\+\_\+t\+::vpid.



Referenced by ompi\+\_\+mpi\+\_\+init().

\hypertarget{proc_8h_a8b6e8f2715fa72beda564292d7e39f18}{\index{proc.\+h@{proc.\+h}!ompi\+\_\+proc\+\_\+local@{ompi\+\_\+proc\+\_\+local}}
\index{ompi\+\_\+proc\+\_\+local@{ompi\+\_\+proc\+\_\+local}!proc.\+h@{proc.\+h}}
\subsubsection[{ompi\+\_\+proc\+\_\+local}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf ompi\+\_\+proc\+\_\+t}$\ast$ ompi\+\_\+proc\+\_\+local (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{proc_8h_a8b6e8f2715fa72beda564292d7e39f18}


Returns a pointer to the local process. 

Returns a pointer to the local process. Unlike \hyperlink{proc_8h_ac2839f4a0c6a883221c142a4a7958ffd}{ompi\+\_\+proc\+\_\+self()}, the reference count on the local proc instance is not modified by this function.

\begin{DoxyReturn}{Returns}
Pointer to the local process structure 
\end{DoxyReturn}


References ompi\+\_\+proc\+\_\+local\+\_\+proc.



Referenced by mca\+\_\+btl\+\_\+gm\+\_\+add\+\_\+procs(), mca\+\_\+btl\+\_\+sctp\+\_\+add\+\_\+procs(), mca\+\_\+btl\+\_\+sm\+\_\+add\+\_\+procs(), mca\+\_\+btl\+\_\+smcuda\+\_\+add\+\_\+procs(), mca\+\_\+btl\+\_\+tcp\+\_\+add\+\_\+procs(), mca\+\_\+btl\+\_\+template\+\_\+add\+\_\+procs(), mca\+\_\+btl\+\_\+udapl\+\_\+add\+\_\+procs(), and ompi\+\_\+osc\+\_\+base\+\_\+process\+\_\+op().

\hypertarget{proc_8h_af9a8a900ea53804ec4a3eaecae86d9ff}{\index{proc.\+h@{proc.\+h}!ompi\+\_\+proc\+\_\+pack@{ompi\+\_\+proc\+\_\+pack}}
\index{ompi\+\_\+proc\+\_\+pack@{ompi\+\_\+proc\+\_\+pack}!proc.\+h@{proc.\+h}}
\subsubsection[{ompi\+\_\+proc\+\_\+pack}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int ompi\+\_\+proc\+\_\+pack (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+proc\+\_\+t} $\ast$$\ast$}]{proclist, }
\item[{int}]{proclistsize, }
\item[{{\bf opal\+\_\+buffer\+\_\+t} $\ast$}]{buf}
\end{DoxyParamCaption}
)}}\label{proc_8h_af9a8a900ea53804ec4a3eaecae86d9ff}


Pack proc list into portable buffer. 

This function takes a list of \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} pointers (e.\+g. as given in groups) and returns a orte buffer containing all information needed to add the proc to a remote list. This includes the O\+R\+T\+E process name, the architecture, and the hostname. Ordering is maintained. The buffer is packed to be sent to a remote node with different architecture (endian or word size). The buffer can be dss unloaded to be sent using M\+P\+I or send using rml\+\_\+send\+\_\+packed().


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em proclist} & List of process pointers \\
\hline
\mbox{\tt in}  & {\em proclistsize} & Length of the proclist array \\
\hline
\mbox{\tt in,out}  & {\em buf} & An orte\+\_\+buffer containing the packed names. The buffer must be constructed but empty when passed to this function \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S} & Success \\
\hline
{\em O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R} & Unspecified error \\
\hline
\end{DoxyRetVals}


References O\+P\+A\+L\+\_\+\+S\+T\+R\+I\+N\+G, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+U\+I\+N\+T32, and O\+R\+T\+E\+\_\+\+N\+A\+M\+E.

\hypertarget{proc_8h_a489d06c27dd4a56e7a873e868fc47d75}{\index{proc.\+h@{proc.\+h}!ompi\+\_\+proc\+\_\+refresh@{ompi\+\_\+proc\+\_\+refresh}}
\index{ompi\+\_\+proc\+\_\+refresh@{ompi\+\_\+proc\+\_\+refresh}!proc.\+h@{proc.\+h}}
\subsubsection[{ompi\+\_\+proc\+\_\+refresh}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int ompi\+\_\+proc\+\_\+refresh (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{proc_8h_a489d06c27dd4a56e7a873e868fc47d75}


Refresh the O\+M\+P\+I process subsystem. 

Refresh the Open M\+P\+I process subsystem. This function will update the list of proc instances in the current M\+P\+I\+\_\+\+C\+O\+M\+M\+\_\+\+W\+O\+R\+L\+D with data from the run-\/time environemnt.

\begin{DoxyNote}{Note}
This is primarily used when restarting a process and thus need to update the jobid and node name.
\end{DoxyNote}

\begin{DoxyRetVals}{Return values}
{\em O\+M\+P\+I\+\_\+\+S\+U\+C\+E\+S\+S} & System successfully refreshed \\
\hline
{\em O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R} & Refresh failed due to unspecified error \\
\hline
\end{DoxyRetVals}


References orte\+\_\+process\+\_\+name\+\_\+t\+::jobid, orte\+\_\+proc\+\_\+info\+\_\+t\+::nodename, O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E, opal\+\_\+list\+\_\+get\+\_\+end(), opal\+\_\+list\+\_\+get\+\_\+first(), opal\+\_\+list\+\_\+get\+\_\+next, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K, O\+R\+T\+E\+\_\+\+P\+R\+O\+C\+\_\+\+M\+Y\+\_\+\+N\+A\+M\+E, orte\+\_\+process\+\_\+info, orte\+\_\+show\+\_\+help(), ompi\+\_\+proc\+\_\+t\+::proc\+\_\+arch, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+convertor, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+flags, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+hostname, and ompi\+\_\+proc\+\_\+t\+::proc\+\_\+name.

\hypertarget{proc_8h_ac2839f4a0c6a883221c142a4a7958ffd}{\index{proc.\+h@{proc.\+h}!ompi\+\_\+proc\+\_\+self@{ompi\+\_\+proc\+\_\+self}}
\index{ompi\+\_\+proc\+\_\+self@{ompi\+\_\+proc\+\_\+self}!proc.\+h@{proc.\+h}}
\subsubsection[{ompi\+\_\+proc\+\_\+self}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C {\bf ompi\+\_\+proc\+\_\+t}$\ast$$\ast$ ompi\+\_\+proc\+\_\+self (
\begin{DoxyParamCaption}
\item[{size\+\_\+t $\ast$}]{size}
\end{DoxyParamCaption}
)}}\label{proc_8h_ac2839f4a0c6a883221c142a4a7958ffd}


Returns a list of the local process. 

Returns a list containing the local process (and only the local process). Has calling semantics similar to \hyperlink{proc_8h_ae584d65061cb75c341a0bdef1a64a82d}{ompi\+\_\+proc\+\_\+world()} and \hyperlink{proc_8h_a1e5d3f74027f39c54d26a1651d71005f}{ompi\+\_\+proc\+\_\+all()}.

\begin{DoxyNote}{Note}
The reference count of each process in the array is incremented and the caller is responsible for releasing each process in the array, as well as freeing the array.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em size} & Number of processes in the \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} array\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Array of pointers to proc instances in the current known universe, or N\+U\+L\+L if there is an internal failure. 
\end{DoxyReturn}


References O\+B\+J\+\_\+\+R\+E\+T\+A\+I\+N, and ompi\+\_\+proc\+\_\+local\+\_\+proc.

\hypertarget{proc_8h_a0e05067a6e171309533e6842b1e922eb}{\index{proc.\+h@{proc.\+h}!ompi\+\_\+proc\+\_\+unpack@{ompi\+\_\+proc\+\_\+unpack}}
\index{ompi\+\_\+proc\+\_\+unpack@{ompi\+\_\+proc\+\_\+unpack}!proc.\+h@{proc.\+h}}
\subsubsection[{ompi\+\_\+proc\+\_\+unpack}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int ompi\+\_\+proc\+\_\+unpack (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+buffer\+\_\+t} $\ast$}]{buf, }
\item[{int}]{proclistsize, }
\item[{{\bf ompi\+\_\+proc\+\_\+t} $\ast$$\ast$$\ast$}]{proclist, }
\item[{int $\ast$}]{newproclistsize, }
\item[{{\bf ompi\+\_\+proc\+\_\+t} $\ast$$\ast$$\ast$}]{newproclist}
\end{DoxyParamCaption}
)}}\label{proc_8h_a0e05067a6e171309533e6842b1e922eb}


Unpack a portable buffer of procs. 

This function unpacks a packed list of \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} structures and returns the ordered list of proc structures. If the given proc is already \char`\"{}known\char`\"{}, the architecture and hostname information in the buffer is ignored. If the proc is \char`\"{}new\char`\"{} to this process, it will be added to the global list of known procs, with information provided in the buffer. The lookup actions are always entirely local. The proclist returned is a list of pointers to all procs in the buffer, whether they were previously known or are new to this process.

\begin{DoxyNote}{Note}
In previous versions of this function, The P\+M\+L's add\+\_\+procs() function was called for any new processes discovered as a result of this operation. That is no longer the case -- the caller must use the newproclist information to call add\+\_\+procs() if necessary.

The reference count for procs created as a result of this operation will be set to 1. Existing procs will not have their reference count changed. The reference count of a proc at the return of this function is the same regardless of whether N\+U\+L\+L is provided for newproclist. The user is responsible for freeing the newproclist array.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em buf} & orte\+\_\+buffer containing the packed names \\
\hline
\mbox{\tt in}  & {\em proclistsize} & number of expected proc-\/pointres \\
\hline
\mbox{\tt out}  & {\em proclist} & list of process pointers \\
\hline
\mbox{\tt out}  & {\em newproclistsize} & Number of new procs added as a result of the unpack operation. N\+U\+L\+L may be provided if information is not needed. \\
\hline
\mbox{\tt out}  & {\em newproclist} & List of new procs added as a result of the unpack operation. N\+U\+L\+L may be provided if informationis not needed.\\
\hline
\end{DoxyParams}
Return value\+: O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S on success O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R else 

References orte\+\_\+proc\+\_\+info\+\_\+t\+::nodename, O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E, O\+P\+A\+L\+\_\+\+S\+T\+R\+I\+N\+G, O\+P\+A\+L\+\_\+\+U\+I\+N\+T32, O\+R\+T\+E\+\_\+\+N\+A\+M\+E, orte\+\_\+process\+\_\+info, orte\+\_\+show\+\_\+help(), ompi\+\_\+proc\+\_\+t\+::proc\+\_\+arch, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+convertor, ompi\+\_\+proc\+\_\+t\+::proc\+\_\+flags, and ompi\+\_\+proc\+\_\+t\+::proc\+\_\+hostname.

\hypertarget{proc_8h_ae584d65061cb75c341a0bdef1a64a82d}{\index{proc.\+h@{proc.\+h}!ompi\+\_\+proc\+\_\+world@{ompi\+\_\+proc\+\_\+world}}
\index{ompi\+\_\+proc\+\_\+world@{ompi\+\_\+proc\+\_\+world}!proc.\+h@{proc.\+h}}
\subsubsection[{ompi\+\_\+proc\+\_\+world}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C {\bf ompi\+\_\+proc\+\_\+t}$\ast$$\ast$ ompi\+\_\+proc\+\_\+world (
\begin{DoxyParamCaption}
\item[{size\+\_\+t $\ast$}]{size}
\end{DoxyParamCaption}
)}}\label{proc_8h_ae584d65061cb75c341a0bdef1a64a82d}


Returns the list of proc instances associated with this job. 

Returns the list of proc instances associated with this job. Given the current association between a job and an M\+P\+I\+\_\+\+C\+O\+M\+M\+\_\+\+W\+O\+R\+L\+D, this function provides the process instances for the current M\+P\+I\+\_\+\+C\+O\+M\+M\+\_\+\+W\+O\+R\+L\+D.

\begin{DoxyNote}{Note}
The reference count of each process in the array is N\+O\+T incremented -\/ the caller is responsible for ensuring the correctness of the reference count once they are done with the array.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em size} & Number of processes in the \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} array\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Array of pointers to proc instances in the current M\+P\+I\+\_\+\+C\+O\+M\+M\+\_\+\+W\+O\+R\+L\+D, or N\+U\+L\+L if there is an internal failure. 
\end{DoxyReturn}


References opal\+\_\+list\+\_\+get\+\_\+end(), opal\+\_\+list\+\_\+get\+\_\+first(), opal\+\_\+list\+\_\+get\+\_\+next, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+L\+O\+C\+K, O\+P\+A\+L\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+U\+N\+L\+O\+C\+K, orte\+\_\+ns\+\_\+cmp\+\_\+bitmask\+\_\+t, and ompi\+\_\+proc\+\_\+t\+::proc\+\_\+name.



Referenced by ompi\+\_\+mpi\+\_\+init().



\subsection{Variable Documentation}
\hypertarget{proc_8h_a00c53158b9980d35d2b61f95cbf122da}{\index{proc.\+h@{proc.\+h}!ompi\+\_\+proc\+\_\+local\+\_\+proc@{ompi\+\_\+proc\+\_\+local\+\_\+proc}}
\index{ompi\+\_\+proc\+\_\+local\+\_\+proc@{ompi\+\_\+proc\+\_\+local\+\_\+proc}!proc.\+h@{proc.\+h}}
\subsubsection[{ompi\+\_\+proc\+\_\+local\+\_\+proc}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C {\bf ompi\+\_\+proc\+\_\+t}$\ast$ ompi\+\_\+proc\+\_\+local\+\_\+proc}}\label{proc_8h_a00c53158b9980d35d2b61f95cbf122da}


Pointer to the \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} structure for the local process. 

Pointer to the \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} structure for the local process.

\begin{DoxyNote}{Note}
This pointer is declared here to allow inline functions within this header file to access the local process quickly. Please use \hyperlink{proc_8h_a8b6e8f2715fa72beda564292d7e39f18}{ompi\+\_\+proc\+\_\+local()} instead. 
\end{DoxyNote}


Referenced by mca\+\_\+btl\+\_\+mx\+\_\+add\+\_\+procs(), mca\+\_\+btl\+\_\+self\+\_\+add\+\_\+procs(), mca\+\_\+pml\+\_\+bfo\+\_\+recv\+\_\+req\+\_\+start(), mca\+\_\+pml\+\_\+ob1\+\_\+recv\+\_\+req\+\_\+start(), ompi\+\_\+proc\+\_\+local(), and ompi\+\_\+proc\+\_\+self().

