\hypertarget{errcode_8h}{\section{ompi/errhandler/errcode.h File Reference}
\label{errcode_8h}\index{ompi/errhandler/errcode.\+h@{ompi/errhandler/errcode.\+h}}
}
{\ttfamily \#include \char`\"{}ompi\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}mpi.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+object.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+pointer\+\_\+array.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structompi__mpi__errcode__t}{ompi\+\_\+mpi\+\_\+errcode\+\_\+t}
\begin{DoxyCompactList}\small\item\em Back-\/end type for M\+P\+I error codes. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{errcode_8h_aedb4adbf14ceccb5a0925d132e4ed92c}{typedef struct \hyperlink{structompi__mpi__errcode__t}{ompi\+\_\+mpi\+\_\+errcode\+\_\+t} {\bfseries ompi\+\_\+mpi\+\_\+errcode\+\_\+t}}\label{errcode_8h_aedb4adbf14ceccb5a0925d132e4ed92c}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{errcode_8h_ad2ba034c4f628be13a1bcb2669799f49}{static bool \hyperlink{errcode_8h_ad2ba034c4f628be13a1bcb2669799f49}{ompi\+\_\+mpi\+\_\+errcode\+\_\+is\+\_\+invalid} (int errcode)}\label{errcode_8h_ad2ba034c4f628be13a1bcb2669799f49}

\begin{DoxyCompactList}\small\item\em Check for a valid error code. \end{DoxyCompactList}\item 
\hypertarget{errcode_8h_a60b83837a16983222e9a299783c85e73}{static int \hyperlink{errcode_8h_a60b83837a16983222e9a299783c85e73}{ompi\+\_\+mpi\+\_\+errcode\+\_\+get\+\_\+class} (int errcode)}\label{errcode_8h_a60b83837a16983222e9a299783c85e73}

\begin{DoxyCompactList}\small\item\em Return the error class. \end{DoxyCompactList}\item 
\hypertarget{errcode_8h_ac8f259fd4625f1561af844d123ba3a63}{static int {\bfseries ompi\+\_\+mpi\+\_\+errcode\+\_\+is\+\_\+predefined} (int errcode)}\label{errcode_8h_ac8f259fd4625f1561af844d123ba3a63}

\item 
\hypertarget{errcode_8h_a881b489d27378503e9559b18a4936f3f}{static int {\bfseries ompi\+\_\+mpi\+\_\+errnum\+\_\+is\+\_\+class} (int errnum)}\label{errcode_8h_a881b489d27378503e9559b18a4936f3f}

\item 
\hypertarget{errcode_8h_aa7fa96704a6f3ed0bbbdbf28ef8e1026}{static char $\ast$ \hyperlink{errcode_8h_aa7fa96704a6f3ed0bbbdbf28ef8e1026}{ompi\+\_\+mpi\+\_\+errnum\+\_\+get\+\_\+string} (int errnum)}\label{errcode_8h_aa7fa96704a6f3ed0bbbdbf28ef8e1026}

\begin{DoxyCompactList}\small\item\em Return the error string. \end{DoxyCompactList}\item 
int \hyperlink{errcode_8h_a8b6e6ff524ad32ea1421a9da2ba5eddb}{ompi\+\_\+mpi\+\_\+errcode\+\_\+init} (void)
\begin{DoxyCompactList}\small\item\em Initialize the error codes. \end{DoxyCompactList}\item 
int \hyperlink{errcode_8h_a518a703f3cf176badaee16f65a9deb09}{ompi\+\_\+mpi\+\_\+errcode\+\_\+finalize} (void)
\begin{DoxyCompactList}\small\item\em Finalize the error codes. \end{DoxyCompactList}\item 
int \hyperlink{errcode_8h_a9b76fb05d41694ac70338a719b8fb3f3}{ompi\+\_\+mpi\+\_\+errcode\+\_\+add} (int errclass)
\begin{DoxyCompactList}\small\item\em Add an error code. \end{DoxyCompactList}\item 
int \hyperlink{errcode_8h_a327a920fff4d268aa89db1229b2ed319}{ompi\+\_\+mpi\+\_\+errclass\+\_\+add} (void)
\begin{DoxyCompactList}\small\item\em Add an error class. \end{DoxyCompactList}\item 
int \hyperlink{errcode_8h_a34bb7e1c96881ae9b4d49f7088fb8b57}{ompi\+\_\+mpi\+\_\+errnum\+\_\+add\+\_\+string} (int errnum, char $\ast$string, int len)
\begin{DoxyCompactList}\small\item\em Add an error string to an error code. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{errcode_8h_ad1dca403df21b48c8d907ea23d5e9809}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} {\bfseries ompi\+\_\+mpi\+\_\+errcodes}}\label{errcode_8h_ad1dca403df21b48c8d907ea23d5e9809}

\item 
\hypertarget{errcode_8h_acd1e38fe32b68efd0032df239a652153}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int {\bfseries ompi\+\_\+mpi\+\_\+errcode\+\_\+lastused}}\label{errcode_8h_acd1e38fe32b68efd0032df239a652153}

\item 
\hypertarget{errcode_8h_ac16114f73b2248ebc853ffe6a3d258b3}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int {\bfseries ompi\+\_\+mpi\+\_\+errcode\+\_\+lastpredefined}}\label{errcode_8h_ac16114f73b2248ebc853ffe6a3d258b3}

\item 
\hypertarget{errcode_8h_a029ddbac7b82f2b14d3bfb99328fbd13}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \hyperlink{structompi__mpi__errcode__t}{ompi\+\_\+mpi\+\_\+errcode\+\_\+t} {\bfseries ompi\+\_\+err\+\_\+unknown}}\label{errcode_8h_a029ddbac7b82f2b14d3bfb99328fbd13}

\end{DoxyCompactItemize}


\subsection{Function Documentation}
\hypertarget{errcode_8h_a327a920fff4d268aa89db1229b2ed319}{\index{errcode.\+h@{errcode.\+h}!ompi\+\_\+mpi\+\_\+errclass\+\_\+add@{ompi\+\_\+mpi\+\_\+errclass\+\_\+add}}
\index{ompi\+\_\+mpi\+\_\+errclass\+\_\+add@{ompi\+\_\+mpi\+\_\+errclass\+\_\+add}!errcode.\+h@{errcode.\+h}}
\subsubsection[{ompi\+\_\+mpi\+\_\+errclass\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+mpi\+\_\+errclass\+\_\+add (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{errcode_8h_a327a920fff4d268aa89db1229b2ed319}


Add an error class. 


\begin{DoxyParams}{Parameters}
{\em } & none\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new error class on S\+U\+C\+C\+E\+S\+S ($>$0) 

O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R otherwise 
\end{DoxyReturn}


References opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+item().

\hypertarget{errcode_8h_a9b76fb05d41694ac70338a719b8fb3f3}{\index{errcode.\+h@{errcode.\+h}!ompi\+\_\+mpi\+\_\+errcode\+\_\+add@{ompi\+\_\+mpi\+\_\+errcode\+\_\+add}}
\index{ompi\+\_\+mpi\+\_\+errcode\+\_\+add@{ompi\+\_\+mpi\+\_\+errcode\+\_\+add}!errcode.\+h@{errcode.\+h}}
\subsubsection[{ompi\+\_\+mpi\+\_\+errcode\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+mpi\+\_\+errcode\+\_\+add (
\begin{DoxyParamCaption}
\item[{int}]{errclass}
\end{DoxyParamCaption}
)}}\label{errcode_8h_a9b76fb05d41694ac70338a719b8fb3f3}


Add an error code. 


\begin{DoxyParams}{Parameters}
{\em } & error class to which this new error code belongs to\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new error code on S\+U\+C\+C\+E\+S\+S ($>$0) 

O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R otherwise 
\end{DoxyReturn}


References opal\+\_\+pointer\+\_\+array\+\_\+set\+\_\+item().

\hypertarget{errcode_8h_a518a703f3cf176badaee16f65a9deb09}{\index{errcode.\+h@{errcode.\+h}!ompi\+\_\+mpi\+\_\+errcode\+\_\+finalize@{ompi\+\_\+mpi\+\_\+errcode\+\_\+finalize}}
\index{ompi\+\_\+mpi\+\_\+errcode\+\_\+finalize@{ompi\+\_\+mpi\+\_\+errcode\+\_\+finalize}!errcode.\+h@{errcode.\+h}}
\subsubsection[{ompi\+\_\+mpi\+\_\+errcode\+\_\+finalize}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+mpi\+\_\+errcode\+\_\+finalize (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{errcode_8h_a518a703f3cf176badaee16f65a9deb09}


Finalize the error codes. 

\begin{DoxyReturn}{Returns}
O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S Always
\end{DoxyReturn}
Invokes from \hyperlink{mpiruntime_8h_a657cd1789f5cbe7dbb711f6c836398e6}{ompi\+\_\+mpi\+\_\+finalize()}; tears down the error code array. 

References O\+B\+J\+\_\+\+D\+E\+S\+T\+R\+U\+C\+T, O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E, and opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+item().



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

\hypertarget{errcode_8h_a8b6e6ff524ad32ea1421a9da2ba5eddb}{\index{errcode.\+h@{errcode.\+h}!ompi\+\_\+mpi\+\_\+errcode\+\_\+init@{ompi\+\_\+mpi\+\_\+errcode\+\_\+init}}
\index{ompi\+\_\+mpi\+\_\+errcode\+\_\+init@{ompi\+\_\+mpi\+\_\+errcode\+\_\+init}!errcode.\+h@{errcode.\+h}}
\subsubsection[{ompi\+\_\+mpi\+\_\+errcode\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+mpi\+\_\+errcode\+\_\+init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{errcode_8h_a8b6e6ff524ad32ea1421a9da2ba5eddb}


Initialize the error codes. 

\begin{DoxyReturn}{Returns}
O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S Upon success 

O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R Otherwise
\end{DoxyReturn}
Invoked from \hyperlink{mpiruntime_8h_a6352a08abfa7bd8a402a866ecebec0f3}{ompi\+\_\+mpi\+\_\+init()}; sets up all static M\+P\+I error codes, 

References O\+B\+J\+\_\+\+C\+O\+N\+S\+T\+R\+U\+C\+T, and opal\+\_\+pointer\+\_\+array\+\_\+init().



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

\hypertarget{errcode_8h_a34bb7e1c96881ae9b4d49f7088fb8b57}{\index{errcode.\+h@{errcode.\+h}!ompi\+\_\+mpi\+\_\+errnum\+\_\+add\+\_\+string@{ompi\+\_\+mpi\+\_\+errnum\+\_\+add\+\_\+string}}
\index{ompi\+\_\+mpi\+\_\+errnum\+\_\+add\+\_\+string@{ompi\+\_\+mpi\+\_\+errnum\+\_\+add\+\_\+string}!errcode.\+h@{errcode.\+h}}
\subsubsection[{ompi\+\_\+mpi\+\_\+errnum\+\_\+add\+\_\+string}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+mpi\+\_\+errnum\+\_\+add\+\_\+string (
\begin{DoxyParamCaption}
\item[{int}]{errnum, }
\item[{char $\ast$}]{string, }
\item[{int}]{len}
\end{DoxyParamCaption}
)}}\label{errcode_8h_a34bb7e1c96881ae9b4d49f7088fb8b57}


Add an error string to an error code. 


\begin{DoxyParams}{Parameters}
{\em } & error code for which the string is defined \\
\hline
{\em } & error string to add \\
\hline
{\em } & length of the string\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S on success 

O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R on error 
\end{DoxyReturn}


References opal\+\_\+pointer\+\_\+array\+\_\+get\+\_\+item().

