\hypertarget{coll_8h}{\section{ompi/mca/coll/coll.h File Reference}
\label{coll_8h}\index{ompi/mca/coll/coll.\+h@{ompi/mca/coll/coll.\+h}}
}


Collective Communication Interface.  


{\ttfamily \#include \char`\"{}ompi\+\_\+config.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}mpi.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/mca.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/base/base.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/crs/crs.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}opal/mca/crs/base/base.\+h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structmca__coll__base__component__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+2\+\_\+0\+\_\+0\+\_\+t}
\begin{DoxyCompactList}\small\item\em Collective component interface. \end{DoxyCompactList}\item 
struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t}
\begin{DoxyCompactList}\small\item\em Collective module interface. \end{DoxyCompactList}\item 
struct \hyperlink{structmca__coll__base__comm__coll__t}{mca\+\_\+coll\+\_\+base\+\_\+comm\+\_\+coll\+\_\+t}
\begin{DoxyCompactList}\small\item\em Collectives communicator cache structure. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bfseries M\+C\+A\+\_\+\+C\+O\+L\+L\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0}
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef int($\ast$ \hyperlink{coll_8h_a10ab53e2531b8749a73a19a3d1b21144}{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+init\+\_\+query\+\_\+fn\+\_\+t} )(bool enable\+\_\+progress\+\_\+threads, bool enable\+\_\+mpi\+\_\+threads)
\begin{DoxyCompactList}\small\item\em Collective component initialization. \end{DoxyCompactList}\item 
typedef struct \\*
\hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$($\ast$ \hyperlink{coll_8h_a3ef9481b84afced07fd22bb6b5432ad4}{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+comm\+\_\+query\+\_\+2\+\_\+0\+\_\+0\+\_\+fn\+\_\+t} )(struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, int $\ast$priority)
\begin{DoxyCompactList}\small\item\em Query whether a component is available for the given communicator. \end{DoxyCompactList}\item 
typedef int($\ast$ \hyperlink{coll_8h_a4d3471e2d05290e92e1e06081d0bb571}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+enable\+\_\+1\+\_\+1\+\_\+0\+\_\+fn\+\_\+t} )(struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm)
\begin{DoxyCompactList}\small\item\em Enable module for collective communication. \end{DoxyCompactList}\item 
\hypertarget{coll_8h_a9f44d7a515af28414f70f253776c94f7}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+allgather\+\_\+fn\+\_\+t} )(void $\ast$sbuf, int scount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int rcount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_a9f44d7a515af28414f70f253776c94f7}

\item 
\hypertarget{coll_8h_aae7b655d0ad2617acff709f2eb21726b}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+allgatherv\+\_\+fn\+\_\+t} )(void $\ast$sbuf, int scount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int $\ast$rcounts, int $\ast$disps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_aae7b655d0ad2617acff709f2eb21726b}

\item 
\hypertarget{coll_8h_a1363b8d2d93fd982bc8d82504b12050a}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+allreduce\+\_\+fn\+\_\+t} )(void $\ast$sbuf, void $\ast$rbuf, int count, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$dtype, struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_a1363b8d2d93fd982bc8d82504b12050a}

\item 
\hypertarget{coll_8h_aaa9c9f61020b8874e503fe8b2e5492e5}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+alltoall\+\_\+fn\+\_\+t} )(void $\ast$sbuf, int scount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int rcount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_aaa9c9f61020b8874e503fe8b2e5492e5}

\item 
\hypertarget{coll_8h_ad6a76fc2264cbc28d1d94f3a9d58afac}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+alltoallv\+\_\+fn\+\_\+t} )(void $\ast$sbuf, int $\ast$scounts, int $\ast$sdisps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int $\ast$rcounts, int $\ast$rdisps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_ad6a76fc2264cbc28d1d94f3a9d58afac}

\item 
\hypertarget{coll_8h_ae90a0d8819f193bb993e31022806eaed}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+alltoallw\+\_\+fn\+\_\+t} )(void $\ast$sbuf, int $\ast$scounts, int $\ast$sdisps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$$\ast$sdtypes, void $\ast$rbuf, int $\ast$rcounts, int $\ast$rdisps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$$\ast$rdtypes, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_ae90a0d8819f193bb993e31022806eaed}

\item 
\hypertarget{coll_8h_a04fb31d24b406423b902d271e4701416}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+barrier\+\_\+fn\+\_\+t} )(struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_a04fb31d24b406423b902d271e4701416}

\item 
\hypertarget{coll_8h_a244af6c882f324b725f0f0e978fb3d7a}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+bcast\+\_\+fn\+\_\+t} )(void $\ast$buff, int count, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$datatype, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_a244af6c882f324b725f0f0e978fb3d7a}

\item 
\hypertarget{coll_8h_af31a1c754c9485a022daa6fb92370ccf}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+exscan\+\_\+fn\+\_\+t} )(void $\ast$sbuf, void $\ast$rbuf, int count, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$dtype, struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_af31a1c754c9485a022daa6fb92370ccf}

\item 
\hypertarget{coll_8h_a87e8cb0d46085dac8ff47707004cc902}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+gather\+\_\+fn\+\_\+t} )(void $\ast$sbuf, int scount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int rcount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_a87e8cb0d46085dac8ff47707004cc902}

\item 
\hypertarget{coll_8h_a538b1be80bd75bcadb42eef5171026c6}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+gatherv\+\_\+fn\+\_\+t} )(void $\ast$sbuf, int scount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int $\ast$rcounts, int $\ast$disps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_a538b1be80bd75bcadb42eef5171026c6}

\item 
\hypertarget{coll_8h_a0a6305ce60550f47216979be6f673e02}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+reduce\+\_\+fn\+\_\+t} )(void $\ast$sbuf, void $\ast$rbuf, int count, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$dtype, struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_a0a6305ce60550f47216979be6f673e02}

\item 
\hypertarget{coll_8h_ad30dc08833b0f8ef11af508d5ab96003}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+reduce\+\_\+scatter\+\_\+fn\+\_\+t} )(void $\ast$sbuf, void $\ast$rbuf, int $\ast$rcounts, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$dtype, struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_ad30dc08833b0f8ef11af508d5ab96003}

\item 
\hypertarget{coll_8h_a62a014ca527e0d802420d77badb2948c}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+scan\+\_\+fn\+\_\+t} )(void $\ast$sbuf, void $\ast$rbuf, int count, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$dtype, struct \hyperlink{structompi__op__t}{ompi\+\_\+op\+\_\+t} $\ast$op, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_a62a014ca527e0d802420d77badb2948c}

\item 
\hypertarget{coll_8h_a7a00e70dd7a113adfc7e4a718e92addb}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+scatter\+\_\+fn\+\_\+t} )(void $\ast$sbuf, int scount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int rcount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_a7a00e70dd7a113adfc7e4a718e92addb}

\item 
\hypertarget{coll_8h_a6d8a3d83684f7fa6be19009d64fa9d53}{typedef int($\ast$ {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+scatterv\+\_\+fn\+\_\+t} )(void $\ast$sbuf, int $\ast$scounts, int $\ast$disps, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$sdtype, void $\ast$rbuf, int rcount, struct \hyperlink{structompi__datatype__t}{ompi\+\_\+datatype\+\_\+t} $\ast$rdtype, int root, struct \hyperlink{structompi__communicator__t}{ompi\+\_\+communicator\+\_\+t} $\ast$comm, struct \hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module)}\label{coll_8h_a6d8a3d83684f7fa6be19009d64fa9d53}

\item 
typedef int($\ast$ \hyperlink{coll_8h_a856ca00bb82229b75391e18bb1b0696d}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+ft\+\_\+event\+\_\+fn\+\_\+t} )(int state)
\begin{DoxyCompactList}\small\item\em Fault Tolerance Awareness function. \end{DoxyCompactList}\item 
\hypertarget{coll_8h_abb5dcec60534c77dcdb1a44932694db5}{typedef struct \\*
\hyperlink{structmca__coll__base__component__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+2\+\_\+0\+\_\+0\+\_\+t} {\bfseries mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+2\+\_\+0\+\_\+0\+\_\+t}}\label{coll_8h_abb5dcec60534c77dcdb1a44932694db5}

\item 
typedef struct \\*
\hyperlink{structmca__coll__base__component__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+2\+\_\+0\+\_\+0\+\_\+t} \hyperlink{coll_8h_a56605df52f21843b975de49b937dd993}{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+t}
\begin{DoxyCompactList}\small\item\em Per guidence in \hyperlink{mca_8h}{mca.\+h}, use the unversioned struct name if you just want to always keep up with the most recent version of the interace. \end{DoxyCompactList}\item 
\hypertarget{coll_8h_afd5741d1a80d6daa53b8973b105356a2}{typedef struct \\*
\hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} {\bfseries mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t}}\label{coll_8h_afd5741d1a80d6daa53b8973b105356a2}

\item 
typedef struct \\*
\hyperlink{structmca__coll__base__module__2__0__0__t}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} \hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t}
\begin{DoxyCompactList}\small\item\em Per guidence in \hyperlink{mca_8h}{mca.\+h}, use the unversioned struct name if you just want to always keep up with the most recent version of the interace. \end{DoxyCompactList}\item 
\hypertarget{coll_8h_a0a3d896a0eeed3a4a550a7f5ba88a0a7}{typedef struct \\*
\hyperlink{structmca__coll__base__comm__coll__t}{mca\+\_\+coll\+\_\+base\+\_\+comm\+\_\+coll\+\_\+t} {\bfseries mca\+\_\+coll\+\_\+base\+\_\+comm\+\_\+coll\+\_\+t}}\label{coll_8h_a0a3d896a0eeed3a4a550a7f5ba88a0a7}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{coll_8h_a38806c9a9f108fddaf7c6567f1dd9074}{O\+M\+P\+I\+\_\+\+D\+E\+C\+L\+S\+P\+E\+C {\bfseries O\+B\+J\+\_\+\+C\+L\+A\+S\+S\+\_\+\+D\+E\+C\+L\+A\+R\+A\+T\+I\+O\+N} (\hyperlink{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t})}\label{coll_8h_a38806c9a9f108fddaf7c6567f1dd9074}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Collective Communication Interface. 

Interface for implementing the collective communication interface of M\+P\+I. The M\+P\+I interface provides error checking and error handler invocation, but the collective components provide all other functionality.

Component selection is done per commuicator, at Communicator construction time. \hyperlink{ompi_2mca_2coll_2base_2base_8h_af68d3e57646d558f68050d82d4415a9c}{mca\+\_\+coll\+\_\+base\+\_\+comm\+\_\+select()} is used to create the list of components available to the compoenent collm\+\_\+comm\+\_\+query function, instantiating a module for each component that i usable, and sets the module collective function pointers. \hyperlink{ompi_2mca_2coll_2base_2base_8h_af68d3e57646d558f68050d82d4415a9c}{mca\+\_\+coll\+\_\+base\+\_\+comm\+\_\+select()} then loops through the list of available components (via the instantiated module), and uses the module's coll\+\_\+module\+\_\+enable() function to enable the modules, and if successful, sets the communicator collective functions to the those supplied by the given module, keeping track of which module it is associated with.

The module destructors are called for each module used by the communicator, at communicator desctruction time.

This can result in up to N different components being used for a single communicator, one per needed collective function.

The interface is the same for inter-\/ or intra-\/communicators, and components should be able to handle either style of communicator during initialization (although handling may include indicating the component is not available). 

\subsection{Macro Definition Documentation}
\hypertarget{coll_8h_adf68b0448d4675255c0592ef21e1ab05}{\index{coll.\+h@{coll.\+h}!M\+C\+A\+\_\+\+C\+O\+L\+L\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0@{M\+C\+A\+\_\+\+C\+O\+L\+L\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0}}
\index{M\+C\+A\+\_\+\+C\+O\+L\+L\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0@{M\+C\+A\+\_\+\+C\+O\+L\+L\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0}!coll.\+h@{coll.\+h}}
\subsubsection[{M\+C\+A\+\_\+\+C\+O\+L\+L\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0}]{\setlength{\rightskip}{0pt plus 5cm}\#define M\+C\+A\+\_\+\+C\+O\+L\+L\+\_\+\+B\+A\+S\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+2\+\_\+0\+\_\+0}}\label{coll_8h_adf68b0448d4675255c0592ef21e1ab05}
{\bfseries Value\+:}
\begin{DoxyCode}
MCA\_BASE\_VERSION\_2\_0\_0, \(\backslash\)
  \textcolor{stringliteral}{"coll"}, 2, 0, 0
\end{DoxyCode}


\subsection{Typedef Documentation}
\hypertarget{coll_8h_a3ef9481b84afced07fd22bb6b5432ad4}{\index{coll.\+h@{coll.\+h}!mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+comm\+\_\+query\+\_\+2\+\_\+0\+\_\+0\+\_\+fn\+\_\+t@{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+comm\+\_\+query\+\_\+2\+\_\+0\+\_\+0\+\_\+fn\+\_\+t}}
\index{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+comm\+\_\+query\+\_\+2\+\_\+0\+\_\+0\+\_\+fn\+\_\+t@{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+comm\+\_\+query\+\_\+2\+\_\+0\+\_\+0\+\_\+fn\+\_\+t}!coll.\+h@{coll.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+comm\+\_\+query\+\_\+2\+\_\+0\+\_\+0\+\_\+fn\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t}$\ast$($\ast$ mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+comm\+\_\+query\+\_\+2\+\_\+0\+\_\+0\+\_\+fn\+\_\+t)(struct {\bf ompi\+\_\+communicator\+\_\+t} $\ast$comm, int $\ast$priority)}}\label{coll_8h_a3ef9481b84afced07fd22bb6b5432ad4}


Query whether a component is available for the given communicator. 

Query whether the component is available for the given communicator. If the component is available, an object should be allocated and returned (with refcount at 1). The module will not be used for collective operations until module\+\_\+enable() is called on the module, but may be destroyed (via O\+B\+J\+\_\+\+R\+E\+L\+E\+A\+S\+E) either before or after module\+\_\+enable() is called. If the module needs to release resources obtained during query(), it should do so in the module destructor.

A component may provide N\+U\+L\+L to this function to indicate it does not wish to run or return an error during module\+\_\+enable().

\begin{DoxyNote}{Note}
The communicator is available for point-\/to-\/point communication, but other functionality is not available during this phase of initialization.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em comm} & The communicator being created \\
\hline
\mbox{\tt out}  & {\em priority} & Priority setting for component on this communicator\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
An initialized module structure if the component can provide a module with the requested functionality or N\+U\+L\+L if the component should not be used on the given communicator. 
\end{DoxyReturn}
\hypertarget{coll_8h_a10ab53e2531b8749a73a19a3d1b21144}{\index{coll.\+h@{coll.\+h}!mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+init\+\_\+query\+\_\+fn\+\_\+t@{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+init\+\_\+query\+\_\+fn\+\_\+t}}
\index{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+init\+\_\+query\+\_\+fn\+\_\+t@{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+init\+\_\+query\+\_\+fn\+\_\+t}!coll.\+h@{coll.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+init\+\_\+query\+\_\+fn\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef int($\ast$ mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+init\+\_\+query\+\_\+fn\+\_\+t)(bool enable\+\_\+progress\+\_\+threads, bool enable\+\_\+mpi\+\_\+threads)}}\label{coll_8h_a10ab53e2531b8749a73a19a3d1b21144}


Collective component initialization. 

Initialize the given collective component. This function should initialize any component-\/level. data. It will be called exactly once during M\+P\+I\+\_\+\+I\+N\+I\+T.

\begin{DoxyNote}{Note}
The component framework is not lazily opened, so attempts should be made to minimze the amount of memory allocated during this function.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em enable\+\_\+progress\+\_\+threads} & True if the component needs to support progress threads \\
\hline
\mbox{\tt in}  & {\em enable\+\_\+mpi\+\_\+threads} & True if the component needs to support M\+P\+I\+\_\+\+T\+H\+R\+E\+A\+D\+\_\+\+M\+U\+L\+T\+I\+P\+L\+E\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S} & Component successfully initialized \\
\hline
{\em O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R} & An unspecified error occurred \\
\hline
\end{DoxyRetVals}
\hypertarget{coll_8h_a56605df52f21843b975de49b937dd993}{\index{coll.\+h@{coll.\+h}!mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+t@{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+t}}
\index{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+t@{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+t}!coll.\+h@{coll.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+2\+\_\+0\+\_\+0\+\_\+t} {\bf mca\+\_\+coll\+\_\+base\+\_\+component\+\_\+t}}}\label{coll_8h_a56605df52f21843b975de49b937dd993}


Per guidence in \hyperlink{mca_8h}{mca.\+h}, use the unversioned struct name if you just want to always keep up with the most recent version of the interace. 

\hypertarget{coll_8h_a4d3471e2d05290e92e1e06081d0bb571}{\index{coll.\+h@{coll.\+h}!mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+enable\+\_\+1\+\_\+1\+\_\+0\+\_\+fn\+\_\+t@{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+enable\+\_\+1\+\_\+1\+\_\+0\+\_\+fn\+\_\+t}}
\index{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+enable\+\_\+1\+\_\+1\+\_\+0\+\_\+fn\+\_\+t@{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+enable\+\_\+1\+\_\+1\+\_\+0\+\_\+fn\+\_\+t}!coll.\+h@{coll.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+enable\+\_\+1\+\_\+1\+\_\+0\+\_\+fn\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef int($\ast$ mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+enable\+\_\+1\+\_\+1\+\_\+0\+\_\+fn\+\_\+t)(struct {\bf mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} $\ast$module, struct {\bf ompi\+\_\+communicator\+\_\+t} $\ast$comm)}}\label{coll_8h_a4d3471e2d05290e92e1e06081d0bb571}


Enable module for collective communication. 

Enable the module for collective commuication. Modules are enabled in order from lowest to highest priority. At each component, collective functions with priority higher than the existing function are copied into the communicator's function table and the module's reference count is incremented. Replaced functions have their module's reference count decremented, so a component will go out of scope when it has been examined and is no longer used in any collective functions.

Because the function list is built on increasing priority, a component that needs functions from a lower priority component (say, a multi-\/cast barrier that might need a point-\/to-\/point barrier for resource exhaustion issues) can keep the function pointer and module pointer and increase the reference count of the module and use the module during execution.

When a module is not used for any interface functions and no higher-\/priority module has increased its refcount, it will have it's destructor triggered and the module will be destroyed.

\begin{DoxyNote}{Note}
The collective component should not modify the communicator during this operation. The communicator will be updated with the collective algorithm's function pointers and module (and the ref count increased on the module) by the base selection functionality.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
 & {\em in/out\mbox{]}} & module Module created during comm\+\_\+query() \\
\hline
\mbox{\tt in}  & {\em comm} & Communicator being created \\
\hline
\end{DoxyParams}
\hypertarget{coll_8h_a856ca00bb82229b75391e18bb1b0696d}{\index{coll.\+h@{coll.\+h}!mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+ft\+\_\+event\+\_\+fn\+\_\+t@{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+ft\+\_\+event\+\_\+fn\+\_\+t}}
\index{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+ft\+\_\+event\+\_\+fn\+\_\+t@{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+ft\+\_\+event\+\_\+fn\+\_\+t}!coll.\+h@{coll.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+ft\+\_\+event\+\_\+fn\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef int($\ast$ mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+ft\+\_\+event\+\_\+fn\+\_\+t)(int state)}}\label{coll_8h_a856ca00bb82229b75391e18bb1b0696d}


Fault Tolerance Awareness function. 

Fault tolerance function -- called when a process / job state change is noticed.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em state} & \hyperlink{classState}{State} change that triggered the function\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em O\+M\+P\+I\+\_\+\+S\+U\+C\+C\+E\+S\+S} & Component successfully selected \\
\hline
{\em O\+M\+P\+I\+\_\+\+E\+R\+R\+O\+R} & An unspecified error occurred \\
\hline
\end{DoxyRetVals}
\hypertarget{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}{\index{coll.\+h@{coll.\+h}!mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t@{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t}}
\index{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t@{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t}!coll.\+h@{coll.\+h}}
\subsubsection[{mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+2\+\_\+0\+\_\+0\+\_\+t} {\bf mca\+\_\+coll\+\_\+base\+\_\+module\+\_\+t}}}\label{coll_8h_aa26d67e9c1a6d83345102a7ef73ea7d1}


Per guidence in \hyperlink{mca_8h}{mca.\+h}, use the unversioned struct name if you just want to always keep up with the most recent version of the interace. 

