\hypertarget{errhandler_2errhandler_8h}{\section{ompi/errhandler/errhandler.h File Reference}
\label{errhandler_2errhandler_8h}\index{ompi/errhandler/errhandler.\+h@{ompi/errhandler/errhandler.\+h}}
}
{\ttfamily \#include \char`\"{}ompi\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}mpi.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/prefetch.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+object.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+pointer\+\_\+array.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/runtime/mpiruntime.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/errhandler/errhandler\+\_\+predefined.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/errhandler/errcode-\/internal.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}orte/types.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structompi__errhandler__t}{ompi\+\_\+errhandler\+\_\+t}
\begin{DoxyCompactList}\small\item\em Back-\/end type for M\+P\+I\+\_\+\+Errorhandler. \end{DoxyCompactList}\item 
struct \hyperlink{structompi__predefined__errhandler__t}{ompi\+\_\+predefined\+\_\+errhandler\+\_\+t}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{errhandler_2errhandler_8h_a060d10b1e048dcc98243af5f380db9c5}{P\+R\+E\+D\+E\+F\+I\+N\+E\+D\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+P\+A\+D}~1024
\begin{DoxyCompactList}\small\item\em Padded struct to maintain back compatibiltiy. \end{DoxyCompactList}\item 
\#define \hyperlink{errhandler_2errhandler_8h_a488691e7800aab1c887ce4a9dce58092}{O\+M\+P\+I\+\_\+\+E\+R\+R\+\_\+\+I\+N\+I\+T\+\_\+\+F\+I\+N\+A\+L\+I\+Z\+E}(name)
\begin{DoxyCompactList}\small\item\em This is the macro to check the state of M\+P\+I and determine whether it was properly initialized and not yet finalized. \end{DoxyCompactList}\item 
\#define \hyperlink{errhandler_2errhandler_8h_aae48126ceceaa3d4b9c1741f98d6f106}{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+I\+N\+V\+O\+K\+E}(mpi\+\_\+object, err\+\_\+code, message)
\begin{DoxyCompactList}\small\item\em This is the macro to invoke to directly invoke an M\+P\+I error handler. \end{DoxyCompactList}\item 
\#define \hyperlink{errhandler_2errhandler_8h_a8f987975fe1a37403692ae6a6ff00d71}{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+C\+H\+E\+C\+K}(rc, mpi\+\_\+object, err\+\_\+code, message)
\begin{DoxyCompactList}\small\item\em Conditionally invoke an M\+P\+I error handler. \end{DoxyCompactList}\item 
\#define \hyperlink{errhandler_2errhandler_8h_a8e525d577fd3a7fe098e3da67561e998}{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+R\+E\+T\+U\+R\+N}(rc, mpi\+\_\+object, err\+\_\+code, message)
\begin{DoxyCompactList}\small\item\em Conditionally invoke an M\+P\+I error handler; if there is no error, return M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{errhandler_2errhandler_8h_abdc26b221276d86df1588ce538593b9b}{typedef void( \hyperlink{errhandler_2errhandler_8h_abdc26b221276d86df1588ce538593b9b}{ompi\+\_\+errhandler\+\_\+fortran\+\_\+handler\+\_\+fn\+\_\+t} )(M\+P\+I\+\_\+\+Fint $\ast$, M\+P\+I\+\_\+\+Fint $\ast$,...)}\label{errhandler_2errhandler_8h_abdc26b221276d86df1588ce538593b9b}

\begin{DoxyCompactList}\small\item\em Typedef for all fortran errhandler functions. \end{DoxyCompactList}\item 
\hypertarget{errhandler_2errhandler_8h_abac702347ab7120bf4dd06b792f01d4d}{typedef void( \hyperlink{errhandler_2errhandler_8h_abac702347ab7120bf4dd06b792f01d4d}{ompi\+\_\+errhandler\+\_\+generic\+\_\+handler\+\_\+fn\+\_\+t} )(void $\ast$, int $\ast$,...)}\label{errhandler_2errhandler_8h_abac702347ab7120bf4dd06b792f01d4d}

\begin{DoxyCompactList}\small\item\em Typedef for generic errhandler function. \end{DoxyCompactList}\item 
\hypertarget{errhandler_2errhandler_8h_aa83d77756df3e73bf186895fa3148c60}{typedef enum \hyperlink{errhandler_2errhandler_8h_a89da43f284cd76d678ed934a0b75ef7a}{ompi\+\_\+errhandler\+\_\+lang\+\_\+t} {\bfseries ompi\+\_\+errhandler\+\_\+lang\+\_\+t}}\label{errhandler_2errhandler_8h_aa83d77756df3e73bf186895fa3148c60}

\item 
\hypertarget{errhandler_2errhandler_8h_af9c2eaa327b75d722e8f40f4c6d8acb8}{typedef enum \hyperlink{errhandler_2errhandler_8h_a4f10d3a80be3139a8958f9edbf82c735}{ompi\+\_\+errhandler\+\_\+type\+\_\+t} {\bfseries ompi\+\_\+errhandler\+\_\+type\+\_\+t}}\label{errhandler_2errhandler_8h_af9c2eaa327b75d722e8f40f4c6d8acb8}

\item 
\hypertarget{errhandler_2errhandler_8h_a4c36d8794a6c255e9ea441cd2ee8be05}{typedef void( \hyperlink{errhandler_2errhandler_8h_a4c36d8794a6c255e9ea441cd2ee8be05}{ompi\+\_\+errhandler\+\_\+cxx\+\_\+dispatch\+\_\+fn\+\_\+t} )(struct \hyperlink{structompi__errhandler__t}{ompi\+\_\+errhandler\+\_\+t} $\ast$errhandler, void $\ast$handle, int $\ast$err\+\_\+code, const char $\ast$message)}\label{errhandler_2errhandler_8h_a4c36d8794a6c255e9ea441cd2ee8be05}

\begin{DoxyCompactList}\small\item\em C++ invocation function signature. \end{DoxyCompactList}\item 
\hypertarget{errhandler_2errhandler_8h_a15326f0a0b9c76b73cd3f3f4c28dadaa}{typedef struct \hyperlink{structompi__errhandler__t}{ompi\+\_\+errhandler\+\_\+t} {\bfseries ompi\+\_\+errhandler\+\_\+t}}\label{errhandler_2errhandler_8h_a15326f0a0b9c76b73cd3f3f4c28dadaa}

\item 
\hypertarget{errhandler_2errhandler_8h_a5b2d89fa96168ebabf4318278cf34304}{typedef struct \\*
\hyperlink{structompi__predefined__errhandler__t}{ompi\+\_\+predefined\+\_\+errhandler\+\_\+t} {\bfseries ompi\+\_\+predefined\+\_\+errhandler\+\_\+t}}\label{errhandler_2errhandler_8h_a5b2d89fa96168ebabf4318278cf34304}

\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\hypertarget{errhandler_2errhandler_8h_ab39a415800ebd0d977c477376649649b}{enum \{ {\bfseries O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+N\+U\+L\+L\+\_\+\+F\+O\+R\+T\+R\+A\+N} = 0, 
{\bfseries O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R\+S\+\_\+\+A\+R\+E\+\_\+\+F\+A\+T\+A\+L\+\_\+\+F\+O\+R\+T\+R\+A\+N}, 
{\bfseries O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R\+S\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+F\+O\+R\+T\+R\+A\+N}
 \}}\label{errhandler_2errhandler_8h_ab39a415800ebd0d977c477376649649b}

\item 
\hypertarget{errhandler_2errhandler_8h_a89da43f284cd76d678ed934a0b75ef7a}{enum \hyperlink{errhandler_2errhandler_8h_a89da43f284cd76d678ed934a0b75ef7a}{ompi\+\_\+errhandler\+\_\+lang\+\_\+t} \{ {\bfseries O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+L\+A\+N\+G\+\_\+\+C}, 
{\bfseries O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+L\+A\+N\+G\+\_\+\+C\+X\+X}, 
{\bfseries O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+L\+A\+N\+G\+\_\+\+F\+O\+R\+T\+R\+A\+N}
 \}}\label{errhandler_2errhandler_8h_a89da43f284cd76d678ed934a0b75ef7a}

\begin{DoxyCompactList}\small\item\em Enum to denote what language the error handler was created from. \end{DoxyCompactList}\item 
\hypertarget{errhandler_2errhandler_8h_a4f10d3a80be3139a8958f9edbf82c735}{enum \hyperlink{errhandler_2errhandler_8h_a4f10d3a80be3139a8958f9edbf82c735}{ompi\+\_\+errhandler\+\_\+type\+\_\+t} \{ {\bfseries O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+T\+Y\+P\+E\+\_\+\+P\+R\+E\+D\+E\+F\+I\+N\+E\+D}, 
{\bfseries O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+T\+Y\+P\+E\+\_\+\+C\+O\+M\+M}, 
{\bfseries O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+T\+Y\+P\+E\+\_\+\+W\+I\+N}, 
{\bfseries O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+T\+Y\+P\+E\+\_\+\+F\+I\+L\+E}
 \}}\label{errhandler_2errhandler_8h_a4f10d3a80be3139a8958f9edbf82c735}

\begin{DoxyCompactList}\small\item\em Enum used to describe what kind M\+P\+I object an error handler is used for. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{errhandler_2errhandler_8h_a7ad8d2ac156b6110900ed92c65939694}{ompi\+\_\+errhandler\+\_\+init} (void)
\begin{DoxyCompactList}\small\item\em Initialize the error handler interface. \end{DoxyCompactList}\item 
int \hyperlink{errhandler_2errhandler_8h_aba8e6750aadf86e8f5307df36ff20f5e}{ompi\+\_\+errhandler\+\_\+finalize} (void)
\begin{DoxyCompactList}\small\item\em Finalize the error handler interface. \end{DoxyCompactList}\item 
\hypertarget{errhandler_2errhandler_8h_a1a93a824813961f9fe06871a3113d95b}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C int {\bfseries ompi\+\_\+errhandler\+\_\+invoke} (\hyperlink{structompi__errhandler__t}{ompi\+\_\+errhandler\+\_\+t} $\ast$errhandler, void $\ast$mpi\+\_\+object, int type, int err\+\_\+code, const char $\ast$message)}\label{errhandler_2errhandler_8h_a1a93a824813961f9fe06871a3113d95b}

\item 
int \hyperlink{errhandler_2errhandler_8h_a32d7984cb924f40a9aac4cb87bdb2e8e}{ompi\+\_\+errhandler\+\_\+request\+\_\+invoke} (int count, struct \hyperlink{structompi__request__t}{ompi\+\_\+request\+\_\+t} $\ast$$\ast$requests, const char $\ast$message)
\begin{DoxyCompactList}\small\item\em Invoke an M\+P\+I exception on the first request found in the array that has a non-\/\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S value for M\+P\+I\+\_\+\+E\+R\+R\+O\+R in its status. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \hyperlink{structompi__errhandler__t}{ompi\+\_\+errhandler\+\_\+t} $\ast$ \hyperlink{errhandler_2errhandler_8h_a7b47f374a5294004c2a1eb57e870f6f5}{ompi\+\_\+errhandler\+\_\+create} (\hyperlink{errhandler_2errhandler_8h_a4f10d3a80be3139a8958f9edbf82c735}{ompi\+\_\+errhandler\+\_\+type\+\_\+t} object\+\_\+type, \hyperlink{errhandler_2errhandler_8h_abac702347ab7120bf4dd06b792f01d4d}{ompi\+\_\+errhandler\+\_\+generic\+\_\+handler\+\_\+fn\+\_\+t} $\ast$func, \hyperlink{errhandler_2errhandler_8h_a89da43f284cd76d678ed934a0b75ef7a}{ompi\+\_\+errhandler\+\_\+lang\+\_\+t} language)
\begin{DoxyCompactList}\small\item\em Create a \hyperlink{structompi__errhandler__t}{ompi\+\_\+errhandler\+\_\+t}. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C void \hyperlink{errhandler_2errhandler_8h_ac8c00a8dfbdc88c3b450e734d705ea17}{ompi\+\_\+errhandler\+\_\+runtime\+\_\+callback} (\hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$procs)
\begin{DoxyCompactList}\small\item\em Callback function from runtime layer to alert the M\+P\+I layer of an error at the runtime layer. \end{DoxyCompactList}\item 
static bool \hyperlink{errhandler_2errhandler_8h_aa3e8455467b1e2abb2b181067d326706}{ompi\+\_\+errhandler\+\_\+is\+\_\+intrinsic} (\hyperlink{structompi__errhandler__t}{ompi\+\_\+errhandler\+\_\+t} $\ast$errhandler)
\begin{DoxyCompactList}\small\item\em Check to see if an errhandler is intrinsic. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{errhandler_2errhandler_8h_a4f069294e1b21f9b2d8079246cc32102}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \\*
\hyperlink{structompi__predefined__errhandler__t}{ompi\+\_\+predefined\+\_\+errhandler\+\_\+t} \hyperlink{errhandler_2errhandler_8h_a4f069294e1b21f9b2d8079246cc32102}{ompi\+\_\+mpi\+\_\+errhandler\+\_\+null}}\label{errhandler_2errhandler_8h_a4f069294e1b21f9b2d8079246cc32102}

\begin{DoxyCompactList}\small\item\em Global variable for M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+N\+U\+L\+L. \end{DoxyCompactList}\item 
\hypertarget{errhandler_2errhandler_8h_a96d2bfd6568905be0a99c2223f814653}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \\*
\hyperlink{structompi__predefined__errhandler__t}{ompi\+\_\+predefined\+\_\+errhandler\+\_\+t} \hyperlink{errhandler_2errhandler_8h_a96d2bfd6568905be0a99c2223f814653}{ompi\+\_\+mpi\+\_\+errors\+\_\+are\+\_\+fatal}}\label{errhandler_2errhandler_8h_a96d2bfd6568905be0a99c2223f814653}

\begin{DoxyCompactList}\small\item\em Global variable for M\+P\+I\+\_\+\+E\+R\+R\+O\+R\+S\+\_\+\+A\+R\+E\+\_\+\+F\+A\+T\+A\+L. \end{DoxyCompactList}\item 
\hypertarget{errhandler_2errhandler_8h_a14f279616f8360f97f0385d48f3e4dbb}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \\*
\hyperlink{structompi__predefined__errhandler__t}{ompi\+\_\+predefined\+\_\+errhandler\+\_\+t} \hyperlink{errhandler_2errhandler_8h_a14f279616f8360f97f0385d48f3e4dbb}{ompi\+\_\+mpi\+\_\+errors\+\_\+return}}\label{errhandler_2errhandler_8h_a14f279616f8360f97f0385d48f3e4dbb}

\begin{DoxyCompactList}\small\item\em Global variable for M\+P\+I\+\_\+\+E\+R\+R\+O\+R\+S\+\_\+\+R\+E\+T\+U\+R\+N. \end{DoxyCompactList}\item 
O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \\*
\hyperlink{structompi__predefined__errhandler__t}{ompi\+\_\+predefined\+\_\+errhandler\+\_\+t} \hyperlink{errhandler_2errhandler_8h_a8f7887f0c6c6f86e315cf6407476ea35}{ompi\+\_\+mpi\+\_\+errors\+\_\+throw\+\_\+exceptions}
\begin{DoxyCompactList}\small\item\em Global variable for M\+P\+I\+::\+E\+R\+R\+O\+R\+S\+\_\+\+T\+H\+R\+O\+W\+\_\+\+E\+X\+C\+E\+P\+T\+I\+O\+N\+S. \end{DoxyCompactList}\item 
\hypertarget{errhandler_2errhandler_8h_aea4dde0cdb3cf87d7aa80b7d32abb200}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \hyperlink{structopal__pointer__array__t}{opal\+\_\+pointer\+\_\+array\+\_\+t} \hyperlink{errhandler_2errhandler_8h_aea4dde0cdb3cf87d7aa80b7d32abb200}{ompi\+\_\+errhandler\+\_\+f\+\_\+to\+\_\+c\+\_\+table}}\label{errhandler_2errhandler_8h_aea4dde0cdb3cf87d7aa80b7d32abb200}

\begin{DoxyCompactList}\small\item\em Table for Fortran $<$-\/$>$ C errhandler handle conversion. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\hypertarget{errhandler_2errhandler_8h_a488691e7800aab1c887ce4a9dce58092}{\index{errhandler/errhandler.\+h@{errhandler/errhandler.\+h}!O\+M\+P\+I\+\_\+\+E\+R\+R\+\_\+\+I\+N\+I\+T\+\_\+\+F\+I\+N\+A\+L\+I\+Z\+E@{O\+M\+P\+I\+\_\+\+E\+R\+R\+\_\+\+I\+N\+I\+T\+\_\+\+F\+I\+N\+A\+L\+I\+Z\+E}}
\index{O\+M\+P\+I\+\_\+\+E\+R\+R\+\_\+\+I\+N\+I\+T\+\_\+\+F\+I\+N\+A\+L\+I\+Z\+E@{O\+M\+P\+I\+\_\+\+E\+R\+R\+\_\+\+I\+N\+I\+T\+\_\+\+F\+I\+N\+A\+L\+I\+Z\+E}!errhandler/errhandler.\+h@{errhandler/errhandler.\+h}}
\subsubsection[{O\+M\+P\+I\+\_\+\+E\+R\+R\+\_\+\+I\+N\+I\+T\+\_\+\+F\+I\+N\+A\+L\+I\+Z\+E}]{\setlength{\rightskip}{0pt plus 5cm}\#define O\+M\+P\+I\+\_\+\+E\+R\+R\+\_\+\+I\+N\+I\+T\+\_\+\+F\+I\+N\+A\+L\+I\+Z\+E(
\begin{DoxyParamCaption}
\item[{}]{name}
\end{DoxyParamCaption}
)}}\label{errhandler_2errhandler_8h_a488691e7800aab1c887ce4a9dce58092}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{if}( OPAL\_UNLIKELY(!\hyperlink{mpiruntime_8h_a6ca176ecf437e1744c29eed5b0578ac2}{ompi\_mpi\_initialized} || 
      \hyperlink{mpiruntime_8h_a3b0d39387cf48668c78f31eb125e23d9}{ompi\_mpi\_finalized}) ) \{ \(\backslash\)
    ompi\_mpi\_errors\_are\_fatal\_comm\_handler(NULL, NULL, name); \(\backslash\)
  \}
\end{DoxyCode}


This is the macro to check the state of M\+P\+I and determine whether it was properly initialized and not yet finalized. 

This macro directly invokes the ompi\+\_\+mpi\+\_\+errors\+\_\+are\+\_\+fatal\+\_\+handler() when an error occurs because M\+P\+I\+\_\+\+C\+O\+M\+M\+\_\+\+W\+O\+R\+L\+D does not exist (because we're before M\+P\+I\+\_\+\+Init() or after M\+P\+I\+\_\+\+Finalize()). \hypertarget{errhandler_2errhandler_8h_a8f987975fe1a37403692ae6a6ff00d71}{\index{errhandler/errhandler.\+h@{errhandler/errhandler.\+h}!O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+C\+H\+E\+C\+K@{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+C\+H\+E\+C\+K}}
\index{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+C\+H\+E\+C\+K@{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+C\+H\+E\+C\+K}!errhandler/errhandler.\+h@{errhandler/errhandler.\+h}}
\subsubsection[{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+C\+H\+E\+C\+K}]{\setlength{\rightskip}{0pt plus 5cm}\#define O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+C\+H\+E\+C\+K(
\begin{DoxyParamCaption}
\item[{}]{rc, }
\item[{}]{mpi\+\_\+object, }
\item[{}]{err\+\_\+code, }
\item[{}]{message}
\end{DoxyParamCaption}
)}}\label{errhandler_2errhandler_8h_a8f987975fe1a37403692ae6a6ff00d71}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{if}( OPAL\_UNLIKELY(rc != OMPI\_SUCCESS) ) \{ \(\backslash\)
    int \_\_mpi\_err\_code = \hyperlink{errcode-internal_8h_a70220b596b322774dfbf7e3a8697f207}{ompi\_errcode\_get\_mpi\_code}(err\_code);         \(\backslash\)
    OPAL\_CR\_EXIT\_LIBRARY() \(\backslash\)
    ompi\_errhandler\_invoke((mpi\_object)->error\_handler, \(\backslash\)
                           (mpi\_object), \(\backslash\)
                           (\textcolor{keywordtype}{int}) (mpi\_object)->errhandler\_type, \(\backslash\)
                           (\_\_mpi\_err\_code), \(\backslash\)
                           (message)); \(\backslash\)
    return (\_\_mpi\_err\_code); \(\backslash\)
  \}
\end{DoxyCode}


Conditionally invoke an M\+P\+I error handler. 


\begin{DoxyParams}{Parameters}
{\em rc} & The return code to check \\
\hline
{\em mpi\+\_\+object} & The M\+P\+I object to invoke the errhandler on (a comm, win, or win) \\
\hline
{\em err\+\_\+code} & The error code \\
\hline
{\em message} & Any additional message; typically the name of the M\+P\+I function that is invoking the error.\\
\hline
\end{DoxyParams}
This macro will invoke the error handler if the return code is not O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S. \hypertarget{errhandler_2errhandler_8h_aae48126ceceaa3d4b9c1741f98d6f106}{\index{errhandler/errhandler.\+h@{errhandler/errhandler.\+h}!O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+I\+N\+V\+O\+K\+E@{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+I\+N\+V\+O\+K\+E}}
\index{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+I\+N\+V\+O\+K\+E@{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+I\+N\+V\+O\+K\+E}!errhandler/errhandler.\+h@{errhandler/errhandler.\+h}}
\subsubsection[{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+I\+N\+V\+O\+K\+E}]{\setlength{\rightskip}{0pt plus 5cm}\#define O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+I\+N\+V\+O\+K\+E(
\begin{DoxyParamCaption}
\item[{}]{mpi\+\_\+object, }
\item[{}]{err\+\_\+code, }
\item[{}]{message}
\end{DoxyParamCaption}
)}}\label{errhandler_2errhandler_8h_aae48126ceceaa3d4b9c1741f98d6f106}
{\bfseries Value\+:}
\begin{DoxyCode}
ompi\_errhandler\_invoke((mpi\_object)->error\_handler, \(\backslash\)
                         (mpi\_object), \(\backslash\)
                         (\textcolor{keywordtype}{int})(mpi\_object)->errhandler\_type, \(\backslash\)
                         \hyperlink{errcode-internal_8h_a70220b596b322774dfbf7e3a8697f207}{ompi\_errcode\_get\_mpi\_code}(err\_code), \(\backslash\)
                         (message));
\end{DoxyCode}


This is the macro to invoke to directly invoke an M\+P\+I error handler. 


\begin{DoxyParams}{Parameters}
{\em mpi\+\_\+object} & The M\+P\+I object to invoke the errhandler on (a comm, win, or win) \\
\hline
{\em err\+\_\+code} & The error code \\
\hline
{\em message} & Any additional message; typically the name of the M\+P\+I function that is invoking the error.\\
\hline
\end{DoxyParams}
This macro is used when you want to directly invoke the error handler. It is exactly equivalent to calling ompi\+\_\+errhandler\+\_\+invoke() directly, but is provided to have a parallel invocation to \hyperlink{errhandler_2errhandler_8h_a8f987975fe1a37403692ae6a6ff00d71}{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+C\+H\+E\+C\+K()} and \hyperlink{errhandler_2errhandler_8h_a8e525d577fd3a7fe098e3da67561e998}{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+R\+E\+T\+U\+R\+N()}. \hypertarget{errhandler_2errhandler_8h_a8e525d577fd3a7fe098e3da67561e998}{\index{errhandler/errhandler.\+h@{errhandler/errhandler.\+h}!O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+R\+E\+T\+U\+R\+N@{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+R\+E\+T\+U\+R\+N}}
\index{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+R\+E\+T\+U\+R\+N@{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+R\+E\+T\+U\+R\+N}!errhandler/errhandler.\+h@{errhandler/errhandler.\+h}}
\subsubsection[{O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+R\+E\+T\+U\+R\+N}]{\setlength{\rightskip}{0pt plus 5cm}\#define O\+M\+P\+I\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+R\+E\+T\+U\+R\+N(
\begin{DoxyParamCaption}
\item[{}]{rc, }
\item[{}]{mpi\+\_\+object, }
\item[{}]{err\+\_\+code, }
\item[{}]{message}
\end{DoxyParamCaption}
)}}\label{errhandler_2errhandler_8h_a8e525d577fd3a7fe098e3da67561e998}
{\bfseries Value\+:}
\begin{DoxyCode}
OPAL\_CR\_EXIT\_LIBRARY() \(\backslash\)
  if ( OPAL\_UNLIKELY(OMPI\_SUCCESS != rc) ) \{ \(\backslash\)
    int \_\_mpi\_err\_code = \hyperlink{errcode-internal_8h_a70220b596b322774dfbf7e3a8697f207}{ompi\_errcode\_get\_mpi\_code}(err\_code);         \(\backslash\)
    ompi\_errhandler\_invoke((mpi\_object)->error\_handler, \(\backslash\)
                           (mpi\_object), \(\backslash\)
                           (\textcolor{keywordtype}{int})(mpi\_object)->errhandler\_type, \(\backslash\)
                           (\_\_mpi\_err\_code), \(\backslash\)
                           (message)); \(\backslash\)
    return (\_\_mpi\_err\_code); \(\backslash\)
  \} \textcolor{keywordflow}{else} \{ \(\backslash\)
    return MPI\_SUCCESS; \(\backslash\)
  \}
\end{DoxyCode}


Conditionally invoke an M\+P\+I error handler; if there is no error, return M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S. 


\begin{DoxyParams}{Parameters}
{\em rc} & The return code to check \\
\hline
{\em mpi\+\_\+object} & The M\+P\+I object to invoke the errhandler on (a comm, win, or win) \\
\hline
{\em err\+\_\+code} & The error code \\
\hline
{\em message} & Any additional message; typically the name of the M\+P\+I function that is invoking the error.\\
\hline
\end{DoxyParams}
This macro will invoke the error handler if the return code is not O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S. If the return code is O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S, then return M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S. \hypertarget{errhandler_2errhandler_8h_a060d10b1e048dcc98243af5f380db9c5}{\index{errhandler/errhandler.\+h@{errhandler/errhandler.\+h}!P\+R\+E\+D\+E\+F\+I\+N\+E\+D\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+P\+A\+D@{P\+R\+E\+D\+E\+F\+I\+N\+E\+D\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+P\+A\+D}}
\index{P\+R\+E\+D\+E\+F\+I\+N\+E\+D\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+P\+A\+D@{P\+R\+E\+D\+E\+F\+I\+N\+E\+D\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+P\+A\+D}!errhandler/errhandler.\+h@{errhandler/errhandler.\+h}}
\subsubsection[{P\+R\+E\+D\+E\+F\+I\+N\+E\+D\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+P\+A\+D}]{\setlength{\rightskip}{0pt plus 5cm}\#define P\+R\+E\+D\+E\+F\+I\+N\+E\+D\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R\+\_\+\+P\+A\+D~1024}}\label{errhandler_2errhandler_8h_a060d10b1e048dcc98243af5f380db9c5}


Padded struct to maintain back compatibiltiy. 

See \hyperlink{communicator_8h_source}{ompi/communicator/communicator.\+h} comments with struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} for full explanation why we chose the following padding construct for predefines. 

\subsection{Function Documentation}
\hypertarget{errhandler_2errhandler_8h_a7b47f374a5294004c2a1eb57e870f6f5}{\index{errhandler/errhandler.\+h@{errhandler/errhandler.\+h}!ompi\+\_\+errhandler\+\_\+create@{ompi\+\_\+errhandler\+\_\+create}}
\index{ompi\+\_\+errhandler\+\_\+create@{ompi\+\_\+errhandler\+\_\+create}!errhandler/errhandler.\+h@{errhandler/errhandler.\+h}}
\subsubsection[{ompi\+\_\+errhandler\+\_\+create}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C {\bf ompi\+\_\+errhandler\+\_\+t}$\ast$ ompi\+\_\+errhandler\+\_\+create (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+errhandler\+\_\+type\+\_\+t}}]{object\+\_\+type, }
\item[{{\bf ompi\+\_\+errhandler\+\_\+generic\+\_\+handler\+\_\+fn\+\_\+t} $\ast$}]{func, }
\item[{{\bf ompi\+\_\+errhandler\+\_\+lang\+\_\+t}}]{language}
\end{DoxyParamCaption}
)}}\label{errhandler_2errhandler_8h_a7b47f374a5294004c2a1eb57e870f6f5}


Create a \hyperlink{structompi__errhandler__t}{ompi\+\_\+errhandler\+\_\+t}. 


\begin{DoxyParams}{Parameters}
{\em object\+\_\+type} & Enum of the type of M\+P\+I object \\
\hline
{\em func} & \hyperlink{structFunction}{Function} pointer of the error handler\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
errhandler Pointer to the ompi\+\_\+errorhandler\+\_\+t that will be created and returned
\end{DoxyReturn}
This function is called as the back-\/end of all the M\+P\+I\+\_\+$\ast$\+\_\+\+C\+R\+E\+A\+T\+E\+\_\+\+E\+R\+R\+H\+A\+N\+D\+L\+E\+R functions. It creates a new \hyperlink{structompi__errhandler__t}{ompi\+\_\+errhandler\+\_\+t} object, initializes it to the correct object type, and sets the callback function on it.

The type of the function pointer is (arbitrarily) the fortran function handler type. Since this function has to accept 4 different function pointer types (lest we have 4 different functions to create errhandlers), the fortran one was picked arbitrarily. Note that (void$\ast$) is not sufficient because at least theoretically, a sizeof(void$\ast$) may not necessarily be the same as sizeof(void($\ast$)). 

References O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E.

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


Finalize the error handler interface. 

\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 handler interface, and destroys the F2\+C translation table. 

References O\+B\+J\+\_\+\+D\+E\+S\+T\+R\+U\+C\+T.



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

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


Initialize the error handler interface. 

\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 the error handler interface, creates the predefined M\+P\+I errorhandlers, and creates the corresopnding F2\+C translation table. 

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



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

\hypertarget{errhandler_2errhandler_8h_aa3e8455467b1e2abb2b181067d326706}{\index{errhandler/errhandler.\+h@{errhandler/errhandler.\+h}!ompi\+\_\+errhandler\+\_\+is\+\_\+intrinsic@{ompi\+\_\+errhandler\+\_\+is\+\_\+intrinsic}}
\index{ompi\+\_\+errhandler\+\_\+is\+\_\+intrinsic@{ompi\+\_\+errhandler\+\_\+is\+\_\+intrinsic}!errhandler/errhandler.\+h@{errhandler/errhandler.\+h}}
\subsubsection[{ompi\+\_\+errhandler\+\_\+is\+\_\+intrinsic}]{\setlength{\rightskip}{0pt plus 5cm}static bool ompi\+\_\+errhandler\+\_\+is\+\_\+intrinsic (
\begin{DoxyParamCaption}
\item[{{\bf ompi\+\_\+errhandler\+\_\+t} $\ast$}]{errhandler}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{errhandler_2errhandler_8h_aa3e8455467b1e2abb2b181067d326706}


Check to see if an errhandler is intrinsic. 


\begin{DoxyParams}{Parameters}
{\em errhandler} & The errhandler to check\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true If the errhandler is intrinsic 

false If the errhandler is not intrinsic
\end{DoxyReturn}
Self-\/explanitory. This is needed in a few top-\/level M\+P\+I functions; this function is provided to hide the internal structure field names. \hypertarget{errhandler_2errhandler_8h_a32d7984cb924f40a9aac4cb87bdb2e8e}{\index{errhandler/errhandler.\+h@{errhandler/errhandler.\+h}!ompi\+\_\+errhandler\+\_\+request\+\_\+invoke@{ompi\+\_\+errhandler\+\_\+request\+\_\+invoke}}
\index{ompi\+\_\+errhandler\+\_\+request\+\_\+invoke@{ompi\+\_\+errhandler\+\_\+request\+\_\+invoke}!errhandler/errhandler.\+h@{errhandler/errhandler.\+h}}
\subsubsection[{ompi\+\_\+errhandler\+\_\+request\+\_\+invoke}]{\setlength{\rightskip}{0pt plus 5cm}int ompi\+\_\+errhandler\+\_\+request\+\_\+invoke (
\begin{DoxyParamCaption}
\item[{int}]{count, }
\item[{struct {\bf ompi\+\_\+request\+\_\+t} $\ast$$\ast$}]{requests, }
\item[{const char $\ast$}]{message}
\end{DoxyParamCaption}
)}}\label{errhandler_2errhandler_8h_a32d7984cb924f40a9aac4cb87bdb2e8e}


Invoke an M\+P\+I exception on the first request found in the array that has a non-\/\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S value for M\+P\+I\+\_\+\+E\+R\+R\+O\+R in its status. 

It is safe to invoke this function if none of the requests have an outstanding error; M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S will be returned. 

References ompi\+\_\+file\+\_\+t\+::errhandler\+\_\+type, ompi\+\_\+file\+\_\+t\+::error\+\_\+handler, ompi\+\_\+errcode\+\_\+get\+\_\+mpi\+\_\+code(), ompi\+\_\+request\+\_\+free(), ompi\+\_\+request\+\_\+t\+::req\+\_\+mpi\+\_\+object, and ompi\+\_\+request\+\_\+t\+::req\+\_\+type.

\hypertarget{errhandler_2errhandler_8h_ac8c00a8dfbdc88c3b450e734d705ea17}{\index{errhandler/errhandler.\+h@{errhandler/errhandler.\+h}!ompi\+\_\+errhandler\+\_\+runtime\+\_\+callback@{ompi\+\_\+errhandler\+\_\+runtime\+\_\+callback}}
\index{ompi\+\_\+errhandler\+\_\+runtime\+\_\+callback@{ompi\+\_\+errhandler\+\_\+runtime\+\_\+callback}!errhandler/errhandler.\+h@{errhandler/errhandler.\+h}}
\subsubsection[{ompi\+\_\+errhandler\+\_\+runtime\+\_\+callback}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C void ompi\+\_\+errhandler\+\_\+runtime\+\_\+callback (
\begin{DoxyParamCaption}
\item[{{\bf opal\+\_\+pointer\+\_\+array\+\_\+t} $\ast$}]{procs}
\end{DoxyParamCaption}
)}}\label{errhandler_2errhandler_8h_ac8c00a8dfbdc88c3b450e734d705ea17}


Callback function from runtime layer to alert the M\+P\+I layer of an error at the runtime layer. 


\begin{DoxyParams}{Parameters}
{\em procs} & The names of the processes that have failed.\\
\hline
\end{DoxyParams}
This function is used to alert the M\+P\+I layer to a specific fault at the runtime layer. Currently, the only faults reported using this method are process failures. The M\+P\+I layer has the option to perform whatever actions it needs to stabalize itself and continue running, abort, etc.

Callback function from runtime layer to alert the M\+P\+I layer of an error at the runtime layer. 

References ompi\+\_\+mpi\+\_\+abort().



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



\subsection{Variable Documentation}
\hypertarget{errhandler_2errhandler_8h_a8f7887f0c6c6f86e315cf6407476ea35}{\index{errhandler/errhandler.\+h@{errhandler/errhandler.\+h}!ompi\+\_\+mpi\+\_\+errors\+\_\+throw\+\_\+exceptions@{ompi\+\_\+mpi\+\_\+errors\+\_\+throw\+\_\+exceptions}}
\index{ompi\+\_\+mpi\+\_\+errors\+\_\+throw\+\_\+exceptions@{ompi\+\_\+mpi\+\_\+errors\+\_\+throw\+\_\+exceptions}!errhandler/errhandler.\+h@{errhandler/errhandler.\+h}}
\subsubsection[{ompi\+\_\+mpi\+\_\+errors\+\_\+throw\+\_\+exceptions}]{\setlength{\rightskip}{0pt plus 5cm}O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C {\bf ompi\+\_\+predefined\+\_\+errhandler\+\_\+t} ompi\+\_\+mpi\+\_\+errors\+\_\+throw\+\_\+exceptions}}\label{errhandler_2errhandler_8h_a8f7887f0c6c6f86e315cf6407476ea35}


Global variable for M\+P\+I\+::\+E\+R\+R\+O\+R\+S\+\_\+\+T\+H\+R\+O\+W\+\_\+\+E\+X\+C\+E\+P\+T\+I\+O\+N\+S. 

Will abort if M\+P\+I\+\_\+\+I\+N\+I\+T wasn't called as M\+P\+I\+::\+I\+N\+I\+T 