\hypertarget{opal__cr_8c}{\section{opal/runtime/opal\+\_\+cr.c File Reference}
\label{opal__cr_8c}\index{opal/runtime/opal\+\_\+cr.\+c@{opal/runtime/opal\+\_\+cr.\+c}}
}


O\+P\+A\+L Layer Checkpoint/\+Restart Runtime functions.  


{\ttfamily \#include \char`\"{}opal\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include $<$errno.\+h$>$}\\*
{\ttfamily \#include \char`\"{}opal/class/opal\+\_\+object.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/util/opal\+\_\+environ.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/util/show\+\_\+help.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/util/output.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/util/malloc.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/util/keyval\+\_\+parse.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/util/argv.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/memoryhooks/memory.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/base/base.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/runtime/opal\+\_\+cr.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/runtime/opal.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/constants.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/if/base/base.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/memcpy/base/base.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/memory/base/base.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/timer/base/base.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/paffinity/base/base.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/threads/mutex.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/threads/threads.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/crs/base/base.\+h\char`\"{}}\\*
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{opal__cr_8c_ab15b2da7a20e0f78c69fe96e73620d80}{static double {\bfseries opal\+\_\+cr\+\_\+get\+\_\+time} (void)}\label{opal__cr_8c_ab15b2da7a20e0f78c69fe96e73620d80}

\item 
\hypertarget{opal__cr_8c_ad283e314fdb37b15d3989d014fe4f62e}{static void {\bfseries display\+\_\+indv\+\_\+timer\+\_\+core} (double diff, char $\ast$str)}\label{opal__cr_8c_ad283e314fdb37b15d3989d014fe4f62e}

\item 
\hypertarget{opal__cr_8c_aded6d2d36bad5774c37ad29431b30615}{static int {\bfseries extract\+\_\+env\+\_\+vars} (int prev\+\_\+pid, char $\ast$file\+\_\+name)}\label{opal__cr_8c_aded6d2d36bad5774c37ad29431b30615}

\item 
\hypertarget{opal__cr_8c_aa76f5fa2eb1ed1c2b986667a63e0663a}{static void {\bfseries opal\+\_\+cr\+\_\+sigpipe\+\_\+debug\+\_\+signal\+\_\+handler} (int signo)}\label{opal__cr_8c_aa76f5fa2eb1ed1c2b986667a63e0663a}

\item 
\hypertarget{opal__cr_8c_a1cdd888fb86b5e2560c3b70eb22bc6b7}{int {\bfseries opal\+\_\+cr\+\_\+set\+\_\+enabled} (bool en)}\label{opal__cr_8c_a1cdd888fb86b5e2560c3b70eb22bc6b7}

\item 
\hypertarget{opal__cr_8c_aaba2f2d1088cd9febddb1d9f6748dc27}{int \hyperlink{opal__cr_8c_aaba2f2d1088cd9febddb1d9f6748dc27}{opal\+\_\+cr\+\_\+init} (void)}\label{opal__cr_8c_aaba2f2d1088cd9febddb1d9f6748dc27}

\begin{DoxyCompactList}\small\item\em Initialize the notification and coordination elements. \end{DoxyCompactList}\item 
\hypertarget{opal__cr_8c_a327f79545f43a53e65a2436f4a34116a}{int \hyperlink{opal__cr_8c_a327f79545f43a53e65a2436f4a34116a}{opal\+\_\+cr\+\_\+finalize} (void)}\label{opal__cr_8c_a327f79545f43a53e65a2436f4a34116a}

\begin{DoxyCompactList}\small\item\em Finalize the notification and coordination elements. \end{DoxyCompactList}\item 
\hypertarget{opal__cr_8c_ad5280eea20d441fd5d49a86eba9ab126}{void {\bfseries opal\+\_\+cr\+\_\+test\+\_\+if\+\_\+checkpoint\+\_\+ready} (void)}\label{opal__cr_8c_ad5280eea20d441fd5d49a86eba9ab126}

\item 
\hypertarget{opal__cr_8c_af763858a26cd297ae4fb9e569d2fb8a1}{int {\bfseries opal\+\_\+cr\+\_\+inc\+\_\+core\+\_\+prep} (void)}\label{opal__cr_8c_af763858a26cd297ae4fb9e569d2fb8a1}

\item 
\hypertarget{opal__cr_8c_ad8361fad70f8a78adbb7cea5d8749e23}{int {\bfseries opal\+\_\+cr\+\_\+inc\+\_\+core\+\_\+ckpt} (pid\+\_\+t pid, \hyperlink{structopal__crs__base__snapshot__1__0__0__t}{opal\+\_\+crs\+\_\+base\+\_\+snapshot\+\_\+t} $\ast$snapshot, \hyperlink{structopal__crs__base__ckpt__options__1__0__0__t}{opal\+\_\+crs\+\_\+base\+\_\+ckpt\+\_\+options\+\_\+t} $\ast$options, int $\ast$state)}\label{opal__cr_8c_ad8361fad70f8a78adbb7cea5d8749e23}

\item 
\hypertarget{opal__cr_8c_a8e404a428ed090a00407fdfe25a1fd95}{int {\bfseries opal\+\_\+cr\+\_\+inc\+\_\+core\+\_\+recover} (int state)}\label{opal__cr_8c_a8e404a428ed090a00407fdfe25a1fd95}

\item 
int \hyperlink{opal__cr_8c_afd11a17b5c6576b8c88ed4c9de559189}{opal\+\_\+cr\+\_\+inc\+\_\+core} (pid\+\_\+t pid, \hyperlink{structopal__crs__base__snapshot__1__0__0__t}{opal\+\_\+crs\+\_\+base\+\_\+snapshot\+\_\+t} $\ast$snapshot, \hyperlink{structopal__crs__base__ckpt__options__1__0__0__t}{opal\+\_\+crs\+\_\+base\+\_\+ckpt\+\_\+options\+\_\+t} $\ast$options, int $\ast$state)
\begin{DoxyCompactList}\small\item\em \hyperlink{structFunction}{Function} to go through the I\+N\+C. \end{DoxyCompactList}\item 
int \hyperlink{opal__cr_8c_a9be3a1a9f05c64d89037cecdc40867f1}{opal\+\_\+cr\+\_\+coord} (int state)
\begin{DoxyCompactList}\small\item\em Current Coordination callback routines. \end{DoxyCompactList}\item 
\hypertarget{opal__cr_8c_aa37b61c26b9dd814c728ef333e6efa2b}{int {\bfseries opal\+\_\+cr\+\_\+reg\+\_\+notify\+\_\+callback} (\hyperlink{opal__cr_8h_a4f365c8c312e292472ccf2b318d31939}{opal\+\_\+cr\+\_\+notify\+\_\+callback\+\_\+fn\+\_\+t} new\+\_\+func, \hyperlink{opal__cr_8h_a4f365c8c312e292472ccf2b318d31939}{opal\+\_\+cr\+\_\+notify\+\_\+callback\+\_\+fn\+\_\+t} $\ast$prev\+\_\+func)}\label{opal__cr_8c_aa37b61c26b9dd814c728ef333e6efa2b}

\item 
\hypertarget{opal__cr_8c_a62a8d8c1530bc73322ea03048909181b}{int {\bfseries opal\+\_\+cr\+\_\+user\+\_\+inc\+\_\+register\+\_\+callback} (opal\+\_\+cr\+\_\+user\+\_\+inc\+\_\+callback\+\_\+event\+\_\+t \hyperlink{structevent}{event}, \hyperlink{opal__cr_8h_aee72d452b01752374bd46dd739d7b85e}{opal\+\_\+cr\+\_\+user\+\_\+inc\+\_\+callback\+\_\+fn\+\_\+t} function, \hyperlink{opal__cr_8h_aee72d452b01752374bd46dd739d7b85e}{opal\+\_\+cr\+\_\+user\+\_\+inc\+\_\+callback\+\_\+fn\+\_\+t} $\ast$prev\+\_\+function)}\label{opal__cr_8c_a62a8d8c1530bc73322ea03048909181b}

\item 
\hypertarget{opal__cr_8c_a8ae9c23351380029d58453f7c48e2452}{int {\bfseries trigger\+\_\+user\+\_\+inc\+\_\+callback} (opal\+\_\+cr\+\_\+user\+\_\+inc\+\_\+callback\+\_\+event\+\_\+t \hyperlink{structevent}{event}, opal\+\_\+cr\+\_\+user\+\_\+inc\+\_\+callback\+\_\+state\+\_\+t state)}\label{opal__cr_8c_a8ae9c23351380029d58453f7c48e2452}

\item 
\hypertarget{opal__cr_8c_a29212bec58337fd86b37db9533df7453}{int \hyperlink{opal__cr_8c_a29212bec58337fd86b37db9533df7453}{opal\+\_\+cr\+\_\+reg\+\_\+coord\+\_\+callback} (\hyperlink{opal__cr_8h_ad649ac030671cddf47f78952da6a336e}{opal\+\_\+cr\+\_\+coord\+\_\+callback\+\_\+fn\+\_\+t} new\+\_\+func, \hyperlink{opal__cr_8h_ad649ac030671cddf47f78952da6a336e}{opal\+\_\+cr\+\_\+coord\+\_\+callback\+\_\+fn\+\_\+t} $\ast$prev\+\_\+func)}\label{opal__cr_8c_a29212bec58337fd86b37db9533df7453}

\begin{DoxyCompactList}\small\item\em Register a checkpoint coodination routine for a higher level. \end{DoxyCompactList}\item 
\hypertarget{opal__cr_8c_a4cc0efa8b7289bca0c541a9b268dd798}{int {\bfseries opal\+\_\+cr\+\_\+refresh\+\_\+environ} (int prev\+\_\+pid)}\label{opal__cr_8c_a4cc0efa8b7289bca0c541a9b268dd798}

\item 
\hypertarget{opal__cr_8c_a21a121f8cae672ea3606e2ae285320e2}{void \hyperlink{opal__cr_8c_a21a121f8cae672ea3606e2ae285320e2}{opal\+\_\+cr\+\_\+set\+\_\+time} (int idx)}\label{opal__cr_8c_a21a121f8cae672ea3606e2ae285320e2}

\begin{DoxyCompactList}\small\item\em Checkpoint life-\/cycle timing. \end{DoxyCompactList}\item 
\hypertarget{opal__cr_8c_a312836c26268fff4e5bc8be0a98186a9}{void {\bfseries opal\+\_\+cr\+\_\+clear\+\_\+timers} (void)}\label{opal__cr_8c_a312836c26268fff4e5bc8be0a98186a9}

\item 
\hypertarget{opal__cr_8c_a055ffe0563ee3aacdd24295c159bb590}{void {\bfseries opal\+\_\+cr\+\_\+display\+\_\+all\+\_\+timers} (void)}\label{opal__cr_8c_a055ffe0563ee3aacdd24295c159bb590}

\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{opal__cr_8c_a2b9f39fa8ac2740081aea9d3604a448c}{bool {\bfseries opal\+\_\+cr\+\_\+stall\+\_\+check} = false}\label{opal__cr_8c_a2b9f39fa8ac2740081aea9d3604a448c}

\item 
\hypertarget{opal__cr_8c_a6457db2693325527c767092b9b376b71}{bool {\bfseries opal\+\_\+cr\+\_\+currently\+\_\+stalled} = false}\label{opal__cr_8c_a6457db2693325527c767092b9b376b71}

\item 
\hypertarget{opal__cr_8c_a116b15306414d1657ab129957ba163b7}{int {\bfseries opal\+\_\+cr\+\_\+output}}\label{opal__cr_8c_a116b15306414d1657ab129957ba163b7}

\item 
\hypertarget{opal__cr_8c_a11ece2226ba214cf423aaa972750614a}{int {\bfseries opal\+\_\+cr\+\_\+initalized} = 0}\label{opal__cr_8c_a11ece2226ba214cf423aaa972750614a}

\item 
\hypertarget{opal__cr_8c_a4aaeac62bef86d3b2b093ad863ff6959}{static double {\bfseries timer\+\_\+start} \mbox{[}O\+P\+A\+L\+\_\+\+C\+R\+\_\+\+T\+I\+M\+E\+R\+\_\+\+M\+A\+X\mbox{]}}\label{opal__cr_8c_a4aaeac62bef86d3b2b093ad863ff6959}

\item 
\hypertarget{opal__cr_8c_ae117c6180eecc2373bf8e847829c9d2b}{bool {\bfseries opal\+\_\+cr\+\_\+timing\+\_\+barrier\+\_\+enabled} = false}\label{opal__cr_8c_ae117c6180eecc2373bf8e847829c9d2b}

\item 
\hypertarget{opal__cr_8c_aac8d0c5f3a4ca57fc29ba2b5119accd4}{bool {\bfseries opal\+\_\+cr\+\_\+timing\+\_\+enabled} = false}\label{opal__cr_8c_aac8d0c5f3a4ca57fc29ba2b5119accd4}

\item 
\hypertarget{opal__cr_8c_a748f98f66a90bf37f995ae62d9238fce}{int {\bfseries opal\+\_\+cr\+\_\+timing\+\_\+my\+\_\+rank} = 0}\label{opal__cr_8c_a748f98f66a90bf37f995ae62d9238fce}

\item 
\hypertarget{opal__cr_8c_ac0a8ee12865d67fc0799be5fca1a9df5}{int {\bfseries opal\+\_\+cr\+\_\+timing\+\_\+target\+\_\+rank} = 0}\label{opal__cr_8c_ac0a8ee12865d67fc0799be5fca1a9df5}

\item 
\hypertarget{opal__cr_8c_adbf413e7c95cc1b4938dc59b96b55813}{static \\*
\hyperlink{opal__cr_8h_aee72d452b01752374bd46dd739d7b85e}{opal\+\_\+cr\+\_\+user\+\_\+inc\+\_\+callback\+\_\+fn\+\_\+t} {\bfseries cur\+\_\+user\+\_\+coord\+\_\+callback} \mbox{[}O\+M\+P\+I\+\_\+\+C\+R\+\_\+\+I\+N\+C\+\_\+\+M\+A\+X\mbox{]} = \{N\+U\+L\+L\}}\label{opal__cr_8c_adbf413e7c95cc1b4938dc59b96b55813}

\item 
\hypertarget{opal__cr_8c_a39e96125712cd8a611c1a090deb9aa73}{static \hyperlink{opal__cr_8h_ad649ac030671cddf47f78952da6a336e}{opal\+\_\+cr\+\_\+coord\+\_\+callback\+\_\+fn\+\_\+t} {\bfseries cur\+\_\+coord\+\_\+callback} = N\+U\+L\+L}\label{opal__cr_8c_a39e96125712cd8a611c1a090deb9aa73}

\item 
\hypertarget{opal__cr_8c_a7004bfd7e8a7d3e569052d0a8ffe33a4}{static \hyperlink{opal__cr_8h_a4f365c8c312e292472ccf2b318d31939}{opal\+\_\+cr\+\_\+notify\+\_\+callback\+\_\+fn\+\_\+t} {\bfseries cur\+\_\+notify\+\_\+callback} = N\+U\+L\+L}\label{opal__cr_8c_a7004bfd7e8a7d3e569052d0a8ffe33a4}

\item 
\hypertarget{opal__cr_8c_a4277a3250012a10a7bcf84bb7b53f144}{static int {\bfseries core\+\_\+prev\+\_\+pid} = 0}\label{opal__cr_8c_a4277a3250012a10a7bcf84bb7b53f144}

\item 
\hypertarget{opal__cr_8c_a0e45c1c985c35f3b175327d61f9542a4}{char $\ast$ {\bfseries opal\+\_\+cr\+\_\+pipe\+\_\+dir} = N\+U\+L\+L}\label{opal__cr_8c_a0e45c1c985c35f3b175327d61f9542a4}

\item 
\hypertarget{opal__cr_8c_a3866b99775a3cc44d2c75a1e4bb55049}{int {\bfseries opal\+\_\+cr\+\_\+entry\+\_\+point\+\_\+signal} = 0}\label{opal__cr_8c_a3866b99775a3cc44d2c75a1e4bb55049}

\item 
\hypertarget{opal__cr_8c_aa7915a7fdead89f41fb5f8d9b43ac030}{bool {\bfseries opal\+\_\+cr\+\_\+is\+\_\+enabled} = true}\label{opal__cr_8c_aa7915a7fdead89f41fb5f8d9b43ac030}

\item 
\hypertarget{opal__cr_8c_aeaa111c699e9aef2f60c770bbc9c97f1}{bool {\bfseries opal\+\_\+cr\+\_\+is\+\_\+tool} = false}\label{opal__cr_8c_aeaa111c699e9aef2f60c770bbc9c97f1}

\item 
\hypertarget{opal__cr_8c_a0b4d96a46922ca13b2f38aec0e1be935}{int {\bfseries opal\+\_\+cr\+\_\+checkpointing\+\_\+state} = O\+P\+A\+L\+\_\+\+C\+R\+\_\+\+S\+T\+A\+T\+U\+S\+\_\+\+N\+O\+N\+E}\label{opal__cr_8c_a0b4d96a46922ca13b2f38aec0e1be935}

\item 
\hypertarget{opal__cr_8c_ae26fde2a3a4c25dc07279a0823af078f}{int {\bfseries opal\+\_\+cr\+\_\+checkpoint\+\_\+request} = O\+P\+A\+L\+\_\+\+C\+R\+\_\+\+S\+T\+A\+T\+U\+S\+\_\+\+N\+O\+N\+E}\label{opal__cr_8c_ae26fde2a3a4c25dc07279a0823af078f}

\item 
\hypertarget{opal__cr_8c_ae9e3d0c4abf283fce86b8897d31ad7b7}{static bool {\bfseries opal\+\_\+cr\+\_\+debug\+\_\+sigpipe} = false}\label{opal__cr_8c_ae9e3d0c4abf283fce86b8897d31ad7b7}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
O\+P\+A\+L Layer Checkpoint/\+Restart Runtime functions. 



\subsection{Function Documentation}
\hypertarget{opal__cr_8c_a9be3a1a9f05c64d89037cecdc40867f1}{\index{opal\+\_\+cr.\+c@{opal\+\_\+cr.\+c}!opal\+\_\+cr\+\_\+coord@{opal\+\_\+cr\+\_\+coord}}
\index{opal\+\_\+cr\+\_\+coord@{opal\+\_\+cr\+\_\+coord}!opal\+\_\+cr.\+c@{opal\+\_\+cr.\+c}}
\subsubsection[{opal\+\_\+cr\+\_\+coord}]{\setlength{\rightskip}{0pt plus 5cm}int opal\+\_\+cr\+\_\+coord (
\begin{DoxyParamCaption}
\item[{int}]{state}
\end{DoxyParamCaption}
)}}\label{opal__cr_8c_a9be3a1a9f05c64d89037cecdc40867f1}


Current Coordination callback routines. 

O\+P\+A\+L Checkpoint Coordination Routine. 

Referenced by opal\+\_\+cr\+\_\+init().

\hypertarget{opal__cr_8c_afd11a17b5c6576b8c88ed4c9de559189}{\index{opal\+\_\+cr.\+c@{opal\+\_\+cr.\+c}!opal\+\_\+cr\+\_\+inc\+\_\+core@{opal\+\_\+cr\+\_\+inc\+\_\+core}}
\index{opal\+\_\+cr\+\_\+inc\+\_\+core@{opal\+\_\+cr\+\_\+inc\+\_\+core}!opal\+\_\+cr.\+c@{opal\+\_\+cr.\+c}}
\subsubsection[{opal\+\_\+cr\+\_\+inc\+\_\+core}]{\setlength{\rightskip}{0pt plus 5cm}int opal\+\_\+cr\+\_\+inc\+\_\+core (
\begin{DoxyParamCaption}
\item[{pid\+\_\+t}]{pid, }
\item[{{\bf opal\+\_\+crs\+\_\+base\+\_\+snapshot\+\_\+t} $\ast$}]{snapshot, }
\item[{{\bf opal\+\_\+crs\+\_\+base\+\_\+ckpt\+\_\+options\+\_\+t} $\ast$}]{options, }
\item[{int $\ast$}]{state}
\end{DoxyParamCaption}
)}}\label{opal__cr_8c_afd11a17b5c6576b8c88ed4c9de559189}


\hyperlink{structFunction}{Function} to go through the I\+N\+C. 


\begin{DoxyItemize}
\item Call Registered I\+N\+C\+\_\+\+Coord(\+C\+H\+E\+C\+K\+P\+O\+I\+N\+T)
\item Call the C\+R\+S.\+checkpoint()
\item Call Registered I\+N\+C\+\_\+\+Coord(state) 
\end{DoxyItemize}