\hypertarget{btl__gm_8h}{\section{ompi/mca/btl/gm/btl\+\_\+gm.h File Reference}
\label{btl__gm_8h}\index{ompi/mca/btl/gm/btl\+\_\+gm.\+h@{ompi/mca/btl/gm/btl\+\_\+gm.\+h}}
}
{\ttfamily \#include \char`\"{}ompi\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include $<$sys/types.\+h$>$}\\*
{\ttfamily \#include $<$string.\+h$>$}\\*
{\ttfamily \#include $<$gm.\+h$>$}\\*
{\ttfamily \#include \char`\"{}opal/mca/event/event.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/class/ompi\+\_\+free\+\_\+list.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/btl/btl.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/btl/base/base.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}ompi/mca/mpool/mpool.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}btl\+\_\+gm\+\_\+endpoint.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structmca__btl__gm__component__t}{mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+t}
\begin{DoxyCompactList}\small\item\em Myrinet (G\+M) B\+T\+L component. \end{DoxyCompactList}\item 
struct \hyperlink{structmca__btl__gm__module__t}{mca\+\_\+btl\+\_\+gm\+\_\+module\+\_\+t}
\begin{DoxyCompactList}\small\item\em B\+T\+L Module Interface. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{btl__gm_8h_ac6ba8945d0a049351288ed87680bd40c}{\#define {\bfseries G\+M\+\_\+\+B\+U\+F\+F\+E\+R\+\_\+\+S\+I\+Z\+E}~7}\label{btl__gm_8h_ac6ba8945d0a049351288ed87680bd40c}

\item 
\hypertarget{btl__gm_8h_aa5869cc08098cc7d63e662349dee6086}{\#define {\bfseries G\+M\+\_\+\+B\+U\+F\+F\+E\+R\+\_\+\+L\+E\+N\+G\+T\+H}~gm\+\_\+max\+\_\+length\+\_\+for\+\_\+size(G\+M\+\_\+\+B\+U\+F\+F\+E\+R\+\_\+\+S\+I\+Z\+E)}\label{btl__gm_8h_aa5869cc08098cc7d63e662349dee6086}

\item 
\#define \hyperlink{btl__gm_8h_a1ccb932cae50f2b017ddf1bedbfdc3d7}{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N\+\_\+\+N\+L}(btl, frag)
\begin{DoxyCompactList}\small\item\em Acquire a send token -\/ queue the fragment if none available. \end{DoxyCompactList}\item 
\#define {\bfseries M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N}(btl, frag)
\item 
\#define \hyperlink{btl__gm_8h_a75705fc9d95551afe9361d2d8ae1e1f7}{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+T\+O\+K\+E\+N}(btl)
\begin{DoxyCompactList}\small\item\em Return send token and dequeue and pending fragments mca\+\_\+btl\+\_\+gm\+\_\+component.\+gm\+\_\+lock is already held. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{btl__gm_8h_a683b5ea2f5da5cd4abb024ede53a7aef}{typedef struct \\*
\hyperlink{structmca__btl__gm__component__t}{mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+t} {\bfseries mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+t}}\label{btl__gm_8h_a683b5ea2f5da5cd4abb024ede53a7aef}

\item 
\hypertarget{btl__gm_8h_abe527bd5848322218c7ec31c37a3024d}{typedef struct \hyperlink{structmca__btl__gm__module__t}{mca\+\_\+btl\+\_\+gm\+\_\+module\+\_\+t} {\bfseries mca\+\_\+btl\+\_\+gm\+\_\+module\+\_\+t}}\label{btl__gm_8h_abe527bd5848322218c7ec31c37a3024d}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{btl__gm_8h_aa07b0c5eb4d6aa66ffc59a6b5c69de93}{int \hyperlink{btl__gm_8h_aa07b0c5eb4d6aa66ffc59a6b5c69de93}{mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+open} (void)}\label{btl__gm_8h_aa07b0c5eb4d6aa66ffc59a6b5c69de93}

\begin{DoxyCompactList}\small\item\em Register G\+M component parameters with the M\+C\+A framework. \end{DoxyCompactList}\item 
\hypertarget{btl__gm_8h_a488fc85769cef71b65fc6565bb2497a4}{int \hyperlink{btl__gm_8h_a488fc85769cef71b65fc6565bb2497a4}{mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+close} (void)}\label{btl__gm_8h_a488fc85769cef71b65fc6565bb2497a4}

\begin{DoxyCompactList}\small\item\em Any final cleanup before being unloaded. \end{DoxyCompactList}\item 
\hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$$\ast$ \hyperlink{btl__gm_8h_aaac470401ac89f9167e3cb984fecf404}{mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+init} (int $\ast$num\+\_\+btl\+\_\+modules, bool allow\+\_\+multi\+\_\+user\+\_\+threads, bool have\+\_\+hidden\+\_\+threads)
\begin{DoxyCompactList}\small\item\em G\+M component initialization. \end{DoxyCompactList}\item 
\hypertarget{btl__gm_8h_a307abcfa15a778196f300ecb30f48d93}{int \hyperlink{btl__gm_8h_a307abcfa15a778196f300ecb30f48d93}{mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+progress} (void)}\label{btl__gm_8h_a307abcfa15a778196f300ecb30f48d93}

\begin{DoxyCompactList}\small\item\em G\+M component progress. \end{DoxyCompactList}\item 
int \hyperlink{btl__gm_8h_a4d19903bbe621e23b37a3ad94e08066f}{mca\+\_\+btl\+\_\+gm\+\_\+finalize} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl)
\begin{DoxyCompactList}\small\item\em Cleanup any resources held by the B\+T\+L. \end{DoxyCompactList}\item 
int \hyperlink{btl__gm_8h_afc4878928b17308e9f63848a2afd1c05}{mca\+\_\+btl\+\_\+gm\+\_\+add\+\_\+procs} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, size\+\_\+t nprocs, struct \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$$\ast$procs, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$$\ast$peers, \hyperlink{structopal__bitmap__t}{opal\+\_\+bitmap\+\_\+t} $\ast$reachable)
\begin{DoxyCompactList}\small\item\em P\+M\+L-\/$>$B\+T\+L notification of change in the process list. \end{DoxyCompactList}\item 
int \hyperlink{btl__gm_8h_a5f1373a8a32cdfec55561c12f922516d}{mca\+\_\+btl\+\_\+gm\+\_\+del\+\_\+procs} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, size\+\_\+t nprocs, struct \hyperlink{structompi__proc__t}{ompi\+\_\+proc\+\_\+t} $\ast$$\ast$procs, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$$\ast$peers)
\begin{DoxyCompactList}\small\item\em P\+M\+L-\/$>$B\+T\+L notification of change in the process list. \end{DoxyCompactList}\item 
int \hyperlink{btl__gm_8h_a144dcb0b329295fb66c2daa4c4c96ff7}{mca\+\_\+btl\+\_\+gm\+\_\+send} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$btl\+\_\+peer, struct \hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$descriptor, mca\+\_\+btl\+\_\+base\+\_\+tag\+\_\+t tag)
\begin{DoxyCompactList}\small\item\em Initiate an asynchronous send. \end{DoxyCompactList}\item 
int \hyperlink{btl__gm_8h_a30cd75e18d67aaf07f14c9f1c8b85a38}{mca\+\_\+btl\+\_\+gm\+\_\+put} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$btl\+\_\+peer, struct \hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$decriptor)
\begin{DoxyCompactList}\small\item\em Initiate an asynchronous put. \end{DoxyCompactList}\item 
int \hyperlink{btl__gm_8h_aac5c51dd34f7bee7daba48630b5f8205}{mca\+\_\+btl\+\_\+gm\+\_\+get} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$btl\+\_\+peer, struct \hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$decriptor)
\begin{DoxyCompactList}\small\item\em Initiate an asynchronous get. \end{DoxyCompactList}\item 
int \hyperlink{btl__gm_8h_a3d0c5d691a281277c7913a80883b3859}{mca\+\_\+btl\+\_\+gm\+\_\+register\+\_\+error\+\_\+cb} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, \hyperlink{btl_8h_a3ed06ffadaf8a729d41091a671819d59}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+error\+\_\+cb\+\_\+fn\+\_\+t} cbfunc)
\begin{DoxyCompactList}\small\item\em Register a callback function that is called on error. \end{DoxyCompactList}\item 
\hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$ \hyperlink{btl__gm_8h_ad5f71088a0160e34487170cc555e6d15}{mca\+\_\+btl\+\_\+gm\+\_\+alloc} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$endpoint, uint8\+\_\+t order, size\+\_\+t size, uint32\+\_\+t flags)
\begin{DoxyCompactList}\small\item\em Allocate a descriptor with a segment of the requested size. \end{DoxyCompactList}\item 
int \hyperlink{btl__gm_8h_afc488515f146989f136507adbb01e8d8}{mca\+\_\+btl\+\_\+gm\+\_\+free} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, \hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$des)
\begin{DoxyCompactList}\small\item\em Return a segment allocated by this B\+T\+L. \end{DoxyCompactList}\item 
\hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$ \hyperlink{btl__gm_8h_ad96613319e5bfd2ff6ea98a30e28d6d2}{mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+src} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$peer, struct \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$, struct \hyperlink{structopal__convertor__t}{opal\+\_\+convertor\+\_\+t} $\ast$convertor, uint8\+\_\+t order, size\+\_\+t reserve, size\+\_\+t $\ast$size, uint32\+\_\+t flags)
\begin{DoxyCompactList}\small\item\em Prepare a descriptor for send/rdma using the supplied convertor. \end{DoxyCompactList}\item 
\hyperlink{structmca__btl__base__descriptor__t}{mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$ \hyperlink{btl__gm_8h_a119173d5911765a50ad992c387058e9e}{mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+dst} (struct \hyperlink{structmca__btl__base__module__t}{mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$btl, struct \hyperlink{structmca__btl__base__endpoint__t}{mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$peer, struct \hyperlink{structmca__mpool__base__registration__t}{mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$, struct \hyperlink{structopal__convertor__t}{opal\+\_\+convertor\+\_\+t} $\ast$convertor, uint8\+\_\+t order, size\+\_\+t reserve, size\+\_\+t $\ast$size, uint32\+\_\+t flags)
\begin{DoxyCompactList}\small\item\em Prepare a descriptor for send/rdma using the supplied convertor. \end{DoxyCompactList}\item 
int \hyperlink{btl__gm_8h_a754922d2980cf30a7fc92b84c21603f7}{mca\+\_\+btl\+\_\+gm\+\_\+ft\+\_\+event} (int state)
\begin{DoxyCompactList}\small\item\em Fault Tolerance Event Notification \hyperlink{structFunction}{Function}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{btl__gm_8h_a071f7f402ef9caaadb9cd4460f0b29eb}{O\+M\+P\+I\+\_\+\+M\+O\+D\+U\+L\+E\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C \\*
\hyperlink{structmca__btl__gm__component__t}{mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+t} {\bfseries mca\+\_\+btl\+\_\+gm\+\_\+component}}\label{btl__gm_8h_a071f7f402ef9caaadb9cd4460f0b29eb}

\item 
\hypertarget{btl__gm_8h_a4f8bb856c98be407301c946839445dbd}{\hyperlink{structmca__btl__gm__module__t}{mca\+\_\+btl\+\_\+gm\+\_\+module\+\_\+t} {\bfseries mca\+\_\+btl\+\_\+gm\+\_\+module}}\label{btl__gm_8h_a4f8bb856c98be407301c946839445dbd}

\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\hypertarget{btl__gm_8h_aacdcd478389c9f61dac7162f0c067ba2}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N@{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N}}
\index{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N@{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N(
\begin{DoxyParamCaption}
\item[{}]{btl, }
\item[{}]{frag}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_aacdcd478389c9f61dac7162f0c067ba2}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do} \{                                                                                            \(\backslash\)
    \textcolor{comment}{/* queue the descriptor if there are no send tokens */}                                      \(\backslash\)
    if(\hyperlink{opal_2threads_2mutex_8h_a514288878869c0997f029d56eb4a63ee}{OPAL\_THREAD\_ADD32}(&gm\_btl->gm\_num\_send\_tokens, -1) < 0) \{                          
            \hyperlink{opal__list_8h_acf822c5c351cd03b2c86e48cf9aaa158}{\(\backslash\)}
\hyperlink{opal__list_8h_acf822c5c351cd03b2c86e48cf9aaa158}{        opal\_list\_append}(&gm\_btl->gm\_pending, (
      \hyperlink{structopal__list__item__t}{opal\_list\_item\_t}*)frag);                         \hyperlink{opal_2threads_2mutex_8h_a514288878869c0997f029d56eb4a63ee}{\(\backslash\)}
\hyperlink{opal_2threads_2mutex_8h_a514288878869c0997f029d56eb4a63ee}{        OPAL\_THREAD\_ADD32}(&gm\_btl->gm\_num\_send\_tokens, 1);                        
                    \hyperlink{opal_2threads_2mutex_8h_a26cea76373139434c7f03b24a58b6c04}{\(\backslash\)}
\hyperlink{opal_2threads_2mutex_8h_a26cea76373139434c7f03b24a58b6c04}{        OPAL\_THREAD\_UNLOCK}(&mca\_btl\_gm\_component.
      \hyperlink{structmca__btl__gm__component__t_acbe6a6ada3336837a92f67492b105a1a}{gm\_lock});                                      \(\backslash\)
        return OMPI\_SUCCESS;                                                                    \(\backslash\)
    \}                                                                                           \(\backslash\)
\} \textcolor{keywordflow}{while} (0)                                                                                     \(\backslash\)
\end{DoxyCode}
\hypertarget{btl__gm_8h_a1ccb932cae50f2b017ddf1bedbfdc3d7}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N\+\_\+\+N\+L@{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N\+\_\+\+N\+L}}
\index{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N\+\_\+\+N\+L@{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N\+\_\+\+N\+L}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N\+\_\+\+N\+L}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+A\+C\+Q\+U\+I\+R\+E\+\_\+\+T\+O\+K\+E\+N\+\_\+\+N\+L(
\begin{DoxyParamCaption}
\item[{}]{btl, }
\item[{}]{frag}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_a1ccb932cae50f2b017ddf1bedbfdc3d7}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do} \{                                                                                            \(\backslash\)
    \textcolor{comment}{/* queue the descriptor if there are no send tokens */}                                      \(\backslash\)
    if(\hyperlink{opal_2threads_2mutex_8h_a514288878869c0997f029d56eb4a63ee}{OPAL\_THREAD\_ADD32}(&gm\_btl->gm\_num\_send\_tokens, -1) < 0) \{                          
            \hyperlink{opal__list_8h_acf822c5c351cd03b2c86e48cf9aaa158}{\(\backslash\)}
\hyperlink{opal__list_8h_acf822c5c351cd03b2c86e48cf9aaa158}{        opal\_list\_append}(&gm\_btl->gm\_pending, (
      \hyperlink{structopal__list__item__t}{opal\_list\_item\_t}*)frag);                         \hyperlink{opal_2threads_2mutex_8h_a514288878869c0997f029d56eb4a63ee}{\(\backslash\)}
\hyperlink{opal_2threads_2mutex_8h_a514288878869c0997f029d56eb4a63ee}{        OPAL\_THREAD\_ADD32}(&gm\_btl->gm\_num\_send\_tokens, 1);                        
                    \(\backslash\)
        return OMPI\_SUCCESS;                                                                    \(\backslash\)
    \}                                                                                           \(\backslash\)
\} \textcolor{keywordflow}{while} (0)                                                                                     \(\backslash\)
\end{DoxyCode}


Acquire a send token -\/ queue the fragment if none available. 

\hypertarget{btl__gm_8h_a75705fc9d95551afe9361d2d8ae1e1f7}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+T\+O\+K\+E\+N@{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+T\+O\+K\+E\+N}}
\index{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+T\+O\+K\+E\+N@{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+T\+O\+K\+E\+N}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+T\+O\+K\+E\+N}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\+C\+A\+\_\+\+B\+T\+L\+\_\+\+G\+M\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+T\+O\+K\+E\+N(
\begin{DoxyParamCaption}
\item[{}]{btl}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_a75705fc9d95551afe9361d2d8ae1e1f7}
{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{do} \{                                                                                            
      \hyperlink{opal_2threads_2mutex_8h_a514288878869c0997f029d56eb4a63ee}{\(\backslash\)}
\hyperlink{opal_2threads_2mutex_8h_a514288878869c0997f029d56eb4a63ee}{   OPAL\_THREAD\_ADD32}( &btl->gm\_num\_send\_tokens, 1 );                                   
               \(\backslash\)
   if(\hyperlink{opal__list_8h_aec770d8385a74a16b713bd0f8028e531}{opal\_list\_get\_size}(&btl->gm\_pending)) \{                                            
             \(\backslash\)
       mca\_btl\_gm\_frag\_t* frag;                                                                 \(\backslash\)
       frag = (\hyperlink{structmca__btl__gm__frag__t}{mca\_btl\_gm\_frag\_t}*)\hyperlink{opal__list_8h_a85320676c6416a4c4a6c4219dad645ac}{opal\_list\_remove\_first}(&btl->
      gm\_pending);                     \(\backslash\)
       if(NULL != frag) \{                                                                       \(\backslash\)
           switch(frag->type) \{                                                                 \(\backslash\)
           case MCA\_BTL\_GM\_SEND:                                                                \(\backslash\)
           case MCA\_BTL\_GM\_EAGER:                                                               \(\backslash\)
               mca\_btl\_gm\_send\_nl(&btl->super, frag->endpoint, &frag->base, frag->hdr->tag);    \(\backslash\)
               break;                                                                           \(\backslash\)
           case MCA\_BTL\_GM\_PUT:                                                                 \(\backslash\)
               mca\_btl\_gm\_put\_nl(&btl->super, frag->endpoint, &frag->base);                     \(\backslash\)
               break;                                                                           \(\backslash\)
           case MCA\_BTL\_GM\_GET:                                                                 \(\backslash\)
               mca\_btl\_gm\_get\_nl(&btl->super, frag->endpoint, &frag->base);                     \(\backslash\)
               break;                                                                           \(\backslash\)
           \}                                                                                    \(\backslash\)
       \}                                                                                        \(\backslash\)
    \}                                                                                           \(\backslash\)
\} \textcolor{keywordflow}{while} (0)
\end{DoxyCode}


Return send token and dequeue and pending fragments mca\+\_\+btl\+\_\+gm\+\_\+component.\+gm\+\_\+lock is already held. 



\subsection{Function Documentation}
\hypertarget{btl__gm_8h_afc4878928b17308e9f63848a2afd1c05}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+add\+\_\+procs@{mca\+\_\+btl\+\_\+gm\+\_\+add\+\_\+procs}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+add\+\_\+procs@{mca\+\_\+btl\+\_\+gm\+\_\+add\+\_\+procs}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+add\+\_\+procs}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+gm\+\_\+add\+\_\+procs (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{size\+\_\+t}]{nprocs, }
\item[{struct {\bf ompi\+\_\+proc\+\_\+t} $\ast$$\ast$}]{procs, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$$\ast$}]{peers, }
\item[{{\bf opal\+\_\+bitmap\+\_\+t} $\ast$}]{reachable}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_afc4878928b17308e9f63848a2afd1c05}


P\+M\+L-\/$>$B\+T\+L notification of change in the process list. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) \\
\hline
{\em nprocs} & (I\+N) Number of processes \\
\hline
{\em procs} & (I\+N) Set of processes \\
\hline
{\em peers} & (O\+U\+T) Set of (optional) peer addressing info. \\
\hline
{\em peers} & (I\+N/\+O\+U\+T) Set of processes that are reachable via this B\+T\+L. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S or error status on failure. 
\end{DoxyReturn}


References mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t\+::endpoint\+\_\+btl, O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E, ompi\+\_\+proc\+\_\+local(), opal\+\_\+bitmap\+\_\+set\+\_\+bit(), 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, and mca\+\_\+btl\+\_\+gm\+\_\+proc\+\_\+t\+::proc\+\_\+lock.

\hypertarget{btl__gm_8h_ad5f71088a0160e34487170cc555e6d15}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+alloc@{mca\+\_\+btl\+\_\+gm\+\_\+alloc}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+alloc@{mca\+\_\+btl\+\_\+gm\+\_\+alloc}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+alloc}]{\setlength{\rightskip}{0pt plus 5cm}{\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t}$\ast$ mca\+\_\+btl\+\_\+gm\+\_\+alloc (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$}]{endpoint, }
\item[{uint8\+\_\+t}]{order, }
\item[{size\+\_\+t}]{size, }
\item[{uint32\+\_\+t}]{flags}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_ad5f71088a0160e34487170cc555e6d15}


Allocate a descriptor with a segment of the requested size. 

Note that the B\+T\+L layer may choose to return a smaller size if it cannot support the request.


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em size} & (I\+N) \hyperlink{classRequest}{Request} segment size.\\
\hline
\end{DoxyParams}
Allocate a descriptor with a segment of the requested size.


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em size} & (I\+N) \hyperlink{classRequest}{Request} segment size. \\
\hline
\end{DoxyParams}


References mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+dst, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+dst\+\_\+cnt, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+flags, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+src, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+src\+\_\+cnt, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::order, and mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+len.

\hypertarget{btl__gm_8h_aaac470401ac89f9167e3cb984fecf404}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+init@{mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+init}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+init@{mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+init}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}{\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t}$\ast$$\ast$ mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+init (
\begin{DoxyParamCaption}
\item[{int $\ast$}]{num\+\_\+btl\+\_\+modules, }
\item[{bool}]{allow\+\_\+multi\+\_\+user\+\_\+threads, }
\item[{bool}]{have\+\_\+hidden\+\_\+threads}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_aaac470401ac89f9167e3cb984fecf404}


G\+M component initialization. 


\begin{DoxyParams}{Parameters}
{\em num\+\_\+btl\+\_\+modules} & (O\+U\+T) Number of B\+T\+Ls returned in B\+T\+L array. \\
\hline
{\em allow\+\_\+multi\+\_\+user\+\_\+threads} & (O\+U\+T) Flag indicating wether B\+T\+L supports user threads (T\+R\+U\+E) \\
\hline
{\em have\+\_\+hidden\+\_\+threads} & (O\+U\+T) Flag indicating wether B\+T\+L uses threads (T\+R\+U\+E) \\
\hline
\end{DoxyParams}


References mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+t\+::gm\+\_\+btls, mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+t\+::gm\+\_\+lock, mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+t\+::gm\+\_\+max\+\_\+btls, mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+t\+::gm\+\_\+num\+\_\+btls, ompi\+\_\+mpi\+\_\+thread\+\_\+multiple, opal\+\_\+output(), 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{btl__gm_8h_a5f1373a8a32cdfec55561c12f922516d}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+del\+\_\+procs@{mca\+\_\+btl\+\_\+gm\+\_\+del\+\_\+procs}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+del\+\_\+procs@{mca\+\_\+btl\+\_\+gm\+\_\+del\+\_\+procs}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+del\+\_\+procs}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+gm\+\_\+del\+\_\+procs (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{size\+\_\+t}]{nprocs, }
\item[{struct {\bf ompi\+\_\+proc\+\_\+t} $\ast$$\ast$}]{procs, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$$\ast$}]{peers}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_a5f1373a8a32cdfec55561c12f922516d}


P\+M\+L-\/$>$B\+T\+L notification of change in the process list. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L instance \\
\hline
{\em nproc} & (I\+N) Number of processes. \\
\hline
{\em procs} & (I\+N) Set of processes. \\
\hline
{\em peers} & (I\+N) Set of peer data structures. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{classStatus}{Status} indicating if cleanup was successful 
\end{DoxyReturn}
\hypertarget{btl__gm_8h_a4d19903bbe621e23b37a3ad94e08066f}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+finalize@{mca\+\_\+btl\+\_\+gm\+\_\+finalize}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+finalize@{mca\+\_\+btl\+\_\+gm\+\_\+finalize}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+finalize}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+gm\+\_\+finalize (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_a4d19903bbe621e23b37a3ad94e08066f}


Cleanup any resources held by the B\+T\+L. 


\begin{DoxyParams}{Parameters}
{\em btl} & B\+T\+L instance. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S or error status on failure. 
\end{DoxyReturn}


References mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+t\+::gm\+\_\+lock, O\+B\+J\+\_\+\+D\+E\+S\+T\+R\+U\+C\+T, 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{btl__gm_8h_afc488515f146989f136507adbb01e8d8}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+free@{mca\+\_\+btl\+\_\+gm\+\_\+free}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+free@{mca\+\_\+btl\+\_\+gm\+\_\+free}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+gm\+\_\+free (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$}]{des}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_afc488515f146989f136507adbb01e8d8}


Return a segment allocated by this B\+T\+L. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em descriptor} & (I\+N) Allocated descriptor.\\
\hline
\end{DoxyParams}
Return a segment allocated by this B\+T\+L. 

References mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t\+::btl\+\_\+mpool, and mca\+\_\+mpool\+\_\+base\+\_\+module\+\_\+t\+::mpool\+\_\+deregister.

\hypertarget{btl__gm_8h_a754922d2980cf30a7fc92b84c21603f7}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+ft\+\_\+event@{mca\+\_\+btl\+\_\+gm\+\_\+ft\+\_\+event}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+ft\+\_\+event@{mca\+\_\+btl\+\_\+gm\+\_\+ft\+\_\+event}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+ft\+\_\+event}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+gm\+\_\+ft\+\_\+event (
\begin{DoxyParamCaption}
\item[{int}]{state}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_a754922d2980cf30a7fc92b84c21603f7}


Fault Tolerance Event Notification \hyperlink{structFunction}{Function}. 


\begin{DoxyParams}{Parameters}
{\em state} & Checkpoint Stae \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S or failure status 
\end{DoxyReturn}
\hypertarget{btl__gm_8h_aac5c51dd34f7bee7daba48630b5f8205}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+get@{mca\+\_\+btl\+\_\+gm\+\_\+get}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+get@{mca\+\_\+btl\+\_\+gm\+\_\+get}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+gm\+\_\+get (
\begin{DoxyParamCaption}
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$}]{endpoint, }
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$}]{des}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_aac5c51dd34f7bee7daba48630b5f8205}


Initiate an asynchronous get. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em endpoint} & (I\+N) B\+T\+L addressing information \\
\hline
{\em descriptor} & (I\+N) Description of the data to be transferred \\
\hline
\end{DoxyParams}


References mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+dst, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+src, mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+t\+::gm\+\_\+lock, 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, mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+addr, and mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+len.

\hypertarget{btl__gm_8h_a119173d5911765a50ad992c387058e9e}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+dst@{mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+dst}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+dst@{mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+dst}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+dst}]{\setlength{\rightskip}{0pt plus 5cm}{\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t}$\ast$ mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+dst (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$}]{endpoint, }
\item[{struct {\bf mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$}]{registration, }
\item[{struct {\bf opal\+\_\+convertor\+\_\+t} $\ast$}]{convertor, }
\item[{uint8\+\_\+t}]{order, }
\item[{size\+\_\+t}]{reserve, }
\item[{size\+\_\+t $\ast$}]{size, }
\item[{uint32\+\_\+t}]{flags}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_a119173d5911765a50ad992c387058e9e}


Prepare a descriptor for send/rdma using the supplied convertor. 

If the convertor references data that is contigous, the descriptor may simply point to the user buffer. Otherwise, this routine is responsible for allocating buffer space and packing if required.


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em endpoint} & (I\+N) B\+T\+L peer addressing \\
\hline
{\em convertor} & (I\+N) Data type convertor \\
\hline
{\em reserve} & (I\+N) Additional bytes requested by upper layer to precede user data \\
\hline
{\em size} & (I\+N/\+O\+U\+T) Number of bytes to prepare (I\+N), number of bytes actually prepared (O\+U\+T) \\
\hline
\end{DoxyParams}


References mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t\+::btl\+\_\+mpool, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+dst, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+dst\+\_\+cnt, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+flags, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+src, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+src\+\_\+cnt, mca\+\_\+mpool\+\_\+base\+\_\+module\+\_\+t\+::mpool\+\_\+register, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::order, mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+addr, and mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+len.

\hypertarget{btl__gm_8h_ad96613319e5bfd2ff6ea98a30e28d6d2}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+src@{mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+src}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+src@{mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+src}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+src}]{\setlength{\rightskip}{0pt plus 5cm}{\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t}$\ast$ mca\+\_\+btl\+\_\+gm\+\_\+prepare\+\_\+src (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$}]{endpoint, }
\item[{struct {\bf mca\+\_\+mpool\+\_\+base\+\_\+registration\+\_\+t} $\ast$}]{registration, }
\item[{struct {\bf opal\+\_\+convertor\+\_\+t} $\ast$}]{convertor, }
\item[{uint8\+\_\+t}]{order, }
\item[{size\+\_\+t}]{reserve, }
\item[{size\+\_\+t $\ast$}]{size, }
\item[{uint32\+\_\+t}]{flags}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_ad96613319e5bfd2ff6ea98a30e28d6d2}


Prepare a descriptor for send/rdma using the supplied convertor. 

If the convertor references data that is contigous, the descriptor may simply point to the user buffer. Otherwise, this routine is responsible for allocating buffer space and packing if required.


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em endpoint} & (I\+N) B\+T\+L peer addressing \\
\hline
{\em convertor} & (I\+N) Data type convertor \\
\hline
{\em reserve} & (I\+N) Additional bytes requested by upper layer to precede user data \\
\hline
{\em size} & (I\+N/\+O\+U\+T) Number of bytes to prepare (I\+N), number of bytes actually prepared (O\+U\+T)\\
\hline
\end{DoxyParams}
Prepare a descriptor for send/rdma using the supplied convertor.


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em peer} & (I\+N) B\+T\+L peer addressing \\
\hline
\end{DoxyParams}


References mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t\+::btl\+\_\+max\+\_\+send\+\_\+size, mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t\+::btl\+\_\+mpool, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+dst, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+dst\+\_\+cnt, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+flags, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+src, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+src\+\_\+cnt, mca\+\_\+mpool\+\_\+base\+\_\+module\+\_\+t\+::mpool\+\_\+register, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::order, mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+addr, and mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+len.

\hypertarget{btl__gm_8h_a30cd75e18d67aaf07f14c9f1c8b85a38}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+put@{mca\+\_\+btl\+\_\+gm\+\_\+put}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+put@{mca\+\_\+btl\+\_\+gm\+\_\+put}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+put}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+gm\+\_\+put (
\begin{DoxyParamCaption}
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$}]{endpoint, }
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$}]{des}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_a30cd75e18d67aaf07f14c9f1c8b85a38}


Initiate an asynchronous put. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em endpoint} & (I\+N) B\+T\+L addressing information \\
\hline
{\em descriptor} & (I\+N) Description of the data to be transferred \\
\hline
\end{DoxyParams}


References mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+dst, mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+src, mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+t\+::gm\+\_\+lock, 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, mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+addr, and mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+len.

\hypertarget{btl__gm_8h_a3d0c5d691a281277c7913a80883b3859}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+register\+\_\+error\+\_\+cb@{mca\+\_\+btl\+\_\+gm\+\_\+register\+\_\+error\+\_\+cb}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+register\+\_\+error\+\_\+cb@{mca\+\_\+btl\+\_\+gm\+\_\+register\+\_\+error\+\_\+cb}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+register\+\_\+error\+\_\+cb}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+gm\+\_\+register\+\_\+error\+\_\+cb (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{{\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+error\+\_\+cb\+\_\+fn\+\_\+t}}]{cbfunc}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_a3d0c5d691a281277c7913a80883b3859}


Register a callback function that is called on error. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{classStatus}{Status} indicating if registration was successful 
\end{DoxyReturn}
\hypertarget{btl__gm_8h_a144dcb0b329295fb66c2daa4c4c96ff7}{\index{btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}!mca\+\_\+btl\+\_\+gm\+\_\+send@{mca\+\_\+btl\+\_\+gm\+\_\+send}}
\index{mca\+\_\+btl\+\_\+gm\+\_\+send@{mca\+\_\+btl\+\_\+gm\+\_\+send}!btl\+\_\+gm.\+h@{btl\+\_\+gm.\+h}}
\subsubsection[{mca\+\_\+btl\+\_\+gm\+\_\+send}]{\setlength{\rightskip}{0pt plus 5cm}int mca\+\_\+btl\+\_\+gm\+\_\+send (
\begin{DoxyParamCaption}
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+module\+\_\+t} $\ast$}]{btl, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+endpoint\+\_\+t} $\ast$}]{endpoint, }
\item[{struct {\bf mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t} $\ast$}]{des, }
\item[{mca\+\_\+btl\+\_\+base\+\_\+tag\+\_\+t}]{tag}
\end{DoxyParamCaption}
)}}\label{btl__gm_8h_a144dcb0b329295fb66c2daa4c4c96ff7}


Initiate an asynchronous send. 


\begin{DoxyParams}{Parameters}
{\em btl} & (I\+N) B\+T\+L module \\
\hline
{\em endpoint} & (I\+N) B\+T\+L addressing information \\
\hline
{\em descriptor} & (I\+N) Description of the data to be transfered \\
\hline
{\em tag} & (I\+N) The tag value used to notify the peer. \\
\hline
\end{DoxyParams}


References mca\+\_\+btl\+\_\+base\+\_\+descriptor\+\_\+t\+::des\+\_\+flags, mca\+\_\+btl\+\_\+gm\+\_\+component\+\_\+t\+::gm\+\_\+lock, mca\+\_\+btl\+\_\+gm\+\_\+module\+\_\+t\+::gm\+\_\+repost, opal\+\_\+list\+\_\+get\+\_\+size(), opal\+\_\+list\+\_\+remove\+\_\+first(), 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, and mca\+\_\+btl\+\_\+base\+\_\+segment\+\_\+t\+::seg\+\_\+len.

