\hypertarget{mdi__lib_8h}{}\doxysection{/repo/build/\+M\+D\+I\+\_\+\+Library/\+M\+D\+I\+\_\+\+Library/mdi\+\_\+lib.h File Reference}
\label{mdi__lib_8h}\index{/repo/build/MDI\_Library/MDI\_Library/mdi\_lib.h@{/repo/build/MDI\_Library/MDI\_Library/mdi\_lib.h}}


Implementation of library-\/based communication.  


{\ttfamily \#include \char`\"{}mdi.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}mdi\+\_\+global.\+h\char`\"{}}\newline
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structplugin__shared__state__struct}{plugin\+\_\+shared\+\_\+state\+\_\+struct}}
\item 
struct \mbox{\hyperlink{structlibrary__data__struct}{library\+\_\+data\+\_\+struct}}
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{mdi__lib_8h_af00de0105c330cee91645e1df6cace8c}\label{mdi__lib_8h_af00de0105c330cee91645e1df6cace8c}} 
typedef int($\ast$ {\bfseries M\+D\+I\+\_\+\+Plugin\+\_\+init\+\_\+t}) (void $\ast$shared\+\_\+state)
\item 
\mbox{\Hypertarget{mdi__lib_8h_a2ae05a354b41a8f35e0d246c58a20a03}\label{mdi__lib_8h_a2ae05a354b41a8f35e0d246c58a20a03}} 
typedef struct \mbox{\hyperlink{structplugin__shared__state__struct}{plugin\+\_\+shared\+\_\+state\+\_\+struct}} {\bfseries plugin\+\_\+shared\+\_\+state}
\item 
\mbox{\Hypertarget{mdi__lib_8h_a9b2a0470cc67b6fbebdee644c0218c89}\label{mdi__lib_8h_a9b2a0470cc67b6fbebdee644c0218c89}} 
typedef struct \mbox{\hyperlink{structlibrary__data__struct}{library\+\_\+data\+\_\+struct}} {\bfseries library\+\_\+data}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{mdi__lib_8h_ace73df2d37c62db99ba9e34bedaee231}\label{mdi__lib_8h_ace73df2d37c62db99ba9e34bedaee231}} 
int \mbox{\hyperlink{mdi__lib_8h_ace73df2d37c62db99ba9e34bedaee231}{enable\+\_\+plug\+\_\+support}} (int code\+\_\+id)
\begin{DoxyCompactList}\small\item\em Enable support for the P\+L\+UG method. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__lib_8h_a34394b3dbbaeefacfde090e639b82edd}\label{mdi__lib_8h_a34394b3dbbaeefacfde090e639b82edd}} 
int \mbox{\hyperlink{mdi__lib_8h_a34394b3dbbaeefacfde090e639b82edd}{plug\+\_\+on\+\_\+selection}} ()
\begin{DoxyCompactList}\small\item\em Callback when the end-\/user selects P\+L\+UG as the method. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__lib_8h_aeb75c19aec47e0a2bbfca541fc7b367d}\label{mdi__lib_8h_aeb75c19aec47e0a2bbfca541fc7b367d}} 
int \mbox{\hyperlink{mdi__lib_8h_aeb75c19aec47e0a2bbfca541fc7b367d}{plug\+\_\+on\+\_\+accept\+\_\+communicator}} ()
\begin{DoxyCompactList}\small\item\em Callback when the P\+L\+UG method must accept a communicator. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__lib_8h_ae55dc0e0110270471bb359602f56a6fc}\label{mdi__lib_8h_ae55dc0e0110270471bb359602f56a6fc}} 
int \mbox{\hyperlink{mdi__lib_8h_ae55dc0e0110270471bb359602f56a6fc}{plug\+\_\+on\+\_\+send\+\_\+command}} (const char $\ast$command, M\+D\+I\+\_\+\+Comm comm, int $\ast$skip\+\_\+flag)
\begin{DoxyCompactList}\small\item\em Callback when the P\+L\+UG method must send a command. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__lib_8h_a06553ad67f75bba59f571d7e4bc38926}\label{mdi__lib_8h_a06553ad67f75bba59f571d7e4bc38926}} 
int \mbox{\hyperlink{mdi__lib_8h_a06553ad67f75bba59f571d7e4bc38926}{plug\+\_\+after\+\_\+send\+\_\+command}} (const char $\ast$command, M\+D\+I\+\_\+\+Comm comm)
\begin{DoxyCompactList}\small\item\em Callback after the P\+L\+UG method has received a command. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__lib_8h_a6d94420b38e4dcd7008498385fbea604}\label{mdi__lib_8h_a6d94420b38e4dcd7008498385fbea604}} 
int \mbox{\hyperlink{mdi__lib_8h_a6d94420b38e4dcd7008498385fbea604}{plug\+\_\+on\+\_\+recv\+\_\+command}} (M\+D\+I\+\_\+\+Comm comm)
\begin{DoxyCompactList}\small\item\em Callback when the P\+L\+UG method must receive a command. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__lib_8h_a694877b333ae9f03242d9c76085db458}{library\+\_\+load\+\_\+init}} (const char $\ast$plugin\+\_\+name, void $\ast$mpi\+\_\+comm\+\_\+ptr, \mbox{\hyperlink{structlibrary__data__struct}{library\+\_\+data}} $\ast$libd, int mode)
\begin{DoxyCompactList}\small\item\em Load the initialization function for a plugin. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__lib_8h_a59aeed93abcd460174a9acfac8dec011}{library\+\_\+parse\+\_\+options}} (const char $\ast$options, \mbox{\hyperlink{structlibrary__data__struct}{library\+\_\+data}} $\ast$libd)
\begin{DoxyCompactList}\small\item\em Parse command-\/line plugin options. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__lib_8h_a1a1ab96bea21c7b704373638570a70b4}{library\+\_\+launch\+\_\+plugin}} (const char $\ast$plugin\+\_\+name, const char $\ast$options, void $\ast$mpi\+\_\+comm\+\_\+ptr, M\+D\+I\+\_\+\+Driver\+\_\+node\+\_\+callback\+\_\+t driver\+\_\+node\+\_\+callback, void $\ast$driver\+\_\+callback\+\_\+object)
\begin{DoxyCompactList}\small\item\em Launch an M\+DI plugin. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__lib_8h_ad058a08159abbfda680eebc02f7da9dd}{library\+\_\+open\+\_\+plugin}} (const char $\ast$plugin\+\_\+name, const char $\ast$options, void $\ast$mpi\+\_\+comm\+\_\+ptr, M\+D\+I\+\_\+\+Comm $\ast$mdi\+\_\+comm\+\_\+ptr)
\begin{DoxyCompactList}\small\item\em Open an M\+DI plugin in the background. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__lib_8h_aeb507269f5981f155ee7a75908a5f36b}\label{mdi__lib_8h_aeb507269f5981f155ee7a75908a5f36b}} 
int {\bfseries library\+\_\+close\+\_\+plugin} (M\+D\+I\+\_\+\+Comm mdi\+\_\+comm)
\item 
int \mbox{\hyperlink{mdi__lib_8h_a3a7d422a4cce77e23f0f2b0c64431830}{library\+\_\+initialize}} ()
\begin{DoxyCompactList}\small\item\em Perform initialization of a communicator for library-\/based communication. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__lib_8h_af112de1d1385e2c11c4907056a187afe}{library\+\_\+set\+\_\+driver\+\_\+current}} (M\+D\+I\+\_\+\+Comm comm)
\begin{DoxyCompactList}\small\item\em Set the driver as the current code. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__lib_8h_a396792d658225d047aeaecc0737596dd}{library\+\_\+set\+\_\+command}} (const char $\ast$command, M\+D\+I\+\_\+\+Comm comm)
\begin{DoxyCompactList}\small\item\em Set the next command that will be executed through the library communicator. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__lib_8h_a4dc4e78fb4ebf75990666e46dc437b97}{library\+\_\+execute\+\_\+command}} (M\+D\+I\+\_\+\+Comm comm)
\begin{DoxyCompactList}\small\item\em Execute a command through a communicator. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__lib_8h_ab37ea0386655641a3f07f9ea14863c11}{library\+\_\+send}} (const void $\ast$buf, int count, M\+D\+I\+\_\+\+Datatype datatype, M\+D\+I\+\_\+\+Comm comm, int msg\+\_\+flag)
\begin{DoxyCompactList}\small\item\em Function to handle sending data through an M\+DI connection, using library-\/based communication. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__lib_8h_af6088e90893c28807b1b147a2db1995e}{library\+\_\+recv}} (void $\ast$buf, int count, M\+D\+I\+\_\+\+Datatype datatype, M\+D\+I\+\_\+\+Comm comm, int msg\+\_\+flag)
\begin{DoxyCompactList}\small\item\em Function to handle receiving data through an M\+DI connection, using library-\/based communication. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__lib_8h_a73476e43cb31496601ffe2f24f413713}\label{mdi__lib_8h_a73476e43cb31496601ffe2f24f413713}} 
int {\bfseries library\+\_\+send\+\_\+msg} (const void $\ast$buf, int count, M\+D\+I\+\_\+\+Datatype datatype, M\+D\+I\+\_\+\+Comm comm)
\item 
\mbox{\Hypertarget{mdi__lib_8h_adfa2b70d4efd8deed1be7d5a2cb73e11}\label{mdi__lib_8h_adfa2b70d4efd8deed1be7d5a2cb73e11}} 
int {\bfseries library\+\_\+recv\+\_\+msg} (void $\ast$buf, int count, M\+D\+I\+\_\+\+Datatype datatype, M\+D\+I\+\_\+\+Comm comm)
\item 
\mbox{\Hypertarget{mdi__lib_8h_a3e5e5f9b3cdc071b28a26544972acf72}\label{mdi__lib_8h_a3e5e5f9b3cdc071b28a26544972acf72}} 
int \mbox{\hyperlink{mdi__lib_8h_a3e5e5f9b3cdc071b28a26544972acf72}{library\+\_\+set\+\_\+state}} (void $\ast$state)
\begin{DoxyCompactList}\small\item\em Function to set the plugin\textquotesingle{}s state. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__lib_8h_aa25ae701f28d12ff5b44bda1b07cd9d8}\label{mdi__lib_8h_aa25ae701f28d12ff5b44bda1b07cd9d8}} 
int \mbox{\hyperlink{mdi__lib_8h_aa25ae701f28d12ff5b44bda1b07cd9d8}{library\+\_\+activate\+\_\+code}} (void $\ast$codes\+\_\+in, int code\+\_\+id)
\begin{DoxyCompactList}\small\item\em Function to set the active code. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__lib_8h_ae1c31fb3e69da7b90e8b9986aaf6a77b}\label{mdi__lib_8h_ae1c31fb3e69da7b90e8b9986aaf6a77b}} 
int {\bfseries library\+\_\+activate\+\_\+driver} (\mbox{\hyperlink{structlibrary__data__struct}{library\+\_\+data}} $\ast$libd)
\item 
\mbox{\Hypertarget{mdi__lib_8h_af12408582f4abea9b5f7228ea3ddff1b}\label{mdi__lib_8h_af12408582f4abea9b5f7228ea3ddff1b}} 
int {\bfseries library\+\_\+activate\+\_\+engine} (\mbox{\hyperlink{structlibrary__data__struct}{library\+\_\+data}} $\ast$libd)
\item 
\mbox{\Hypertarget{mdi__lib_8h_aec19ca110ab49179a8709637a68124ce}\label{mdi__lib_8h_aec19ca110ab49179a8709637a68124ce}} 
int \mbox{\hyperlink{mdi__lib_8h_aec19ca110ab49179a8709637a68124ce}{communicator\+\_\+delete\+\_\+lib}} (void $\ast$comm)
\begin{DoxyCompactList}\small\item\em Function for L\+I\+B\+R\+A\+R\+Y-\/specific deletion operations for communicator deletion. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__lib_8h_a8167c86e7af813d26477f32f6e246712}\label{mdi__lib_8h_a8167c86e7af813d26477f32f6e246712}} 
int \mbox{\hyperlink{mdi__lib_8h_a8167c86e7af813d26477f32f6e246712}{library\+\_\+delete\+\_\+engine}} (size\+\_\+t code\+\_\+id)
\begin{DoxyCompactList}\small\item\em Function to delete all of the engine\textquotesingle{}s state. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Implementation of library-\/based communication. 



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{mdi__lib_8h_a4dc4e78fb4ebf75990666e46dc437b97}\label{mdi__lib_8h_a4dc4e78fb4ebf75990666e46dc437b97}} 
\index{mdi\_lib.h@{mdi\_lib.h}!library\_execute\_command@{library\_execute\_command}}
\index{library\_execute\_command@{library\_execute\_command}!mdi\_lib.h@{mdi\_lib.h}}
\doxysubsubsection{\texorpdfstring{library\_execute\_command()}{library\_execute\_command()}}
{\footnotesize\ttfamily int library\+\_\+execute\+\_\+command (\begin{DoxyParamCaption}\item[{M\+D\+I\+\_\+\+Comm}]{comm }\end{DoxyParamCaption})}



Execute a command through a communicator. 

If running with M\+PI, this function must be called only by rank {\ttfamily 0}. The function returns {\ttfamily 0} on a success.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em command} & Pointer to the command to be executed. \\
\hline
\mbox{\texttt{ in}}  & {\em comm} & M\+DI communicator associated with the intended recipient code. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__lib_8h_a3a7d422a4cce77e23f0f2b0c64431830}\label{mdi__lib_8h_a3a7d422a4cce77e23f0f2b0c64431830}} 
\index{mdi\_lib.h@{mdi\_lib.h}!library\_initialize@{library\_initialize}}
\index{library\_initialize@{library\_initialize}!mdi\_lib.h@{mdi\_lib.h}}
\doxysubsubsection{\texorpdfstring{library\_initialize()}{library\_initialize()}}
{\footnotesize\ttfamily int library\+\_\+initialize (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Perform initialization of a communicator for library-\/based communication. 

\mbox{\Hypertarget{mdi__lib_8h_a1a1ab96bea21c7b704373638570a70b4}\label{mdi__lib_8h_a1a1ab96bea21c7b704373638570a70b4}} 
\index{mdi\_lib.h@{mdi\_lib.h}!library\_launch\_plugin@{library\_launch\_plugin}}
\index{library\_launch\_plugin@{library\_launch\_plugin}!mdi\_lib.h@{mdi\_lib.h}}
\doxysubsubsection{\texorpdfstring{library\_launch\_plugin()}{library\_launch\_plugin()}}
{\footnotesize\ttfamily int library\+\_\+launch\+\_\+plugin (\begin{DoxyParamCaption}\item[{const char $\ast$}]{plugin\+\_\+name,  }\item[{const char $\ast$}]{options,  }\item[{void $\ast$}]{mpi\+\_\+comm\+\_\+ptr,  }\item[{M\+D\+I\+\_\+\+Driver\+\_\+node\+\_\+callback\+\_\+t}]{driver\+\_\+node\+\_\+callback,  }\item[{void $\ast$}]{driver\+\_\+callback\+\_\+object }\end{DoxyParamCaption})}



Launch an M\+DI plugin. 

\mbox{\Hypertarget{mdi__lib_8h_a694877b333ae9f03242d9c76085db458}\label{mdi__lib_8h_a694877b333ae9f03242d9c76085db458}} 
\index{mdi\_lib.h@{mdi\_lib.h}!library\_load\_init@{library\_load\_init}}
\index{library\_load\_init@{library\_load\_init}!mdi\_lib.h@{mdi\_lib.h}}
\doxysubsubsection{\texorpdfstring{library\_load\_init()}{library\_load\_init()}}
{\footnotesize\ttfamily int library\+\_\+load\+\_\+init (\begin{DoxyParamCaption}\item[{const char $\ast$}]{plugin\+\_\+name,  }\item[{void $\ast$}]{mpi\+\_\+comm\+\_\+ptr,  }\item[{\mbox{\hyperlink{structlibrary__data__struct}{library\+\_\+data}} $\ast$}]{libd,  }\item[{int}]{mode }\end{DoxyParamCaption})}



Load the initialization function for a plugin. 

\mbox{\Hypertarget{mdi__lib_8h_ad058a08159abbfda680eebc02f7da9dd}\label{mdi__lib_8h_ad058a08159abbfda680eebc02f7da9dd}} 
\index{mdi\_lib.h@{mdi\_lib.h}!library\_open\_plugin@{library\_open\_plugin}}
\index{library\_open\_plugin@{library\_open\_plugin}!mdi\_lib.h@{mdi\_lib.h}}
\doxysubsubsection{\texorpdfstring{library\_open\_plugin()}{library\_open\_plugin()}}
{\footnotesize\ttfamily int library\+\_\+open\+\_\+plugin (\begin{DoxyParamCaption}\item[{const char $\ast$}]{plugin\+\_\+name,  }\item[{const char $\ast$}]{options,  }\item[{void $\ast$}]{mpi\+\_\+comm\+\_\+ptr,  }\item[{M\+D\+I\+\_\+\+Comm $\ast$}]{mdi\+\_\+comm\+\_\+ptr }\end{DoxyParamCaption})}



Open an M\+DI plugin in the background. 

\mbox{\Hypertarget{mdi__lib_8h_a59aeed93abcd460174a9acfac8dec011}\label{mdi__lib_8h_a59aeed93abcd460174a9acfac8dec011}} 
\index{mdi\_lib.h@{mdi\_lib.h}!library\_parse\_options@{library\_parse\_options}}
\index{library\_parse\_options@{library\_parse\_options}!mdi\_lib.h@{mdi\_lib.h}}
\doxysubsubsection{\texorpdfstring{library\_parse\_options()}{library\_parse\_options()}}
{\footnotesize\ttfamily int library\+\_\+parse\+\_\+options (\begin{DoxyParamCaption}\item[{const char $\ast$}]{options,  }\item[{\mbox{\hyperlink{structlibrary__data__struct}{library\+\_\+data}} $\ast$}]{libd }\end{DoxyParamCaption})}



Parse command-\/line plugin options. 

\mbox{\Hypertarget{mdi__lib_8h_af6088e90893c28807b1b147a2db1995e}\label{mdi__lib_8h_af6088e90893c28807b1b147a2db1995e}} 
\index{mdi\_lib.h@{mdi\_lib.h}!library\_recv@{library\_recv}}
\index{library\_recv@{library\_recv}!mdi\_lib.h@{mdi\_lib.h}}
\doxysubsubsection{\texorpdfstring{library\_recv()}{library\_recv()}}
{\footnotesize\ttfamily int library\+\_\+recv (\begin{DoxyParamCaption}\item[{void $\ast$}]{buf,  }\item[{int}]{count,  }\item[{M\+D\+I\+\_\+\+Datatype}]{datatype,  }\item[{M\+D\+I\+\_\+\+Comm}]{comm,  }\item[{int}]{msg\+\_\+flag }\end{DoxyParamCaption})}



Function to handle receiving data through an M\+DI connection, using library-\/based communication. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em buf} & Pointer to the buffer where the received data will be stored. \\
\hline
\mbox{\texttt{ in}}  & {\em count} & Number of values (integers, double precision floats, characters, etc.) to be received. \\
\hline
\mbox{\texttt{ in}}  & {\em datatype} & M\+DI handle (M\+D\+I\+\_\+\+I\+NT, M\+D\+I\+\_\+\+D\+O\+U\+B\+LE, M\+D\+I\+\_\+\+C\+H\+AR, etc.) corresponding to the type of data to be received. \\
\hline
\mbox{\texttt{ in}}  & {\em comm} & M\+DI communicator associated with the connection to the sending code. \\
\hline
\mbox{\texttt{ in}}  & {\em msg\+\_\+flag} & Type of role this data has within a message. 0\+: Not part of a message. 1\+: The header of a message. 2\+: The body (data) of a message. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__lib_8h_ab37ea0386655641a3f07f9ea14863c11}\label{mdi__lib_8h_ab37ea0386655641a3f07f9ea14863c11}} 
\index{mdi\_lib.h@{mdi\_lib.h}!library\_send@{library\_send}}
\index{library\_send@{library\_send}!mdi\_lib.h@{mdi\_lib.h}}
\doxysubsubsection{\texorpdfstring{library\_send()}{library\_send()}}
{\footnotesize\ttfamily int library\+\_\+send (\begin{DoxyParamCaption}\item[{const void $\ast$}]{buf,  }\item[{int}]{count,  }\item[{M\+D\+I\+\_\+\+Datatype}]{datatype,  }\item[{M\+D\+I\+\_\+\+Comm}]{comm,  }\item[{int}]{msg\+\_\+flag }\end{DoxyParamCaption})}



Function to handle sending data through an M\+DI connection, using library-\/based communication. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em buf} & Pointer to the data to be sent. \\
\hline
\mbox{\texttt{ in}}  & {\em count} & Number of values (integers, double precision floats, characters, etc.) to be sent. \\
\hline
\mbox{\texttt{ in}}  & {\em datatype} & M\+DI handle (M\+D\+I\+\_\+\+I\+NT, M\+D\+I\+\_\+\+D\+O\+U\+B\+LE, M\+D\+I\+\_\+\+C\+H\+AR, etc.) corresponding to the type of data to be sent. \\
\hline
\mbox{\texttt{ in}}  & {\em comm} & M\+DI communicator associated with the intended recipient code. \\
\hline
\mbox{\texttt{ in}}  & {\em msg\+\_\+flag} & Type of role this data has within a message. 0\+: Not part of a message. 1\+: The header of a message. 2\+: The body (data) of a message. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__lib_8h_a396792d658225d047aeaecc0737596dd}\label{mdi__lib_8h_a396792d658225d047aeaecc0737596dd}} 
\index{mdi\_lib.h@{mdi\_lib.h}!library\_set\_command@{library\_set\_command}}
\index{library\_set\_command@{library\_set\_command}!mdi\_lib.h@{mdi\_lib.h}}
\doxysubsubsection{\texorpdfstring{library\_set\_command()}{library\_set\_command()}}
{\footnotesize\ttfamily int library\+\_\+set\+\_\+command (\begin{DoxyParamCaption}\item[{const char $\ast$}]{command,  }\item[{M\+D\+I\+\_\+\+Comm}]{comm }\end{DoxyParamCaption})}



Set the next command that will be executed through the library communicator. 

If running with M\+PI, this function must be called only by rank {\ttfamily 0}. The function returns {\ttfamily 0} on a success.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em command} & Pointer to the command to be executed. \\
\hline
\mbox{\texttt{ in}}  & {\em comm} & M\+DI communicator associated with the intended recipient code. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__lib_8h_af112de1d1385e2c11c4907056a187afe}\label{mdi__lib_8h_af112de1d1385e2c11c4907056a187afe}} 
\index{mdi\_lib.h@{mdi\_lib.h}!library\_set\_driver\_current@{library\_set\_driver\_current}}
\index{library\_set\_driver\_current@{library\_set\_driver\_current}!mdi\_lib.h@{mdi\_lib.h}}
\doxysubsubsection{\texorpdfstring{library\_set\_driver\_current()}{library\_set\_driver\_current()}}
{\footnotesize\ttfamily int library\+\_\+set\+\_\+driver\+\_\+current (\begin{DoxyParamCaption}\item[{M\+D\+I\+\_\+\+Comm}]{comm }\end{DoxyParamCaption})}



Set the driver as the current code. 

