\hypertarget{mdi__global_8c}{}\doxysection{/repo/build/\+M\+D\+I\+\_\+\+Library/\+M\+D\+I\+\_\+\+Library/mdi\+\_\+global.c File Reference}
\label{mdi__global_8c}\index{/repo/build/MDI\_Library/MDI\_Library/mdi\_global.c@{/repo/build/MDI\_Library/MDI\_Library/mdi\_global.c}}


Global structures used by M\+DI.  


{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$unistd.\+h$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stdarg.\+h$>$}\newline
{\ttfamily \#include \char`\"{}mdi\+\_\+global.\+h\char`\"{}}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{mdi__global_8c_a6c749e461a84e471bcab02d8115a1dfa}{vector\+\_\+init}} (\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$v, size\+\_\+t stride)
\begin{DoxyCompactList}\small\item\em Initialize memory allocation for a vector structure. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__global_8c_a53e2a90f50c539f8239225d6f39c0213}{vector\+\_\+push\+\_\+back}} (\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$v, void $\ast$\mbox{\hyperlink{structelement__struct}{element}})
\begin{DoxyCompactList}\small\item\em Append a new element to the end of the vector. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__global_8c_a0bab71c9dec13cb06e7d5ae0197a04fb}{vector\+\_\+delete}} (\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$v, int index)
\begin{DoxyCompactList}\small\item\em Remove an element from a vector. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__global_8c_a4efb113e1a013d1de3065394cde82202}{vector\+\_\+free}} (\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$v)
\begin{DoxyCompactList}\small\item\em Free all data associated with a vector. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__global_8c_a69b06c1e9f6ae8fca62780d1878ef5b1}{vector\+\_\+get}} (\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$v, int index, void $\ast$$\ast$\mbox{\hyperlink{structelement__struct}{element}})
\begin{DoxyCompactList}\small\item\em Return a pointer to an element of a vector. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__global_8c_ad49e6c1f80018cebd100e57c17d6bb13}{get\+\_\+node\+\_\+index}} (\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$v, const char $\ast$node\+\_\+name, int $\ast$node\+\_\+index)
\begin{DoxyCompactList}\small\item\em Determine the index of a node within a vector of nodes. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__global_8c_adb4572e1e893b9b3ec51ff318f555385}{get\+\_\+command\+\_\+index}} (\mbox{\hyperlink{structnode__struct}{node}} $\ast$n, const char $\ast$command\+\_\+name, int $\ast$command\+\_\+index)
\begin{DoxyCompactList}\small\item\em Determine the index of a command within a node. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__global_8c_aff7861fac32800cca9abce0b4d7c1464}{get\+\_\+callback\+\_\+index}} (\mbox{\hyperlink{structnode__struct}{node}} $\ast$n, const char $\ast$callback\+\_\+name, int $\ast$callback\+\_\+index)
\begin{DoxyCompactList}\small\item\em Determine the index of a callback within a node. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_afa8e15c40e69dda04607b59612c1dc96}\label{mdi__global_8c_afa8e15c40e69dda04607b59612c1dc96}} 
int \mbox{\hyperlink{mdi__global_8c_afa8e15c40e69dda04607b59612c1dc96}{free\+\_\+node\+\_\+vector}} (\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$v)
\begin{DoxyCompactList}\small\item\em Determine the index of a callback within a node. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_affbe8c79fdcb3fc49c4764fe14954def}\label{mdi__global_8c_affbe8c79fdcb3fc49c4764fe14954def}} 
int \mbox{\hyperlink{mdi__global_8c_affbe8c79fdcb3fc49c4764fe14954def}{new\+\_\+code}} (size\+\_\+t $\ast$code\+\_\+id)
\begin{DoxyCompactList}\small\item\em Create a new code structure and add it to the list of codes Returns the index of the new code. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_ad51728a197d96a1a93a36a77f3318706}\label{mdi__global_8c_ad51728a197d96a1a93a36a77f3318706}} 
int \mbox{\hyperlink{mdi__global_8c_ad51728a197d96a1a93a36a77f3318706}{get\+\_\+code}} (size\+\_\+t code\+\_\+id, \mbox{\hyperlink{structcode__struct}{code}} $\ast$$\ast$ret\+\_\+code)
\begin{DoxyCompactList}\small\item\em Get a code from a code handle Returns a pointer to the code. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_a39a069cda0d377c53deb09727ef93f29}\label{mdi__global_8c_a39a069cda0d377c53deb09727ef93f29}} 
int \mbox{\hyperlink{mdi__global_8c_a39a069cda0d377c53deb09727ef93f29}{get\+\_\+current\+\_\+code}} (\mbox{\hyperlink{structcode__struct}{code}} $\ast$$\ast$this\+\_\+code\+\_\+ptr)
\begin{DoxyCompactList}\small\item\em Get the currently active code Returns a pointer to the code. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_a58d118b4091ea40ce09fc3613f6c11ed}\label{mdi__global_8c_a58d118b4091ea40ce09fc3613f6c11ed}} 
int \mbox{\hyperlink{mdi__global_8c_a58d118b4091ea40ce09fc3613f6c11ed}{delete\+\_\+code}} (size\+\_\+t code\+\_\+id)
\begin{DoxyCompactList}\small\item\em Delete a code Returns 0 on success. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_a8ffd60109d9b15fd31c4f1f909d2ff1c}\label{mdi__global_8c_a8ffd60109d9b15fd31c4f1f909d2ff1c}} 
int \mbox{\hyperlink{mdi__global_8c_a8ffd60109d9b15fd31c4f1f909d2ff1c}{new\+\_\+method}} (size\+\_\+t code\+\_\+id, int method\+\_\+id, int $\ast$id\+\_\+ptr)
\begin{DoxyCompactList}\small\item\em Create a new method structure and add it to the vector of methods Returns the handle of the new method. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_af22785f4e346589086cb42e423c41448}\label{mdi__global_8c_af22785f4e346589086cb42e423c41448}} 
int \mbox{\hyperlink{mdi__global_8c_af22785f4e346589086cb42e423c41448}{get\+\_\+method}} (size\+\_\+t code\+\_\+id, int method\+\_\+id, \mbox{\hyperlink{structmethod__struct}{method}} $\ast$$\ast$method\+\_\+ptr)
\begin{DoxyCompactList}\small\item\em Get a method from a method handle Returns a pointer to the method. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_a605ad14ad94cd1f9788bc6c79a079f71}\label{mdi__global_8c_a605ad14ad94cd1f9788bc6c79a079f71}} 
int \mbox{\hyperlink{mdi__global_8c_a605ad14ad94cd1f9788bc6c79a079f71}{delete\+\_\+method}} (size\+\_\+t code\+\_\+id, int method\+\_\+id)
\begin{DoxyCompactList}\small\item\em Delete a method Returns 0 on success. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_a1a6be78ee140cfc4bf1a6e7e302155a1}\label{mdi__global_8c_a1a6be78ee140cfc4bf1a6e7e302155a1}} 
int \mbox{\hyperlink{mdi__global_8c_a1a6be78ee140cfc4bf1a6e7e302155a1}{free\+\_\+methods\+\_\+vector}} (\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$v)
\begin{DoxyCompactList}\small\item\em Free the memory associated with a methods vector. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_a1ed78b96ce43fd36a4ef4973e011da0b}\label{mdi__global_8c_a1ed78b96ce43fd36a4ef4973e011da0b}} 
int \mbox{\hyperlink{mdi__global_8c_a1ed78b96ce43fd36a4ef4973e011da0b}{new\+\_\+communicator}} (size\+\_\+t code\+\_\+id, int \mbox{\hyperlink{structmethod__struct}{method}}, M\+D\+I\+\_\+\+Comm\+\_\+\+Type $\ast$comm\+\_\+id\+\_\+ptr)
\begin{DoxyCompactList}\small\item\em Create a new communicator structure and add it to the list of communicators Returns the handle of the new communicator. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_aa9e03ba5f57e78febd05174f6bcf1317}\label{mdi__global_8c_aa9e03ba5f57e78febd05174f6bcf1317}} 
int \mbox{\hyperlink{mdi__global_8c_aa9e03ba5f57e78febd05174f6bcf1317}{get\+\_\+communicator}} (size\+\_\+t code\+\_\+id, M\+D\+I\+\_\+\+Comm\+\_\+\+Type comm\+\_\+id, \mbox{\hyperlink{structcommunicator__struct}{communicator}} $\ast$$\ast$comm\+\_\+ptr)
\begin{DoxyCompactList}\small\item\em Get a communicator from a communicator handle Returns a pointer to the communicator. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__global_8c_a5d9fb277ff54bcfba8524b76dd272b7d}{delete\+\_\+communicator}} (size\+\_\+t code\+\_\+id, M\+D\+I\+\_\+\+Comm\+\_\+\+Type comm\+\_\+id)
\begin{DoxyCompactList}\small\item\em Delete a communicator. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_aee63109d024677e514597584cdb5c70b}\label{mdi__global_8c_aee63109d024677e514597584cdb5c70b}} 
int \mbox{\hyperlink{mdi__global_8c_aee63109d024677e514597584cdb5c70b}{communicator\+\_\+delete}} (void $\ast$comm)
\begin{DoxyCompactList}\small\item\em Dummy function for method-\/specific deletion operations for communicator deletion. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__global_8c_a99034aab50d82cc584697180ef5d6368}{file\+\_\+exists}} (const char $\ast$file\+\_\+name, int $\ast$flag)
\begin{DoxyCompactList}\small\item\em Print error message and exit. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mdi__global_8c_a10ceefc902b8eb71e2383d7ac95de2c7}{mdi\+\_\+error}} (const char $\ast$message)
\begin{DoxyCompactList}\small\item\em Print error message. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{mdi__global_8c_a1f7dbb9cb3cd341f0ca9ff303f9fb313}{mdi\+\_\+warning}} (const char $\ast$message)
\begin{DoxyCompactList}\small\item\em Print warning message. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__global_8c_a34cfb0c9dbe38afae0a035b3a3884a26}{mdi\+\_\+debug}} (const char $\ast$message,...)
\begin{DoxyCompactList}\small\item\em Print a debug message. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__global_8c_a87a268a3dc5bc82001aca5c45bbe4f6a}{datatype\+\_\+info}} (M\+D\+I\+\_\+\+Datatype\+\_\+\+Type datatype, size\+\_\+t $\ast$size, M\+D\+I\+\_\+\+Datatype\+\_\+\+Type $\ast$base)
\begin{DoxyCompactList}\small\item\em Get information about an M\+DI datatype. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{mdi__global_8c_aa98bf7a7635471166b92b0a22d60a1a4}{datatype\+\_\+mpitype}} (M\+D\+I\+\_\+\+Datatype\+\_\+\+Type datatype, M\+P\+I\+\_\+\+Datatype $\ast$mpitype)
\begin{DoxyCompactList}\small\item\em Get the M\+PI datatype that corresponds to an M\+DI datatype. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{mdi__global_8c_ab0e3600e7cb339375fbeecf035de7385}\label{mdi__global_8c_ab0e3600e7cb339375fbeecf035de7385}} 
int \mbox{\hyperlink{mdi__global_8c_ab0e3600e7cb339375fbeecf035de7385}{convert\+\_\+buf\+\_\+datatype}} (void $\ast$recvbuf\+\_\+in, M\+D\+I\+\_\+\+Datatype\+\_\+\+Type recvtype, void $\ast$sendbuf\+\_\+in, M\+D\+I\+\_\+\+Datatype\+\_\+\+Type sendtype, int count)
\begin{DoxyCompactList}\small\item\em Convert a buffer from one datatype to another. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structdynamic__array__struct}{vector}} \mbox{\hyperlink{mdi__global_8c_a436cd63cce6bc5fda01cf665c6d3dc3d}{codes}} = \{ .initialized = 0 \}
\begin{DoxyCompactList}\small\item\em Vector containing all codes that have been initiailized on this rank Typically, this will only include a single code, unless the communication method is L\+I\+B\+R\+A\+RY. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Global structures used by M\+DI. 



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{mdi__global_8c_a87a268a3dc5bc82001aca5c45bbe4f6a}\label{mdi__global_8c_a87a268a3dc5bc82001aca5c45bbe4f6a}} 
\index{mdi\_global.c@{mdi\_global.c}!datatype\_info@{datatype\_info}}
\index{datatype\_info@{datatype\_info}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{datatype\_info()}{datatype\_info()}}
{\footnotesize\ttfamily int datatype\+\_\+info (\begin{DoxyParamCaption}\item[{M\+D\+I\+\_\+\+Datatype\+\_\+\+Type}]{datatype,  }\item[{size\+\_\+t $\ast$}]{size,  }\item[{M\+D\+I\+\_\+\+Datatype\+\_\+\+Type $\ast$}]{base }\end{DoxyParamCaption})}



Get information about an M\+DI datatype. 

Get information about an M\+D\+I\+\_\+\+Datatype.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em datatype} & M\+DI datatype. \\
\hline
\mbox{\texttt{ out}}  & {\em size} & Size of the M\+DI datatype. \\
\hline
\mbox{\texttt{ out}}  & {\em base} & Base type of an M\+DI datatype. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_aa98bf7a7635471166b92b0a22d60a1a4}\label{mdi__global_8c_aa98bf7a7635471166b92b0a22d60a1a4}} 
\index{mdi\_global.c@{mdi\_global.c}!datatype\_mpitype@{datatype\_mpitype}}
\index{datatype\_mpitype@{datatype\_mpitype}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{datatype\_mpitype()}{datatype\_mpitype()}}
{\footnotesize\ttfamily int datatype\+\_\+mpitype (\begin{DoxyParamCaption}\item[{M\+D\+I\+\_\+\+Datatype\+\_\+\+Type}]{datatype,  }\item[{M\+P\+I\+\_\+\+Datatype $\ast$}]{mpitype }\end{DoxyParamCaption})}



Get the M\+PI datatype that corresponds to an M\+DI datatype. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em datatype} & M\+DI datatype. \\
\hline
\mbox{\texttt{ out}}  & {\em mpitype} & M\+PI datatype. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_a5d9fb277ff54bcfba8524b76dd272b7d}\label{mdi__global_8c_a5d9fb277ff54bcfba8524b76dd272b7d}} 
\index{mdi\_global.c@{mdi\_global.c}!delete\_communicator@{delete\_communicator}}
\index{delete\_communicator@{delete\_communicator}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{delete\_communicator()}{delete\_communicator()}}
{\footnotesize\ttfamily int delete\+\_\+communicator (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{code\+\_\+id,  }\item[{M\+D\+I\+\_\+\+Comm\+\_\+\+Type}]{comm\+\_\+id }\end{DoxyParamCaption})}



Delete a communicator. 

The function returns {\ttfamily 0} on a success. \mbox{\Hypertarget{mdi__global_8c_a99034aab50d82cc584697180ef5d6368}\label{mdi__global_8c_a99034aab50d82cc584697180ef5d6368}} 
\index{mdi\_global.c@{mdi\_global.c}!file\_exists@{file\_exists}}
\index{file\_exists@{file\_exists}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{file\_exists()}{file\_exists()}}
{\footnotesize\ttfamily int file\+\_\+exists (\begin{DoxyParamCaption}\item[{const char $\ast$}]{file\+\_\+name,  }\item[{int $\ast$}]{flag }\end{DoxyParamCaption})}



Print error message and exit. 

Check whether a file exists.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em message} & Message printed before exiting. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_aff7861fac32800cca9abce0b4d7c1464}\label{mdi__global_8c_aff7861fac32800cca9abce0b4d7c1464}} 
\index{mdi\_global.c@{mdi\_global.c}!get\_callback\_index@{get\_callback\_index}}
\index{get\_callback\_index@{get\_callback\_index}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{get\_callback\_index()}{get\_callback\_index()}}
{\footnotesize\ttfamily int get\+\_\+callback\+\_\+index (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structnode__struct}{node}} $\ast$}]{n,  }\item[{const char $\ast$}]{callback\+\_\+name,  }\item[{int $\ast$}]{callback\+\_\+index }\end{DoxyParamCaption})}



Determine the index of a callback within a node. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em node} & Pointer to the node \\
\hline
\mbox{\texttt{ in}}  & {\em callback\+\_\+name} & Name of the callback \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_adb4572e1e893b9b3ec51ff318f555385}\label{mdi__global_8c_adb4572e1e893b9b3ec51ff318f555385}} 
\index{mdi\_global.c@{mdi\_global.c}!get\_command\_index@{get\_command\_index}}
\index{get\_command\_index@{get\_command\_index}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{get\_command\_index()}{get\_command\_index()}}
{\footnotesize\ttfamily int get\+\_\+command\+\_\+index (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structnode__struct}{node}} $\ast$}]{n,  }\item[{const char $\ast$}]{command\+\_\+name,  }\item[{int $\ast$}]{command\+\_\+index }\end{DoxyParamCaption})}



Determine the index of a command within a node. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em node} & Pointer to the node \\
\hline
\mbox{\texttt{ in}}  & {\em command\+\_\+name} & Name of the command \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_ad49e6c1f80018cebd100e57c17d6bb13}\label{mdi__global_8c_ad49e6c1f80018cebd100e57c17d6bb13}} 
\index{mdi\_global.c@{mdi\_global.c}!get\_node\_index@{get\_node\_index}}
\index{get\_node\_index@{get\_node\_index}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{get\_node\_index()}{get\_node\_index()}}
{\footnotesize\ttfamily int get\+\_\+node\+\_\+index (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$}]{v,  }\item[{const char $\ast$}]{node\+\_\+name,  }\item[{int $\ast$}]{node\+\_\+index }\end{DoxyParamCaption})}



Determine the index of a node within a vector of nodes. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em v} & Pointer to the vector \\
\hline
\mbox{\texttt{ in}}  & {\em node\+\_\+name} & Name of the node \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_a34cfb0c9dbe38afae0a035b3a3884a26}\label{mdi__global_8c_a34cfb0c9dbe38afae0a035b3a3884a26}} 
\index{mdi\_global.c@{mdi\_global.c}!mdi\_debug@{mdi\_debug}}
\index{mdi\_debug@{mdi\_debug}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{mdi\_debug()}{mdi\_debug()}}
{\footnotesize\ttfamily int mdi\+\_\+debug (\begin{DoxyParamCaption}\item[{const char $\ast$}]{message,  }\item[{}]{... }\end{DoxyParamCaption})}



Print a debug message. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em message} & Message printed before exiting. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_a10ceefc902b8eb71e2383d7ac95de2c7}\label{mdi__global_8c_a10ceefc902b8eb71e2383d7ac95de2c7}} 
\index{mdi\_global.c@{mdi\_global.c}!mdi\_error@{mdi\_error}}
\index{mdi\_error@{mdi\_error}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{mdi\_error()}{mdi\_error()}}
{\footnotesize\ttfamily void mdi\+\_\+error (\begin{DoxyParamCaption}\item[{const char $\ast$}]{message }\end{DoxyParamCaption})}



Print error message. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em message} & Message printed before exiting. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_a1f7dbb9cb3cd341f0ca9ff303f9fb313}\label{mdi__global_8c_a1f7dbb9cb3cd341f0ca9ff303f9fb313}} 
\index{mdi\_global.c@{mdi\_global.c}!mdi\_warning@{mdi\_warning}}
\index{mdi\_warning@{mdi\_warning}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{mdi\_warning()}{mdi\_warning()}}
{\footnotesize\ttfamily void mdi\+\_\+warning (\begin{DoxyParamCaption}\item[{const char $\ast$}]{message }\end{DoxyParamCaption})}



Print warning message. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em message} & Message printed before exiting. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_a0bab71c9dec13cb06e7d5ae0197a04fb}\label{mdi__global_8c_a0bab71c9dec13cb06e7d5ae0197a04fb}} 
\index{mdi\_global.c@{mdi\_global.c}!vector\_delete@{vector\_delete}}
\index{vector\_delete@{vector\_delete}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{vector\_delete()}{vector\_delete()}}
{\footnotesize\ttfamily int vector\+\_\+delete (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$}]{v,  }\item[{int}]{index }\end{DoxyParamCaption})}



Remove an element from a vector. 

The function returns {\ttfamily 0} on a success.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em v} & Pointer to the vector from which the element will be removed \\
\hline
\mbox{\texttt{ in}}  & {\em index} & Index of the element that will be removed from the vector \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_a4efb113e1a013d1de3065394cde82202}\label{mdi__global_8c_a4efb113e1a013d1de3065394cde82202}} 
\index{mdi\_global.c@{mdi\_global.c}!vector\_free@{vector\_free}}
\index{vector\_free@{vector\_free}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{vector\_free()}{vector\_free()}}
{\footnotesize\ttfamily int vector\+\_\+free (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$}]{v }\end{DoxyParamCaption})}



Free all data associated with a vector. 

The function returns {\ttfamily 0} on a success.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em v} & Pointer to the vector that will be freed \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_a69b06c1e9f6ae8fca62780d1878ef5b1}\label{mdi__global_8c_a69b06c1e9f6ae8fca62780d1878ef5b1}} 
\index{mdi\_global.c@{mdi\_global.c}!vector\_get@{vector\_get}}
\index{vector\_get@{vector\_get}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{vector\_get()}{vector\_get()}}
{\footnotesize\ttfamily int vector\+\_\+get (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$}]{v,  }\item[{int}]{index,  }\item[{void $\ast$$\ast$}]{element }\end{DoxyParamCaption})}



Return a pointer to an element of a vector. 

The function returns {\ttfamily 0} on a success.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em v} & Pointer to the vector \\
\hline
\mbox{\texttt{ in}}  & {\em index} & Index of the element within the vector \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_a6c749e461a84e471bcab02d8115a1dfa}\label{mdi__global_8c_a6c749e461a84e471bcab02d8115a1dfa}} 
\index{mdi\_global.c@{mdi\_global.c}!vector\_init@{vector\_init}}
\index{vector\_init@{vector\_init}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{vector\_init()}{vector\_init()}}
{\footnotesize\ttfamily int vector\+\_\+init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$}]{v,  }\item[{size\+\_\+t}]{stride }\end{DoxyParamCaption})}



Initialize memory allocation for a vector structure. 

The function returns {\ttfamily 0} on a success.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em v} & Pointer to the vector structure for which the memory will be allocated \\
\hline
\mbox{\texttt{ in}}  & {\em stride} & Stride of the vector \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{mdi__global_8c_a53e2a90f50c539f8239225d6f39c0213}\label{mdi__global_8c_a53e2a90f50c539f8239225d6f39c0213}} 
\index{mdi\_global.c@{mdi\_global.c}!vector\_push\_back@{vector\_push\_back}}
\index{vector\_push\_back@{vector\_push\_back}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{vector\_push\_back()}{vector\_push\_back()}}
{\footnotesize\ttfamily int vector\+\_\+push\+\_\+back (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structdynamic__array__struct}{vector}} $\ast$}]{v,  }\item[{void $\ast$}]{element }\end{DoxyParamCaption})}



Append a new element to the end of the vector. 

The function returns {\ttfamily 0} on a success.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em v} & Pointer to the vector to which the element will be appended \\
\hline
\mbox{\texttt{ in}}  & {\em element} & Pointer to the element that will be appended to the vector \\
\hline
\end{DoxyParams}


\doxysubsection{Variable Documentation}
\mbox{\Hypertarget{mdi__global_8c_a436cd63cce6bc5fda01cf665c6d3dc3d}\label{mdi__global_8c_a436cd63cce6bc5fda01cf665c6d3dc3d}} 
\index{mdi\_global.c@{mdi\_global.c}!codes@{codes}}
\index{codes@{codes}!mdi\_global.c@{mdi\_global.c}}
\doxysubsubsection{\texorpdfstring{codes}{codes}}
{\footnotesize\ttfamily \mbox{\hyperlink{structdynamic__array__struct}{vector}} codes = \{ .initialized = 0 \}}



Vector containing all codes that have been initiailized on this rank Typically, this will only include a single code, unless the communication method is L\+I\+B\+R\+A\+RY. 

Vector containing all codes that have been initiailized on this rank. Typically, this will only include a single code, unless the communication method is L\+I\+NK. A\+LL global M\+DI data is stored within this vector. 