1<?xml version="1.0" standalone="yes"?> 2<library-reference><header name="boost/mpi.hpp"> 3<para>This file is a top-level convenience header that includes all of the Boost.MPI library headers. Users concerned about compile time may wish to include only specific headers from the Boost.MPI library. </para></header> 4<header name="boost/mpi/allocator.hpp"> 5<para>This header provides an STL-compliant allocator that uses the MPI-2 memory allocation facilities. </para><namespace name="boost"> 6<namespace name="mpi"> 7<class name="allocator"><template> 8 <template-type-parameter name="T"/> 9 </template><purpose>Standard Library-compliant allocator for the MPI-2 memory allocation routines. </purpose><description><para>This allocator provides a standard C++ interface to the <computeroutput>MPI_Alloc_mem</computeroutput> and <computeroutput>MPI_Free_mem</computeroutput> routines of MPI-2. It is intended to be used with the containers in the Standard Library (<computeroutput>vector</computeroutput>, in particular) in cases where the contents of the container will be directly transmitted via MPI. This allocator is also used internally by the library for character buffers that will be used in the transmission of data.</para><para>The <computeroutput>allocator</computeroutput> class template only provides MPI memory allocation when the underlying MPI implementation is either MPI-2 compliant or is known to provide <computeroutput>MPI_Alloc_mem</computeroutput> and <computeroutput>MPI_Free_mem</computeroutput> as extensions. When the MPI memory allocation routines are not available, <computeroutput>allocator</computeroutput> is brought in directly from namespace <computeroutput>std</computeroutput>, so that standard allocators are used throughout. The macro <computeroutput>BOOST_MPI_HAS_MEMORY_ALLOCATION</computeroutput> will be defined when the MPI-2 memory allocation facilities are available. </para></description><struct name="rebind"><template> 10 <template-type-parameter name="U"/> 11 </template><purpose>Retrieve the type of an allocator similar to this allocator but for a different value type. </purpose><typedef name="other"><type><classname>allocator</classname>< U ></type></typedef> 12</struct><typedef name="size_type"><purpose>Holds the size of objects. </purpose><type>std::size_t</type></typedef> 13<typedef name="difference_type"><purpose>Holds the number of elements between two pointers. </purpose><type>std::ptrdiff_t</type></typedef> 14<typedef name="pointer"><purpose>A pointer to an object of type <computeroutput>T</computeroutput>. </purpose><type>T *</type></typedef> 15<typedef name="const_pointer"><purpose>A pointer to a constant object of type <computeroutput>T</computeroutput>. </purpose><type>const T *</type></typedef> 16<typedef name="reference"><purpose>A reference to an object of type <computeroutput>T</computeroutput>. </purpose><type>T &</type></typedef> 17<typedef name="const_reference"><purpose>A reference to a constant object of type <computeroutput>T</computeroutput>. </purpose><type>const T &</type></typedef> 18<typedef name="value_type"><purpose>The type of memory allocated by this allocator. </purpose><type>T</type></typedef> 19<method-group name="public member functions"> 20<method name="address" cv="const"><type>pointer</type><parameter name="x"><paramtype>reference</paramtype></parameter><description><para>Returns the address of object <computeroutput>x</computeroutput>. </para></description></method> 21<method name="address" cv="const"><type>const_pointer</type><parameter name="x"><paramtype>const_reference</paramtype></parameter><description><para>Returns the address of object <computeroutput>x</computeroutput>. </para></description></method> 22<method name="allocate"><type>pointer</type><parameter name="n"><paramtype>size_type</paramtype><description><para>The number of elements for which memory should be allocated.</para></description></parameter><parameter name=""><paramtype><classname>allocator</classname>< void >::const_pointer</paramtype><default>0</default></parameter><description><para>Allocate enough memory for <computeroutput>n</computeroutput> elements of type <computeroutput>T</computeroutput>.</para><para> 23 24</para></description><returns><para>a pointer to the newly-allocated memory </para> 25</returns></method> 26<method name="deallocate"><type>void</type><parameter name="p"><paramtype>pointer</paramtype><description><para>The pointer whose memory should be deallocated. This pointer shall have been returned from the <computeroutput>allocate()</computeroutput> function and not have already been freed. </para></description></parameter><parameter name=""><paramtype>size_type</paramtype></parameter><description><para>Deallocate memory referred to by the pointer <computeroutput>p</computeroutput>.</para><para> 27</para></description></method> 28<method name="max_size" cv="const"><type>size_type</type><description><para>Returns the maximum number of elements that can be allocated with <computeroutput>allocate()</computeroutput>. </para></description></method> 29<method name="construct"><type>void</type><parameter name="p"><paramtype>pointer</paramtype></parameter><parameter name="val"><paramtype>const T &</paramtype></parameter><description><para>Construct a copy of <computeroutput>val</computeroutput> at the location referenced by <computeroutput>p</computeroutput>. </para></description></method> 30<method name="destroy"><type>void</type><parameter name="p"><paramtype>pointer</paramtype></parameter><description><para>Destroy the object referenced by <computeroutput>p</computeroutput>. </para></description></method> 31</method-group> 32<constructor><description><para>Default-construct an allocator. </para></description></constructor> 33<constructor><parameter name=""><paramtype>const <classname>allocator</classname> &</paramtype></parameter><description><para>Copy-construct an allocator. </para></description></constructor> 34<constructor><template> 35 <template-type-parameter name="U"/> 36 </template><parameter name=""><paramtype>const <classname>allocator</classname>< U > &</paramtype></parameter><description><para>Copy-construct an allocator from another allocator for a different value type. </para></description></constructor> 37<destructor><description><para>Destroy an allocator. </para></description></destructor> 38</class><class-specialization name="allocator"><template> 39 </template><specialization><template-arg>void</template-arg></specialization><purpose>Allocator specialization for <computeroutput>void</computeroutput> value types. </purpose><description><para>The <computeroutput>void</computeroutput> specialization of <computeroutput>allocator</computeroutput> is useful only for rebinding to another, different value type. </para></description><struct name="rebind"><template> 40 <template-type-parameter name="U"/> 41 </template><typedef name="other"><type><classname>allocator</classname>< U ></type></typedef> 42</struct><typedef name="pointer"><type>void *</type></typedef> 43<typedef name="const_pointer"><type>const void *</type></typedef> 44<typedef name="value_type"><type>void</type></typedef> 45</class-specialization><function name="operator=="><type>bool</type><template> 46 <template-type-parameter name="T1"/> 47 <template-type-parameter name="T2"/> 48 </template><parameter name=""><paramtype>const <classname>allocator</classname>< T1 > &</paramtype></parameter><parameter name=""><paramtype>const <classname>allocator</classname>< T2 > &</paramtype></parameter><purpose>Compare two allocators for equality. </purpose><description><para>Since MPI allocators have no state, all MPI allocators are equal.</para><para> 49</para></description><returns><para><computeroutput>true</computeroutput> </para> 50</returns></function> 51<function name="operator!="><type>bool</type><template> 52 <template-type-parameter name="T1"/> 53 <template-type-parameter name="T2"/> 54 </template><parameter name=""><paramtype>const <classname>allocator</classname>< T1 > &</paramtype></parameter><parameter name=""><paramtype>const <classname>allocator</classname>< T2 > &</paramtype></parameter><purpose>Compare two allocators for inequality. </purpose><description><para>Since MPI allocators have no state, all MPI allocators are equal.</para><para> 55</para></description><returns><para><computeroutput>false</computeroutput> </para> 56</returns></function> 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145</namespace> 146</namespace> 147</header> 148<header name="boost/mpi/cartesian_communicator.hpp"> 149<para>This header defines facilities to support MPI communicators with cartesian topologies. If known at compiled time, the dimension of the implied grid can be statically enforced, through the templatized communicator class. Otherwise, a non template, dynamic, base class is provided. </para><namespace name="boost"> 150<namespace name="mpi"> 151<class name="cartesian_communicator"><inherit access="public">boost::mpi::communicator</inherit><purpose>An MPI communicator with a cartesian topology. </purpose><description><para>A <computeroutput><classname alt="boost::mpi::cartesian_communicator">cartesian_communicator</classname></computeroutput> is a communicator whose topology is expressed as a grid. Cartesian communicators have the same functionality as (intra)communicators, but also allow one to query the relationships among processes and the properties of the grid. </para></description><method-group name="public member functions"> 152<method name="ndims" cv="const"><type>int</type><description><para>Retrive the number of dimension of the underlying toppology. </para></description></method> 153<method name="rank" cv="const"><type>int</type><parameter name="coords"><paramtype>const std::vector< int > &</paramtype><description><para>the coordinates. the size must match the communicator's topology. </para></description></parameter><description><para>Return the rank of the process at the given coordinates. 154</para></description></method> 155<method name="shifted_ranks" cv="const"><type>std::pair< int, int ></type><parameter name="dim"><paramtype>int</paramtype><description><para>the dimension in which the shift takes place. 0 <= dim <= ndim(). </para></description></parameter><parameter name="disp"><paramtype>int</paramtype><description><para>the shift displacement, can be positive (upward) or negative (downward). </para></description></parameter><description><para>Return the rank of the source and target destination process through a shift. 156</para></description></method> 157<method name="coordinates" cv="const"><type>std::vector< int ></type><parameter name="rk"><paramtype>int</paramtype><description><para>the ranks in this communicator. </para></description></parameter><description><para>Provides the coordinates of the process with the given rank. 158 159</para></description><returns><para>the coordinates. </para> 160</returns></method> 161<method name="topology" cv="const"><type>void</type><parameter name="dims"><paramtype><classname>cartesian_topology</classname> &</paramtype></parameter><parameter name="coords"><paramtype>std::vector< int > &</paramtype></parameter><description><para>Retrieve the topology and coordinates of this process in the grid. </para></description></method> 162<method name="topology" cv="const"><type><classname>cartesian_topology</classname></type><description><para>Retrieve the topology of the grid. </para></description></method> 163<method name="rank"><type>int</type><purpose>Determine the rank of the executing process in a communicator. </purpose><description><para>This routine is equivalent to <computeroutput>MPI_Comm_rank</computeroutput>.</para><para> 164</para></description><returns><para>The rank of the process in the communicator, which will be a value in [0, size()) </para> 165</returns></method> 166</method-group> 167<constructor><parameter name="comm"><paramtype>const MPI_Comm &</paramtype></parameter><parameter name="kind"><paramtype>comm_create_kind</paramtype></parameter><description><para>Build a new Boost.MPI cartesian communicator based on the MPI communicator <computeroutput>comm</computeroutput> with cartesian topology.</para><para><computeroutput>comm</computeroutput> may be any valid MPI communicator. If <computeroutput>comm</computeroutput> is MPI_COMM_NULL, an empty communicator (that cannot be used for communication) is created and the <computeroutput>kind</computeroutput> parameter is ignored. Otherwise, the <computeroutput>kind</computeroutput> parameter determines how the Boost.MPI communicator will be related to <computeroutput>comm:</computeroutput> </para><para><itemizedlist> 168<listitem><para>If <computeroutput>kind</computeroutput> is <computeroutput>comm_duplicate</computeroutput>, duplicate <computeroutput>comm</computeroutput> to create a new communicator. This new communicator will be freed when the Boost.MPI communicator (and all copies of it) is destroyed. This option is only permitted if the underlying MPI implementation supports MPI 2.0; duplication of intercommunicators is not available in MPI 1.x.</para> 169</listitem><listitem><para>If <computeroutput>kind</computeroutput> is <computeroutput>comm_take_ownership</computeroutput>, take ownership of <computeroutput>comm</computeroutput>. It will be freed automatically when all of the Boost.MPI communicators go out of scope.</para> 170</listitem><listitem><para>If <computeroutput>kind</computeroutput> is <computeroutput>comm_attach</computeroutput>, this Boost.MPI communicator will reference the existing MPI communicator <computeroutput>comm</computeroutput> but will not free <computeroutput>comm</computeroutput> when the Boost.MPI communicator goes out of scope. This option should only be used when the communicator is managed by the user. </para> 171</listitem></itemizedlist> 172</para></description></constructor> 173<constructor><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator that the new, cartesian communicator will be based on.</para></description></parameter><parameter name="dims"><paramtype>const <classname>cartesian_topology</classname> &</paramtype><description><para>the cartesian dimension of the new communicator. The size indicate the number of dimension. Some dimensions be set to zero, in which case the corresponding dimension value is left to the system.</para></description></parameter><parameter name="reorder"><paramtype>bool</paramtype><default>false</default><description><para>Whether MPI is permitted to re-order the process ranks within the returned communicator, to better optimize communication. If false, the ranks of each process in the returned process will match precisely the rank of that process within the original communicator. </para></description></parameter><description><para>Create a new communicator whose topology is described by the given cartesian. The indices of the vertices in the cartesian will be assumed to be the ranks of the processes within the communicator. There may be fewer vertices in the cartesian than there are processes in the communicator; in this case, the resulting communicator will be a NULL communicator.</para><para> 174</para></description></constructor> 175<constructor><parameter name="comm"><paramtype>const <classname>cartesian_communicator</classname> &</paramtype><description><para>the original communicator. </para></description></parameter><parameter name="keep"><paramtype>const std::vector< int > &</paramtype><description><para>and array containiing the dimension to keep from the existing communicator. </para></description></parameter><description><para>Create a new cartesian communicator whose topology is a subset of an existing cartesian cimmunicator. 176</para></description></constructor> 177</class><struct name="cartesian_dimension"><purpose>Specify the size and periodicity of the grid in a single dimension. </purpose><description><para>POD lightweight object. </para></description><data-member name="size"><type>int</type><description><para>The size of the grid n this dimension. </para></description></data-member> 178<data-member name="periodic"><type>bool</type><description><para>Is the grid periodic in this dimension. </para></description></data-member> 179<method-group name="public member functions"> 180</method-group> 181<constructor><parameter name="sz"><paramtype>int</paramtype><default>0</default></parameter><parameter name="p"><paramtype>bool</paramtype><default>false</default></parameter></constructor> 182<method-group name="private member functions"> 183<method name="serialize"><type>void</type><template> 184 <template-type-parameter name="Archive"/> 185 </template><parameter name="ar"><paramtype>Archive &</paramtype></parameter><parameter name="version"><paramtype>const unsigned int</paramtype></parameter></method> 186</method-group> 187</struct><class name="cartesian_topology"><inherit access="private">std::vector< cartesian_dimension ></inherit><purpose>Describe the topology of a cartesian grid. </purpose><description><para>Behave mostly like a sequence of <computeroutput><classname alt="boost::mpi::cartesian_dimension">cartesian_dimension</classname></computeroutput> with the notable exception that its size is fixed. This is a lightweight object, so that any constructor that could be considered missing could be replaced with a function (move constructor provided when supported). </para></description><method-group name="public member functions"> 188<method name="stl"><type>std::vector< <classname>cartesian_dimension</classname> > &</type><description><para>Export as an stl sequence. </para></description></method> 189<method name="stl" cv="const"><type>std::vector< <classname>cartesian_dimension</classname> > const &</type><description><para>Export as an stl sequence. </para></description></method> 190<method name="split" cv="const"><type>void</type><parameter name="dims"><paramtype>std::vector< int > &</paramtype></parameter><parameter name="periodics"><paramtype>std::vector< bool > &</paramtype></parameter><description><para>Split the topology in two sequences of sizes and periodicities. </para></description></method> 191</method-group> 192<constructor cv="= delete"/> 193<constructor cv="= default"><parameter name=""><paramtype><classname>cartesian_topology</classname> const &</paramtype></parameter></constructor> 194<copy-assignment cv="= default"><type><classname>cartesian_topology</classname> &</type><parameter name=""><paramtype><classname>cartesian_topology</classname> const &</paramtype></parameter></copy-assignment> 195<constructor><parameter name="other"><paramtype><classname>cartesian_topology</classname> &&</paramtype></parameter></constructor> 196<copy-assignment><type><classname>cartesian_topology</classname> &</type><parameter name="other"><paramtype><classname>cartesian_topology</classname> &&</paramtype></parameter></copy-assignment> 197<destructor/> 198<constructor><parameter name="ndim"><paramtype>int</paramtype></parameter><purpose>Create a N dimension space. Each dimension is initialized as non periodic of size 0. </purpose></constructor> 199<constructor><parameter name="dims"><paramtype>std::vector< <classname>cartesian_dimension</classname> > const &</paramtype></parameter><purpose>Use the provided dimensions specification as initial values. </purpose></constructor> 200<constructor specifiers="explicit"><template> 201 <template-type-parameter name="InitArr"/> 202 </template><parameter name="dims"><paramtype>InitArr</paramtype></parameter><purpose>Use dimensions specification provided in the sequence container as initial values. #param dims must be a sequence container. </purpose></constructor> 203<constructor specifiers="explicit"><parameter name="dims"><paramtype>std::initializer_list< <classname>cartesian_dimension</classname> ></paramtype></parameter><purpose>Use dimensions specification provided in the initialization list as initial values. #param dims can be of the form { dim_1, false}, .... {dim_n, true}. </purpose></constructor> 204<constructor specifiers="explicit"><template> 205 <template-nontype-parameter name="NDIM"><type>int</type></template-nontype-parameter> 206 </template><parameter name="dims"><paramtype><classname>cartesian_dimension</classname>(&)</paramtype></parameter><purpose>Use dimensions specification provided in the array. #param dims can be of the form { dim_1, false}, .... {dim_n, true}. </purpose></constructor> 207<constructor><template> 208 <template-type-parameter name="DimRg"/> 209 <template-type-parameter name="PerRg"/> 210 </template><parameter name="dim_rg"><paramtype>DimRg const &</paramtype><description><para>the dimensions, values must convert to integers. </para></description></parameter><parameter name="period_rg"><paramtype>PerRg const &</paramtype><description><para>the periodicities, values must convert to booleans. #param dims can be of the form { dim_1, false}, .... {dim_n, true} </para></description></parameter><purpose>Use dimensions specification provided in the input ranges The ranges do not need to be the same size. If the sizes are different, the missing values will be complete with zeros of the dim and assumed non periodic. </purpose><description><para> 211</para></description></constructor> 212<constructor><template> 213 <template-type-parameter name="DimIter"/> 214 <template-type-parameter name="PerIter"/> 215 </template><parameter name="dit"><paramtype>DimIter</paramtype><description><para>dimension iterator, value must convert to integer type. </para></description></parameter><parameter name="pit"><paramtype>PerIter</paramtype><description><para>periodicity iterator, value must convert to booleans.. </para></description></parameter><parameter name="n"><paramtype>int</paramtype></parameter><purpose>Iterator based initializer. Will use the first n iterated values. Both iterators can be single pass. </purpose><description><para> 216</para></description></constructor> 217</class><struct-specialization name="is_mpi_datatype"><template> 218 </template><specialization><template-arg>cartesian_dimension</template-arg></specialization><inherit access="public">true_</inherit></struct-specialization> 219 220<function name="operator=="><type>bool</type><parameter name="d1"><paramtype><classname>cartesian_dimension</classname> const &</paramtype></parameter><parameter name="d2"><paramtype><classname>cartesian_dimension</classname> const &</paramtype></parameter><purpose>Test if the dimensions values are identical. </purpose></function> 221<function name="operator!="><type>bool</type><parameter name="d1"><paramtype><classname>cartesian_dimension</classname> const &</paramtype></parameter><parameter name="d2"><paramtype><classname>cartesian_dimension</classname> const &</paramtype></parameter><purpose>Test if the dimension values are different. </purpose></function> 222<function name="operator<<"><type>std::ostream &</type><parameter name="out"><paramtype>std::ostream &</paramtype></parameter><parameter name="d"><paramtype><classname>cartesian_dimension</classname> const &</paramtype></parameter><purpose>Pretty printing of a cartesian dimension (size, periodic) </purpose></function> 223<function name="operator=="><type>bool</type><parameter name="t1"><paramtype><classname>cartesian_topology</classname> const &</paramtype></parameter><parameter name="t2"><paramtype><classname>cartesian_topology</classname> const &</paramtype></parameter></function> 224<function name="operator!="><type>bool</type><parameter name="t1"><paramtype><classname>cartesian_topology</classname> const &</paramtype></parameter><parameter name="t2"><paramtype><classname>cartesian_topology</classname> const &</paramtype></parameter></function> 225<function name="operator<<"><type>std::ostream &</type><parameter name="out"><paramtype>std::ostream &</paramtype></parameter><parameter name="t"><paramtype><classname>cartesian_topology</classname> const &</paramtype></parameter><purpose>Pretty printing of a cartesian topology. </purpose></function> 226<function name="cartesian_dimensions"><type>std::vector< int > &</type><parameter name="nb_proc"><paramtype>int</paramtype><description><para>the numer of mpi processes.fill a sequence of dimension. </para></description></parameter><parameter name="dims"><paramtype>std::vector< int > &</paramtype><description><para>a sequence of positive or null dimensions. Non zero dimension will be left untouched. </para></description></parameter><description><para>Given en number of processes, and a partially filled sequence of dimension, try to complete the dimension sequence. 227</para></description></function> 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309</namespace> 310</namespace> 311</header> 312<header name="boost/mpi/collectives.hpp"> 313<para>This header contains MPI collective operations, which implement various parallel algorithms that require the coordination of all processes within a communicator. The header <computeroutput>collectives_fwd.hpp</computeroutput> provides forward declarations for each of these operations. To include only specific collective algorithms, use the headers <computeroutput>boost/mpi/collectives/algorithm_name.hpp</computeroutput>. </para><namespace name="boost"> 314<namespace name="mpi"> 315 316 317 318 319 320 321 322 323 324<overloaded-function name="all_gather"><signature><type>void</type><template> 325 <template-type-parameter name="T"/> 326 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator over which the all-gather will occur.</para></description></parameter><parameter name="in_value"><paramtype>const T &</paramtype><description><para>The value to be transmitted by each process. To gather an array of values, <computeroutput>in_values</computeroutput> points to the <computeroutput>n</computeroutput> local values to be transmitted.</para></description></parameter><parameter name="out_values"><paramtype>std::vector< T > &</paramtype><description><para>A vector or pointer to storage that will be populated with the values from each process, indexed by the process ID number. If it is a vector, the vector will be resized accordingly. </para></description></parameter></signature><signature><type>void</type><template> 327 <template-type-parameter name="T"/> 328 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_value"><paramtype>const T &</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter></signature><signature><type>void</type><template> 329 <template-type-parameter name="T"/> 330 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="out_values"><paramtype>std::vector< T > &</paramtype></parameter></signature><signature><type>void</type><template> 331 <template-type-parameter name="T"/> 332 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter></signature><purpose>Gather the values stored at every process into vectors of values from each process. </purpose><description><para><computeroutput>all_gather</computeroutput> is a collective algorithm that collects the values stored at each process into a vector of values indexed by the process number they came from. The type <computeroutput>T</computeroutput> of the values may be any type that is serializable or has an associated MPI data type.</para><para>When the type <computeroutput>T</computeroutput> has an associated MPI data type, this routine invokes <computeroutput>MPI_Allgather</computeroutput> to gather the values.</para><para> 333</para></description></overloaded-function> 334 335 336 337<overloaded-function name="all_reduce"><signature><type>void</type><template> 338 <template-type-parameter name="T"/> 339 <template-type-parameter name="Op"/> 340 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator over which the reduction will occur. </para></description></parameter><parameter name="value"><paramtype>const T *</paramtype><description><para>The local value to be combined with the local values of every other process. For reducing arrays, <computeroutput>in_values</computeroutput> is a pointer to the local values to be reduced and <computeroutput>n</computeroutput> is the number of values to reduce. See <computeroutput>reduce</computeroutput> for more information.</para></description></parameter><parameter name="n"><paramtype>int</paramtype><description><para>Indicated the size of the buffers of array type. </para></description></parameter><parameter name="out_value"><paramtype>T *</paramtype><description><para>Will receive the result of the reduction operation. If this parameter is omitted, the outgoing value will instead be returned.</para></description></parameter><parameter name="op"><paramtype>Op</paramtype><description><para>The binary operation that combines two values of type <computeroutput>T</computeroutput> and returns a third value of type <computeroutput>T</computeroutput>. For types <computeroutput>T</computeroutput> that has ssociated MPI data types, <computeroutput>op</computeroutput> will either be translated into an <computeroutput>MPI_Op</computeroutput> (via <computeroutput>MPI_Op_create</computeroutput>) or, if possible, mapped directly to a built-in MPI operation. See <computeroutput><classname alt="boost::mpi::is_mpi_op">is_mpi_op</classname></computeroutput> in the <computeroutput>operations.hpp</computeroutput> header for more details on this mapping. For any non-built-in operation, commutativity will be determined by the <computeroutput>is_commmutative</computeroutput> trait (also in <computeroutput>operations.hpp</computeroutput>): users are encouraged to mark commutative operations as such, because it gives the implementation additional lattitude to optimize the reduction operation.</para></description></parameter></signature><signature><type>void</type><template> 341 <template-type-parameter name="T"/> 342 <template-type-parameter name="Op"/> 343 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="value"><paramtype>const T &</paramtype></parameter><parameter name="out_value"><paramtype>T &</paramtype></parameter><parameter name="op"><paramtype>Op</paramtype></parameter></signature><signature><type>T</type><template> 344 <template-type-parameter name="T"/> 345 <template-type-parameter name="Op"/> 346 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="value"><paramtype>const T &</paramtype></parameter><parameter name="op"><paramtype>Op</paramtype></parameter></signature><signature><type>void</type><template> 347 <template-type-parameter name="T"/> 348 <template-type-parameter name="Op"/> 349 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="value"><paramtype><classname>inplace_t</classname>< T * ></paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="op"><paramtype>Op</paramtype></parameter></signature><signature><type>void</type><template> 350 <template-type-parameter name="T"/> 351 <template-type-parameter name="Op"/> 352 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="value"><paramtype><classname>inplace_t</classname>< T ></paramtype></parameter><parameter name="op"><paramtype>Op</paramtype></parameter></signature><purpose>Combine the values stored by each process into a single value available to all processes. </purpose><description><para><computeroutput>all_reduce</computeroutput> is a collective algorithm that combines the values stored by each process into a single value available to all processes. The values are combined in a user-defined way, specified via a function object. The type <computeroutput>T</computeroutput> of the values may be any type that is serializable or has an associated MPI data type. One can think of this operation as a <computeroutput>all_gather</computeroutput>, followed by an <computeroutput>std::accumulate()</computeroutput> over the gather values and using the operation <computeroutput>op</computeroutput>.</para><para>When the type <computeroutput>T</computeroutput> has an associated MPI data type, this routine invokes <computeroutput>MPI_Allreduce</computeroutput> to perform the reduction. If possible, built-in MPI operations will be used; otherwise, <computeroutput>all_reduce()</computeroutput> will create a custom MPI_Op for the call to MPI_Allreduce.</para><para> 353If wrapped in a <computeroutput><classname alt="boost::mpi::inplace_t">inplace_t</classname></computeroutput> object, combine the usage of both input and $c out_value and the local value will be overwritten (a convenience function <computeroutput>inplace</computeroutput> is provided for the wrapping).</para><para> 354 355</para></description><returns><para>If no <computeroutput>out_value</computeroutput> parameter is supplied, returns the result of the reduction operation. </para> 356</returns></overloaded-function> 357 358 359 360 361<overloaded-function name="all_to_all"><signature><type>void</type><template> 362 <template-type-parameter name="T"/> 363 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator over which the all-to-all communication will occur.</para></description></parameter><parameter name="in_values"><paramtype>const std::vector< T > &</paramtype><description><para>A vector or pointer to storage that contains the values to send to each process, indexed by the process ID number.</para></description></parameter><parameter name="out_values"><paramtype>std::vector< T > &</paramtype><description><para>A vector or pointer to storage that will be updated to contain the values received from other processes. The jth value in <computeroutput>out_values</computeroutput> will come from the procss with rank j. </para></description></parameter></signature><signature><type>void</type><template> 364 <template-type-parameter name="T"/> 365 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter></signature><signature><type>void</type><template> 366 <template-type-parameter name="T"/> 367 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const std::vector< T > &</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="out_values"><paramtype>std::vector< T > &</paramtype></parameter></signature><signature><type>void</type><template> 368 <template-type-parameter name="T"/> 369 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter></signature><purpose>Send data from every process to every other process. </purpose><description><para><computeroutput>all_to_all</computeroutput> is a collective algorithm that transmits <computeroutput>p</computeroutput> values from every process to every other process. On process i, jth value of the <computeroutput>in_values</computeroutput> vector is sent to process j and placed in the ith position of the <computeroutput>out_values</computeroutput> vector in process <computeroutput>j</computeroutput>. The type <computeroutput>T</computeroutput> of the values may be any type that is serializable or has an associated MPI data type. If <computeroutput>n</computeroutput> is provided, then arrays of <computeroutput>n</computeroutput> values will be transferred from one process to another.</para><para>When the type <computeroutput>T</computeroutput> has an associated MPI data type, this routine invokes <computeroutput>MPI_Alltoall</computeroutput> to scatter the values.</para><para> 370</para></description></overloaded-function> 371 372 373 374<overloaded-function name="broadcast"><signature><type>void</type><template> 375 <template-type-parameter name="T"/> 376 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator over which the broadcast will occur.</para></description></parameter><parameter name="value"><paramtype>T &</paramtype><description><para>The value (or values, if <computeroutput>n</computeroutput> is provided) to be transmitted (if the rank of <computeroutput>comm</computeroutput> is equal to <computeroutput>root</computeroutput>) or received (if the rank of <computeroutput>comm</computeroutput> is not equal to <computeroutput>root</computeroutput>). When the <computeroutput>value</computeroutput> is a <computeroutput><classname alt="boost::mpi::skeleton_proxy">skeleton_proxy</classname></computeroutput>, only the skeleton of the object will be broadcast. In this case, the <computeroutput>root</computeroutput> will build a skeleton from the object help in the proxy and all of the non-roots will reshape the objects held in their proxies based on the skeleton sent from the root.</para></description></parameter><parameter name="root"><paramtype>int</paramtype><description><para>The rank/process ID of the process that will be transmitting the value. </para></description></parameter></signature><signature><type>void</type><template> 377 <template-type-parameter name="T"/> 378 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="values"><paramtype>T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 379 <template-type-parameter name="T"/> 380 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="value"><paramtype><classname>skeleton_proxy</classname>< T > &</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 381 <template-type-parameter name="T"/> 382 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="value"><paramtype>const <classname>skeleton_proxy</classname>< T > &</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><purpose>Broadcast a value from a root process to all other processes. </purpose><description><para><computeroutput>broadcast</computeroutput> is a collective algorithm that transfers a value from an arbitrary <computeroutput>root</computeroutput> process to every other process that is part of the given communicator. The <computeroutput>broadcast</computeroutput> algorithm can transmit any Serializable value, values that have associated MPI data types, packed archives, skeletons, and the content of skeletons; see the <computeroutput>send</computeroutput> primitive for communicators for a complete list. The type <computeroutput>T</computeroutput> shall be the same for all processes that are a part of the communicator <computeroutput>comm</computeroutput>, unless packed archives are being transferred: with packed archives, the root sends a <computeroutput><classname alt="boost::mpi::packed_oarchive">packed_oarchive</classname></computeroutput> or <computeroutput>packed_skeleton_oarchive</computeroutput> whereas the other processes receive a <computeroutput><classname alt="boost::mpi::packed_iarchive">packed_iarchive</classname></computeroutput> or <computeroutput>packed_skeleton_iarchve</computeroutput>, respectively.</para><para>When the type <computeroutput>T</computeroutput> has an associated MPI data type, this routine invokes <computeroutput>MPI_Bcast</computeroutput> to perform the broadcast.</para><para> 383</para></description></overloaded-function> 384 385 386 387<overloaded-function name="gather"><signature><type>void</type><template> 388 <template-type-parameter name="T"/> 389 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator over which the gather will occur.</para></description></parameter><parameter name="in_value"><paramtype>const T &</paramtype><description><para>The value to be transmitted by each process. For gathering arrays of values, <computeroutput>in_values</computeroutput> points to storage for <computeroutput>n*comm</computeroutput>.size() values.</para></description></parameter><parameter name="out_values"><paramtype>std::vector< T > &</paramtype><description><para>A vector or pointer to storage that will be populated with the values from each process, indexed by the process ID number. If it is a vector, it will be resized accordingly. For non-root processes, this parameter may be omitted. If it is still provided, however, it will be unchanged.</para></description></parameter><parameter name="root"><paramtype>int</paramtype><description><para>The process ID number that will collect the values. This value must be the same on all processes. </para></description></parameter></signature><signature><type>void</type><template> 390 <template-type-parameter name="T"/> 391 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_value"><paramtype>const T &</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 392 <template-type-parameter name="T"/> 393 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_value"><paramtype>const T &</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 394 <template-type-parameter name="T"/> 395 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="out_values"><paramtype>std::vector< T > &</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 396 <template-type-parameter name="T"/> 397 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 398 <template-type-parameter name="T"/> 399 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><purpose>Gather the values stored at every process into a vector at the root process. </purpose><description><para><computeroutput>gather</computeroutput> is a collective algorithm that collects the values stored at each process into a vector of values at the <computeroutput>root</computeroutput> process. This vector is indexed by the process number that the value came from. The type <computeroutput>T</computeroutput> of the values may be any type that is serializable or has an associated MPI data type.</para><para>When the type <computeroutput>T</computeroutput> has an associated MPI data type, this routine invokes <computeroutput>MPI_Gather</computeroutput> to gather the values.</para><para> 400</para></description></overloaded-function> 401 402 403 404 405 406<overloaded-function name="gatherv"><signature><type>void</type><template> 407 <template-type-parameter name="T"/> 408 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator over which the gather will occur.</para></description></parameter><parameter name="in_values"><paramtype>const std::vector< T > &</paramtype><description><para>The array of values to be transmitted by each process.</para></description></parameter><parameter name="out_values"><paramtype>T *</paramtype><description><para>A pointer to storage that will be populated with the values from each process. For non-root processes, this parameter may be omitted. If it is still provided, however, it will be unchanged.</para></description></parameter><parameter name="sizes"><paramtype>const std::vector< int > &</paramtype><description><para>A vector containing the number of elements each non-root process will send.</para></description></parameter><parameter name="displs"><paramtype>const std::vector< int > &</paramtype><description><para>A vector such that the i-th entry specifies the displacement (relative to <computeroutput>out_values</computeroutput>) from which to take the ingoing data at the <computeroutput>root</computeroutput> process. Overloaded versions for which <computeroutput>displs</computeroutput> is omitted assume that the data is to be placed contiguously at the root process.</para></description></parameter><parameter name="root"><paramtype>int</paramtype><description><para>The process ID number that will collect the values. This value must be the same on all processes. </para></description></parameter></signature><signature><type>void</type><template> 409 <template-type-parameter name="T"/> 410 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="in_size"><paramtype>int</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="sizes"><paramtype>const std::vector< int > &</paramtype></parameter><parameter name="displs"><paramtype>const std::vector< int > &</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 411 <template-type-parameter name="T"/> 412 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const std::vector< T > &</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 413 <template-type-parameter name="T"/> 414 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="in_size"><paramtype>int</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 415 <template-type-parameter name="T"/> 416 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="in_size"><paramtype>int</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="sizes"><paramtype>const std::vector< int > &</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 417 <template-type-parameter name="T"/> 418 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const std::vector< T > &</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="sizes"><paramtype>const std::vector< int > &</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><purpose>Similar to boost::mpi::gather with the difference that the number of values to be send by non-root processes can vary. </purpose><description><para> 419</para></description></overloaded-function> 420 421 422 423 424 425<overloaded-function name="scatter"><signature><type>void</type><template> 426 <template-type-parameter name="T"/> 427 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator over which the scatter will occur.</para></description></parameter><parameter name="in_values"><paramtype>const std::vector< T > &</paramtype><description><para>A vector or pointer to storage that will contain the values to send to each process, indexed by the process rank. For non-root processes, this parameter may be omitted. If it is still provided, however, it will be unchanged.</para></description></parameter><parameter name="out_value"><paramtype>T &</paramtype><description><para>The value received by each process. When scattering an array of values, <computeroutput>out_values</computeroutput> points to the <computeroutput>n</computeroutput> values that will be received by each process.</para></description></parameter><parameter name="root"><paramtype>int</paramtype><description><para>The process ID number that will scatter the values. This value must be the same on all processes. </para></description></parameter></signature><signature><type>void</type><template> 428 <template-type-parameter name="T"/> 429 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="out_value"><paramtype>T &</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 430 <template-type-parameter name="T"/> 431 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="out_value"><paramtype>T &</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 432 <template-type-parameter name="T"/> 433 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const std::vector< T > &</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 434 <template-type-parameter name="T"/> 435 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 436 <template-type-parameter name="T"/> 437 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><purpose>Scatter the values stored at the root to all processes within the communicator. </purpose><description><para><computeroutput>scatter</computeroutput> is a collective algorithm that scatters the values stored in the <computeroutput>root</computeroutput> process (inside a vector) to all of the processes in the communicator. The vector <computeroutput>out_values</computeroutput> (only significant at the <computeroutput>root</computeroutput>) is indexed by the process number to which the corresponding value will be sent. The type <computeroutput>T</computeroutput> of the values may be any type that is serializable or has an associated MPI data type.</para><para>When the type <computeroutput>T</computeroutput> has an associated MPI data type, this routine invokes <computeroutput>MPI_Scatter</computeroutput> to scatter the values.</para><para> 438</para></description></overloaded-function> 439 440 441 442 443 444<overloaded-function name="scatterv"><signature><type>void</type><template> 445 <template-type-parameter name="T"/> 446 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator over which the scatter will occur.</para></description></parameter><parameter name="in_values"><paramtype>const std::vector< T > &</paramtype><description><para>A vector or pointer to storage that will contain the values to send to each process, indexed by the process rank. For non-root processes, this parameter may be omitted. If it is still provided, however, it will be unchanged.</para></description></parameter><parameter name="sizes"><paramtype>const std::vector< int > &</paramtype><description><para>A vector containing the number of elements each non-root process will receive.</para></description></parameter><parameter name="displs"><paramtype>const std::vector< int > &</paramtype><description><para>A vector such that the i-th entry specifies the displacement (relative to <computeroutput>in_values</computeroutput>) from which to take the outgoing data to process i. Overloaded versions for which <computeroutput>displs</computeroutput> is omitted assume that the data is contiguous at the <computeroutput>root</computeroutput> process.</para></description></parameter><parameter name="out_values"><paramtype>T *</paramtype><description><para>The array of values received by each process.</para></description></parameter><parameter name="out_size"><paramtype>int</paramtype><description><para>For each non-root process this will contain the size of <computeroutput>out_values</computeroutput>.</para></description></parameter><parameter name="root"><paramtype>int</paramtype><description><para>The process ID number that will scatter the values. This value must be the same on all processes. </para></description></parameter></signature><signature><type>void</type><template> 447 <template-type-parameter name="T"/> 448 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="sizes"><paramtype>const std::vector< int > &</paramtype></parameter><parameter name="displs"><paramtype>const std::vector< int > &</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="out_size"><paramtype>int</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 449 <template-type-parameter name="T"/> 450 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="out_size"><paramtype>int</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 451 <template-type-parameter name="T"/> 452 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="sizes"><paramtype>const std::vector< int > &</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 453 <template-type-parameter name="T"/> 454 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const std::vector< T > &</paramtype></parameter><parameter name="sizes"><paramtype>const std::vector< int > &</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><purpose>Similar to boost::mpi::scatter with the difference that the number of values stored at the root process does not need to be a multiple of the communicator's size. </purpose><description><para> 455</para></description></overloaded-function> 456 457 458 459 460<overloaded-function name="reduce"><signature><type>void</type><template> 461 <template-type-parameter name="T"/> 462 <template-type-parameter name="Op"/> 463 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator over which the reduction will occur.</para></description></parameter><parameter name="in_value"><paramtype>const T &</paramtype><description><para>The local value to be combined with the local values of every other process. For reducing arrays, <computeroutput>in_values</computeroutput> contains a pointer to the local values. In this case, <computeroutput>n</computeroutput> is the number of values that will be reduced. Reduction occurs independently for each of the <computeroutput>n</computeroutput> values referenced by <computeroutput>in_values</computeroutput>, e.g., calling reduce on an array of <computeroutput>n</computeroutput> values is like calling <computeroutput>reduce</computeroutput> <computeroutput>n</computeroutput> separate times, one for each location in <computeroutput>in_values</computeroutput> and <computeroutput>out_values</computeroutput>.</para></description></parameter><parameter name="out_value"><paramtype>T &</paramtype><description><para>Will receive the result of the reduction operation, but only for the <computeroutput>root</computeroutput> process. Non-root processes may omit if parameter; if they choose to supply the parameter, it will be unchanged. For reducing arrays, <computeroutput>out_values</computeroutput> contains a pointer to the storage for the output values.</para></description></parameter><parameter name="op"><paramtype>Op</paramtype><description><para>The binary operation that combines two values of type <computeroutput>T</computeroutput> into a third value of type <computeroutput>T</computeroutput>. For types <computeroutput>T</computeroutput> that has ssociated MPI data types, <computeroutput>op</computeroutput> will either be translated into an <computeroutput>MPI_Op</computeroutput> (via <computeroutput>MPI_Op_create</computeroutput>) or, if possible, mapped directly to a built-in MPI operation. See <computeroutput><classname alt="boost::mpi::is_mpi_op">is_mpi_op</classname></computeroutput> in the <computeroutput>operations.hpp</computeroutput> header for more details on this mapping. For any non-built-in operation, commutativity will be determined by the <computeroutput>is_commmutative</computeroutput> trait (also in <computeroutput>operations.hpp</computeroutput>): users are encouraged to mark commutative operations as such, because it gives the implementation additional lattitude to optimize the reduction operation.</para></description></parameter><parameter name="root"><paramtype>int</paramtype><description><para>The process ID number that will receive the final, combined value. This value must be the same on all processes. </para></description></parameter></signature><signature><type>void</type><template> 464 <template-type-parameter name="T"/> 465 <template-type-parameter name="Op"/> 466 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_value"><paramtype>const T &</paramtype></parameter><parameter name="op"><paramtype>Op</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 467 <template-type-parameter name="T"/> 468 <template-type-parameter name="Op"/> 469 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="op"><paramtype>Op</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><signature><type>void</type><template> 470 <template-type-parameter name="T"/> 471 <template-type-parameter name="Op"/> 472 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="op"><paramtype>Op</paramtype></parameter><parameter name="root"><paramtype>int</paramtype></parameter></signature><purpose>Combine the values stored by each process into a single value at the root. </purpose><description><para><computeroutput>reduce</computeroutput> is a collective algorithm that combines the values stored by each process into a single value at the <computeroutput>root</computeroutput>. The values can be combined arbitrarily, specified via a function object. The type <computeroutput>T</computeroutput> of the values may be any type that is serializable or has an associated MPI data type. One can think of this operation as a <computeroutput>gather</computeroutput> to the <computeroutput>root</computeroutput>, followed by an <computeroutput>std::accumulate()</computeroutput> over the gathered values and using the operation <computeroutput>op</computeroutput>.</para><para>When the type <computeroutput>T</computeroutput> has an associated MPI data type, this routine invokes <computeroutput>MPI_Reduce</computeroutput> to perform the reduction. If possible, built-in MPI operations will be used; otherwise, <computeroutput>reduce()</computeroutput> will create a custom MPI_Op for the call to MPI_Reduce.</para><para> 473</para></description></overloaded-function> 474 475 476 477<overloaded-function name="scan"><signature><type>void</type><template> 478 <template-type-parameter name="T"/> 479 <template-type-parameter name="Op"/> 480 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator over which the prefix reduction will occur.</para></description></parameter><parameter name="in_value"><paramtype>const T &</paramtype><description><para>The local value to be combined with the local values of other processes. For the array variant, the <computeroutput>in_values</computeroutput> parameter points to the <computeroutput>n</computeroutput> local values that will be combined.</para></description></parameter><parameter name="out_value"><paramtype>T &</paramtype><description><para>If provided, the ith process will receive the value <computeroutput>op</computeroutput>(in_value[0], op(in_value[1], op(..., in_value[i]) ... )). For the array variant, <computeroutput>out_values</computeroutput> contains a pointer to storage for the <computeroutput>n</computeroutput> output values. The prefix reduction occurs independently for each of the <computeroutput>n</computeroutput> values referenced by <computeroutput>in_values</computeroutput>, e.g., calling scan on an array of <computeroutput>n</computeroutput> values is like calling <computeroutput>scan</computeroutput> <computeroutput>n</computeroutput> separate times, one for each location in <computeroutput>in_values</computeroutput> and <computeroutput>out_values</computeroutput>.</para></description></parameter><parameter name="op"><paramtype>Op</paramtype><description><para>The binary operation that combines two values of type <computeroutput>T</computeroutput> into a third value of type <computeroutput>T</computeroutput>. For types <computeroutput>T</computeroutput> that has ssociated MPI data types, <computeroutput>op</computeroutput> will either be translated into an <computeroutput>MPI_Op</computeroutput> (via <computeroutput>MPI_Op_create</computeroutput>) or, if possible, mapped directly to a built-in MPI operation. See <computeroutput><classname alt="boost::mpi::is_mpi_op">is_mpi_op</classname></computeroutput> in the <computeroutput>operations.hpp</computeroutput> header for more details on this mapping. For any non-built-in operation, commutativity will be determined by the <computeroutput>is_commmutative</computeroutput> trait (also in <computeroutput>operations.hpp</computeroutput>).</para></description></parameter></signature><signature><type>T</type><template> 481 <template-type-parameter name="T"/> 482 <template-type-parameter name="Op"/> 483 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_value"><paramtype>const T &</paramtype></parameter><parameter name="op"><paramtype>Op</paramtype></parameter></signature><signature><type>void</type><template> 484 <template-type-parameter name="T"/> 485 <template-type-parameter name="Op"/> 486 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="in_values"><paramtype>const T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><parameter name="out_values"><paramtype>T *</paramtype></parameter><parameter name="op"><paramtype>Op</paramtype></parameter></signature><purpose>Compute a prefix reduction of values from all processes in the communicator. </purpose><description><para><computeroutput>scan</computeroutput> is a collective algorithm that combines the values stored by each process with the values of all processes with a smaller rank. The values can be arbitrarily combined, specified via a function object <computeroutput>op</computeroutput>. The type <computeroutput>T</computeroutput> of the values may be any type that is serializable or has an associated MPI data type. One can think of this operation as a <computeroutput>gather</computeroutput> to some process, followed by an <computeroutput>std::prefix_sum()</computeroutput> over the gathered values using the operation <computeroutput>op</computeroutput>. The ith process returns the ith value emitted by <computeroutput>std::prefix_sum()</computeroutput>.</para><para>When the type <computeroutput>T</computeroutput> has an associated MPI data type, this routine invokes <computeroutput>MPI_Scan</computeroutput> to perform the reduction. If possible, built-in MPI operations will be used; otherwise, <computeroutput>scan()</computeroutput> will create a custom <computeroutput>MPI_Op</computeroutput> for the call to MPI_Scan.</para><para> 487 488</para></description><returns><para>If no <computeroutput>out_value</computeroutput> parameter is provided, returns the result of prefix reduction. </para> 489</returns></overloaded-function> 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526</namespace> 527</namespace> 528</header> 529<header name="boost/mpi/collectives_fwd.hpp"> 530<para>This header provides forward declarations for all of the collective operations contained in the header <computeroutput>collectives.hpp</computeroutput>. </para></header> 531<header name="boost/mpi/communicator.hpp"> 532<para>This header defines the <computeroutput>communicator</computeroutput> class, which is the basis of all communication within Boost.MPI, and provides point-to-point communication operations. </para><namespace name="boost"> 533<namespace name="mpi"> 534<class name="communicator"><purpose>A communicator that permits communication and synchronization among a set of processes. </purpose><description><para>The <computeroutput>communicator</computeroutput> class abstracts a set of communicating processes in MPI. All of the processes that belong to a certain communicator can determine the size of the communicator, their rank within the communicator, and communicate with any other processes in the communicator. </para></description><method-group name="public member functions"> 535<method name="rank" cv="const"><type>int</type><purpose>Determine the rank of the executing process in a communicator. </purpose><description><para>This routine is equivalent to <computeroutput>MPI_Comm_rank</computeroutput>.</para><para> 536</para></description><returns><para>The rank of the process in the communicator, which will be a value in [0, size()) </para> 537</returns></method> 538<method name="size" cv="const"><type>int</type><purpose>Determine the number of processes in a communicator. </purpose><description><para>This routine is equivalent to <computeroutput>MPI_Comm_size</computeroutput>.</para><para> 539</para></description><returns><para>The number of processes in the communicator. </para> 540</returns></method> 541<method name="group" cv="const"><type><classname>boost::mpi::group</classname></type><description><para>This routine constructs a new group whose members are the processes within this communicator. Equivalent to calling <computeroutput>MPI_Comm_group</computeroutput>. </para></description></method> 542<method name="send" cv="const"><type>void</type><template> 543 <template-type-parameter name="T"/> 544 </template><parameter name="dest"><paramtype>int</paramtype><description><para>The rank of the remote process to which the data will be sent.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <computeroutput>environment::max_tag()</computeroutput>.</para></description></parameter><parameter name="value"><paramtype>const T &</paramtype><description><para>The value that will be transmitted to the receiver. The type <computeroutput>T</computeroutput> of this value must meet the aforementioned criteria for transmission. </para></description></parameter><purpose>Send data to another process. </purpose><description><para>This routine executes a potentially blocking send with tag <computeroutput>tag</computeroutput> to the process with rank <computeroutput>dest</computeroutput>. It can be received by the destination process with a matching <computeroutput>recv</computeroutput> call.</para><para>The given <computeroutput>value</computeroutput> must be suitable for transmission over MPI. There are several classes of types that meet these requirements:</para><para><itemizedlist> 545<listitem><para>Types with mappings to MPI data types: If <computeroutput>is_mpi_datatype<T></computeroutput> is convertible to <computeroutput>mpl::true_</computeroutput>, then <computeroutput>value</computeroutput> will be transmitted using the MPI data type <computeroutput>get_mpi_datatype<T>()</computeroutput>. All primitive C++ data types that have MPI equivalents, e.g., <computeroutput>int</computeroutput>, <computeroutput>float</computeroutput>, <computeroutput>char</computeroutput>, <computeroutput>double</computeroutput>, etc., have built-in mappings to MPI data types. You may turn a Serializable type with fixed structure into an MPI data type by specializing <computeroutput><classname alt="boost::mpi::is_mpi_datatype">is_mpi_datatype</classname></computeroutput> for your type.</para> 546</listitem><listitem><para>Serializable types: Any type that provides the <computeroutput>serialize()</computeroutput> functionality required by the Boost.Serialization library can be transmitted and received.</para> 547</listitem><listitem><para>Packed archives and skeletons: Data that has been packed into an <computeroutput><classname alt="boost::mpi::packed_oarchive">mpi::packed_oarchive</classname></computeroutput> or the skeletons of data that have been backed into an <computeroutput>mpi::packed_skeleton_oarchive</computeroutput> can be transmitted, but will be received as <computeroutput><classname alt="boost::mpi::packed_iarchive">mpi::packed_iarchive</classname></computeroutput> and <computeroutput>mpi::packed_skeleton_iarchive</computeroutput>, respectively, to allow the values (or skeletons) to be extracted by the destination process.</para> 548</listitem><listitem><para>Content: Content associated with a previously-transmitted skeleton can be transmitted by <computeroutput>send</computeroutput> and received by <computeroutput>recv</computeroutput>. The receiving process may only receive content into the content of a value that has been constructed with the matching skeleton.</para> 549</listitem></itemizedlist> 550</para><para>For types that have mappings to an MPI data type (including the concent of a type), an invocation of this routine will result in a single MPI_Send call. For variable-length data, e.g., serialized types and packed archives, two messages will be sent via MPI_Send: one containing the length of the data and the second containing the data itself.</para><para>Std::vectors of MPI data type are considered variable size, e.g. their number of elements is unknown and must be transmited (although the serialization process is skipped). You can use the array specialized versions of communication methods is both sender and receiver know the vector size.</para><para>Note that the transmission mode for variable-length data is an implementation detail that is subject to change.</para><para> 551</para></description></method> 552<method name="send" cv="const"><type>void</type><template> 553 <template-type-parameter name="T"/> 554 <template-type-parameter name="A"/> 555 </template><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="value"><paramtype>const std::vector< T, A > &</paramtype></parameter></method> 556<method name="send" cv="const"><type>void</type><template> 557 <template-type-parameter name="T"/> 558 </template><parameter name="dest"><paramtype>int</paramtype><description><para>The rank of the remote process to which the skeleton will be sent.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <computeroutput>environment::max_tag()</computeroutput>.</para></description></parameter><parameter name="proxy"><paramtype>const <classname>skeleton_proxy</classname>< T > &</paramtype><description><para>The <computeroutput><classname alt="boost::mpi::skeleton_proxy">skeleton_proxy</classname></computeroutput> containing a reference to the object whose skeleton will be transmitted. </para></description></parameter><purpose>Send the skeleton of an object. </purpose><description><para>This routine executes a potentially blocking send with tag <computeroutput>tag</computeroutput> to the process with rank <computeroutput>dest</computeroutput>. It can be received by the destination process with a matching <computeroutput>recv</computeroutput> call. This variation on <computeroutput>send</computeroutput> will be used when a send of a skeleton is explicitly requested via code such as:</para><para><programlisting language="c++">comm.send(dest, tag, skeleton(object)); 559</programlisting></para><para>The semantics of this routine are equivalent to that of sending a <computeroutput>packed_skeleton_oarchive</computeroutput> storing the skeleton of the <computeroutput>object</computeroutput>.</para><para> 560</para></description></method> 561<method name="send" cv="const"><type>void</type><template> 562 <template-type-parameter name="T"/> 563 </template><parameter name="dest"><paramtype>int</paramtype><description><para>The process rank of the remote process to which the data will be sent.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <computeroutput>environment::max_tag()</computeroutput>.</para></description></parameter><parameter name="values"><paramtype>const T *</paramtype><description><para>The array of values that will be transmitted to the receiver. The type <computeroutput>T</computeroutput> of these values must be mapped to an MPI data type.</para></description></parameter><parameter name="n"><paramtype>int</paramtype><description><para>The number of values stored in the array. The destination process must call receive with at least this many elements to correctly receive the message. </para></description></parameter><purpose>Send an array of values to another process. </purpose><description><para>This routine executes a potentially blocking send of an array of data with tag <computeroutput>tag</computeroutput> to the process with rank <computeroutput>dest</computeroutput>. It can be received by the destination process with a matching array <computeroutput>recv</computeroutput> call.</para><para>If <computeroutput>T</computeroutput> is an MPI datatype, an invocation of this routine will be mapped to a single call to MPI_Send, using the datatype <computeroutput>get_mpi_datatype<T>()</computeroutput>.</para><para> 564</para></description></method> 565<method name="send" cv="const"><type>void</type><parameter name="dest"><paramtype>int</paramtype><description><para>The process rank of the remote process to which the message will be sent.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <computeroutput>environment::max_tag()</computeroutput>. </para></description></parameter><purpose>Send a message to another process without any data. </purpose><description><para>This routine executes a potentially blocking send of a message to another process. The message contains no extra data, and can therefore only be received by a matching call to <computeroutput>recv()</computeroutput>.</para><para> 566</para></description></method> 567<method name="recv" cv="const"><type><classname>status</classname></type><template> 568 <template-type-parameter name="T"/> 569 </template><parameter name="source"><paramtype>int</paramtype><description><para>The process that will be sending data. This will either be a process rank within the communicator or the constant <computeroutput>any_source</computeroutput>, indicating that we can receive the message from any process.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <computeroutput>send</computeroutput>. Alternatively, the argument may be the constant <computeroutput>any_tag</computeroutput>, indicating that this receive matches a message with any tag.</para></description></parameter><parameter name="value"><paramtype>T &</paramtype><description><para>Will contain the value of the message after a successful receive. The type of this value must match the value transmitted by the sender, unless the sender transmitted a packed archive or skeleton: in these cases, the sender transmits a <computeroutput><classname alt="boost::mpi::packed_oarchive">packed_oarchive</classname></computeroutput> or <computeroutput>packed_skeleton_oarchive</computeroutput> and the destination receives a <computeroutput><classname alt="boost::mpi::packed_iarchive">packed_iarchive</classname></computeroutput> or <computeroutput>packed_skeleton_iarchive</computeroutput>, respectively.</para></description></parameter><purpose>Receive data from a remote process. </purpose><description><para>This routine blocks until it receives a message from the process <computeroutput>source</computeroutput> with the given <computeroutput>tag</computeroutput>. The type <computeroutput>T</computeroutput> of the <computeroutput>value</computeroutput> must be suitable for transmission over MPI, which includes serializable types, types that can be mapped to MPI data types (including most built-in C++ types), packed MPI archives, skeletons, and content associated with skeletons; see the documentation of <computeroutput>send</computeroutput> for a complete description.</para><para> 570 571</para></description><returns><para>Information about the received message. </para> 572</returns></method> 573<method name="recv" cv="const"><type><classname>status</classname></type><template> 574 <template-type-parameter name="T"/> 575 <template-type-parameter name="A"/> 576 </template><parameter name="source"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="value"><paramtype>std::vector< T, A > &</paramtype></parameter></method> 577<method name="recv" cv="const"><type><classname>status</classname></type><template> 578 <template-type-parameter name="T"/> 579 </template><parameter name="source"><paramtype>int</paramtype><description><para>The process that will be sending data. This will either be a process rank within the communicator or the constant <computeroutput>any_source</computeroutput>, indicating that we can receive the message from any process.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <computeroutput>send</computeroutput>. Alternatively, the argument may be the constant <computeroutput>any_tag</computeroutput>, indicating that this receive matches a message with any tag.</para></description></parameter><parameter name="proxy"><paramtype>const <classname>skeleton_proxy</classname>< T > &</paramtype><description><para>The <computeroutput><classname alt="boost::mpi::skeleton_proxy">skeleton_proxy</classname></computeroutput> containing a reference to the object that will be reshaped to match the received skeleton.</para></description></parameter><purpose>Receive a skeleton from a remote process. </purpose><description><para>This routine blocks until it receives a message from the process <computeroutput>source</computeroutput> with the given <computeroutput>tag</computeroutput> containing a skeleton.</para><para> 580 581</para></description><returns><para>Information about the received message. </para> 582</returns></method> 583<method name="recv" cv="const"><type><classname>status</classname></type><template> 584 <template-type-parameter name="T"/> 585 </template><parameter name="source"><paramtype>int</paramtype><description><para>The process that will be sending data. This will either be a process rank within the communicator or the constant <computeroutput>any_source</computeroutput>, indicating that we can receive the message from any process.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <computeroutput>send</computeroutput>. Alternatively, the argument may be the constant <computeroutput>any_tag</computeroutput>, indicating that this receive matches a message with any tag.</para></description></parameter><parameter name="proxy"><paramtype><classname>skeleton_proxy</classname>< T > &</paramtype><description><para>The <computeroutput><classname alt="boost::mpi::skeleton_proxy">skeleton_proxy</classname></computeroutput> containing a reference to the object that will be reshaped to match the received skeleton.</para></description></parameter><purpose>Receive a skeleton from a remote process. </purpose><description><para>This routine blocks until it receives a message from the process <computeroutput>source</computeroutput> with the given <computeroutput>tag</computeroutput> containing a skeleton.</para><para> 586 587</para></description><returns><para>Information about the received message. </para> 588</returns></method> 589<method name="recv" cv="const"><type><classname>status</classname></type><template> 590 <template-type-parameter name="T"/> 591 </template><parameter name="source"><paramtype>int</paramtype><description><para>The process that will be sending data. This will either be a process rank within the communicator or the constant <computeroutput>any_source</computeroutput>, indicating that we can receive the message from any process.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <computeroutput>send</computeroutput>. Alternatively, the argument may be the constant <computeroutput>any_tag</computeroutput>, indicating that this receive matches a message with any tag.</para></description></parameter><parameter name="values"><paramtype>T *</paramtype><description><para>Will contain the values in the message after a successful receive. The type of these elements must match the type of the elements transmitted by the sender.</para></description></parameter><parameter name="n"><paramtype>int</paramtype><description><para>The number of values that can be stored into the <computeroutput>values</computeroutput> array. This shall not be smaller than the number of elements transmitted by the sender.</para></description></parameter><purpose>Receive an array of values from a remote process. </purpose><description><para>This routine blocks until it receives an array of values from the process <computeroutput>source</computeroutput> with the given <computeroutput>tag</computeroutput>. If the type <computeroutput>T</computeroutput> is</para><para> 592 593 594</para></description><returns><para>Information about the received message. </para> 595</returns><throws><simpara><classname>std::range_error</classname> if the message to be received contains more than <computeroutput>n</computeroutput> values.</simpara></throws></method> 596<method name="recv" cv="const"><type><classname>status</classname></type><parameter name="source"><paramtype>int</paramtype><description><para>The process that will be sending the message. This will either be a process rank within the communicator or the constant <computeroutput>any_source</computeroutput>, indicating that we can receive the message from any process.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <computeroutput>send</computeroutput>. Alternatively, the argument may be the constant <computeroutput>any_tag</computeroutput>, indicating that this receive matches a message with any tag.</para></description></parameter><purpose>Receive a message from a remote process without any data. </purpose><description><para>This routine blocks until it receives a message from the process <computeroutput>source</computeroutput> with the given <computeroutput>tag</computeroutput>.</para><para> 597 598</para></description><returns><para>Information about the received message. </para> 599</returns></method> 600<method name="sendrecv" cv="const"><type><classname>status</classname></type><template> 601 <template-type-parameter name="T"/> 602 </template><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="stag"><paramtype>int</paramtype></parameter><parameter name="sval"><paramtype>const T &</paramtype></parameter><parameter name="src"><paramtype>int</paramtype></parameter><parameter name="rtag"><paramtype>int</paramtype></parameter><parameter name="rval"><paramtype>T &</paramtype></parameter><purpose>Send a message to remote process and receive another message from another process. </purpose></method> 603<method name="isend" cv="const"><type><classname>request</classname></type><template> 604 <template-type-parameter name="T"/> 605 </template><parameter name="dest"><paramtype>int</paramtype><description><para>The rank of the remote process to which the data will be sent.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <computeroutput>environment::max_tag()</computeroutput>.</para></description></parameter><parameter name="value"><paramtype>const T &</paramtype><description><para>The value that will be transmitted to the receiver. The type <computeroutput>T</computeroutput> of this value must meet the aforementioned criteria for transmission. If modified before transmited, the modification may or may not be transmited.</para></description></parameter><purpose>Send a message to a remote process without blocking. </purpose><description><para>The <computeroutput>isend</computeroutput> method is functionality identical to the <computeroutput>send</computeroutput> method and transmits data in the same way, except that <computeroutput>isend</computeroutput> will not block while waiting for the data to be transmitted. Instead, a request object will be immediately returned, allowing one to query the status of the communication or wait until it has completed.</para><para> 606 607</para></description><returns><para>a <computeroutput>request</computeroutput> object that describes this communication. </para> 608</returns></method> 609<method name="isend" cv="const"><type><classname>request</classname></type><template> 610 <template-type-parameter name="T"/> 611 </template><parameter name="dest"><paramtype>int</paramtype><description><para>The rank of the remote process to which the skeleton will be sent.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <computeroutput>environment::max_tag()</computeroutput>.</para></description></parameter><parameter name="proxy"><paramtype>const <classname>skeleton_proxy</classname>< T > &</paramtype><description><para>The <computeroutput><classname alt="boost::mpi::skeleton_proxy">skeleton_proxy</classname></computeroutput> containing a reference to the object whose skeleton will be transmitted.</para></description></parameter><purpose>Send the skeleton of an object without blocking. </purpose><description><para>This routine is functionally identical to the <computeroutput>send</computeroutput> method for <computeroutput><classname alt="boost::mpi::skeleton_proxy">skeleton_proxy</classname></computeroutput> objects except that <computeroutput>isend</computeroutput> will not block while waiting for the data to be transmitted. Instead, a request object will be immediately returned, allowing one to query the status of the communication or wait until it has completed.</para><para>The semantics of this routine are equivalent to a non-blocking send of a <computeroutput>packed_skeleton_oarchive</computeroutput> storing the skeleton of the <computeroutput>object</computeroutput>.</para><para> 612 613</para></description><returns><para>a <computeroutput>request</computeroutput> object that describes this communication. </para> 614</returns></method> 615<method name="isend" cv="const"><type><classname>request</classname></type><template> 616 <template-type-parameter name="T"/> 617 </template><parameter name="dest"><paramtype>int</paramtype><description><para>The process rank of the remote process to which the data will be sent.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <computeroutput>environment::max_tag()</computeroutput>.</para></description></parameter><parameter name="values"><paramtype>const T *</paramtype><description><para>The array of values that will be transmitted to the receiver. The type <computeroutput>T</computeroutput> of these values must be mapped to an MPI data type.</para></description></parameter><parameter name="n"><paramtype>int</paramtype><description><para>The number of values stored in the array. The destination process must call receive with at least this many elements to correctly receive the message.</para></description></parameter><purpose>Send an array of values to another process without blocking. </purpose><description><para>This routine is functionally identical to the <computeroutput>send</computeroutput> method for arrays except that <computeroutput>isend</computeroutput> will not block while waiting for the data to be transmitted. Instead, a request object will be immediately returned, allowing one to query the status of the communication or wait until it has completed.</para><para> 618 619</para></description><returns><para>a <computeroutput>request</computeroutput> object that describes this communication. </para> 620</returns></method> 621<method name="isend" cv="const"><type><classname>request</classname></type><template> 622 <template-type-parameter name="T"/> 623 <template-type-parameter name="A"/> 624 </template><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="values"><paramtype>const std::vector< T, A > &</paramtype></parameter></method> 625<method name="isend" cv="const"><type><classname>request</classname></type><parameter name="dest"><paramtype>int</paramtype><description><para>The process rank of the remote process to which the message will be sent.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that will be associated with this message. Tags may be any integer between zero and an implementation-defined upper limit. This limit is accessible via <computeroutput>environment::max_tag()</computeroutput>.</para></description></parameter><purpose>Send a message to another process without any data without blocking. </purpose><description><para>This routine is functionally identical to the <computeroutput>send</computeroutput> method for sends with no data, except that <computeroutput>isend</computeroutput> will not block while waiting for the message to be transmitted. Instead, a request object will be immediately returned, allowing one to query the status of the communication or wait until it has completed.</para><para> 626 627</para></description><returns><para>a <computeroutput>request</computeroutput> object that describes this communication. </para> 628</returns></method> 629<method name="irecv" cv="const"><type><classname>request</classname></type><template> 630 <template-type-parameter name="T"/> 631 </template><parameter name="source"><paramtype>int</paramtype><description><para>The process that will be sending data. This will either be a process rank within the communicator or the constant <computeroutput>any_source</computeroutput>, indicating that we can receive the message from any process.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <computeroutput>send</computeroutput>. Alternatively, the argument may be the constant <computeroutput>any_tag</computeroutput>, indicating that this receive matches a message with any tag.</para></description></parameter><parameter name="value"><paramtype>T &</paramtype><description><para>Will contain the value of the message after a successful receive. The type of this value must match the value transmitted by the sender, unless the sender transmitted a packed archive or skeleton: in these cases, the sender transmits a <computeroutput><classname alt="boost::mpi::packed_oarchive">packed_oarchive</classname></computeroutput> or <computeroutput>packed_skeleton_oarchive</computeroutput> and the destination receives a <computeroutput><classname alt="boost::mpi::packed_iarchive">packed_iarchive</classname></computeroutput> or <computeroutput>packed_skeleton_iarchive</computeroutput>, respectively.</para></description></parameter><purpose>Prepare to receive a message from a remote process. </purpose><description><para>The <computeroutput>irecv</computeroutput> method is functionally identical to the <computeroutput>recv</computeroutput> method and receive data in the same way, except that <computeroutput>irecv</computeroutput> will not block while waiting for data to be transmitted. Instead, it immediately returns a request object that allows one to query the status of the receive or wait until it has completed.</para><para> 632 633</para></description><returns><para>a <computeroutput>request</computeroutput> object that describes this communication. </para> 634</returns></method> 635<method name="irecv" cv="const"><type><classname>request</classname></type><template> 636 <template-type-parameter name="T"/> 637 </template><parameter name="source"><paramtype>int</paramtype><description><para>The process that will be sending data. This will either be a process rank within the communicator or the constant <computeroutput>any_source</computeroutput>, indicating that we can receive the message from any process.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <computeroutput>send</computeroutput>. Alternatively, the argument may be the constant <computeroutput>any_tag</computeroutput>, indicating that this receive matches a message with any tag.</para></description></parameter><parameter name="values"><paramtype>T *</paramtype><description><para>Will contain the values in the message after a successful receive. The type of these elements must match the type of the elements transmitted by the sender.</para></description></parameter><parameter name="n"><paramtype>int</paramtype><description><para>The number of values that can be stored into the <computeroutput>values</computeroutput> array. This shall not be smaller than the number of elements transmitted by the sender.</para></description></parameter><purpose>Initiate receipt of an array of values from a remote process. </purpose><description><para>This routine initiates a receive operation for an array of values transmitted by process <computeroutput>source</computeroutput> with the given <computeroutput>tag</computeroutput>.</para><para> 638 639</para></description><returns><para>a <computeroutput>request</computeroutput> object that describes this communication. </para> 640</returns></method> 641<method name="irecv" cv="const"><type><classname>request</classname></type><template> 642 <template-type-parameter name="T"/> 643 <template-type-parameter name="A"/> 644 </template><parameter name="source"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="values"><paramtype>std::vector< T, A > &</paramtype></parameter></method> 645<method name="irecv" cv="const"><type><classname>request</classname></type><parameter name="source"><paramtype>int</paramtype><description><para>The process that will be sending the message. This will either be a process rank within the communicator or the constant <computeroutput>any_source</computeroutput>, indicating that we can receive the message from any process.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><description><para>The tag that matches a particular kind of message sent by the source process. This may be any tag value permitted by <computeroutput>send</computeroutput>. Alternatively, the argument may be the constant <computeroutput>any_tag</computeroutput>, indicating that this receive matches a message with any tag.</para></description></parameter><purpose>Initiate receipt of a message from a remote process that carries no data. </purpose><description><para>This routine initiates a receive operation for a message from process <computeroutput>source</computeroutput> with the given <computeroutput>tag</computeroutput> that carries no data.</para><para> 646 647</para></description><returns><para>a <computeroutput>request</computeroutput> object that describes this communication. </para> 648</returns></method> 649<method name="probe" cv="const"><type><classname>status</classname></type><parameter name="source"><paramtype>int</paramtype><default>any_source</default><description><para>Determine if there is a message available from this rank. If <computeroutput>any_source</computeroutput>, then the message returned may come from any source.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><default>any_tag</default><description><para>Determine if there is a message available with the given tag. If <computeroutput>any_tag</computeroutput>, then the message returned may have any tag.</para></description></parameter><purpose>Waits until a message is available to be received. </purpose><description><para>This operation waits until a message matching (<computeroutput>source</computeroutput>, <computeroutput>tag</computeroutput>) is available to be received. It then returns information about that message. The functionality is equivalent to <computeroutput>MPI_Probe</computeroutput>. To check if a message is available without blocking, use <computeroutput>iprobe</computeroutput>.</para><para> 650 651</para></description><returns><para>Returns information about the first message that matches the given criteria. </para> 652</returns></method> 653<method name="iprobe" cv="const"><type>optional< <classname>status</classname> ></type><parameter name="source"><paramtype>int</paramtype><default>any_source</default><description><para>Determine if there is a message available from this rank. If <computeroutput>any_source</computeroutput>, then the message returned may come from any source.</para></description></parameter><parameter name="tag"><paramtype>int</paramtype><default>any_tag</default><description><para>Determine if there is a message available with the given tag. If <computeroutput>any_tag</computeroutput>, then the message returned may have any tag.</para></description></parameter><purpose>Determine if a message is available to be received. </purpose><description><para>This operation determines if a message matching (<computeroutput>source</computeroutput>, <computeroutput>tag</computeroutput>) is available to be received. If so, it returns information about that message; otherwise, it returns immediately with an empty optional. The functionality is equivalent to <computeroutput>MPI_Iprobe</computeroutput>. To wait until a message is available, use <computeroutput>wait</computeroutput>.</para><para> 654 655</para></description><returns><para>If a matching message is available, returns information about that message. Otherwise, returns an empty <computeroutput>boost::optional</computeroutput>. </para> 656</returns></method> 657<method name="barrier" cv="const"><type>void</type><purpose>Wait for all processes within a communicator to reach the barrier. </purpose><description><para>This routine is a collective operation that blocks each process until all processes have entered it, then releases all of the processes "simultaneously". It is equivalent to <computeroutput>MPI_Barrier</computeroutput>. </para></description></method> 658<method name="conversion-operator" cv="const"><type>bool</type><purpose>Determine if this communicator is valid for communication. </purpose><description><para>Evaluates <computeroutput>true</computeroutput> in a boolean context if this communicator is valid for communication, i.e., does not represent MPI_COMM_NULL. Otherwise, evaluates <computeroutput>false</computeroutput>. </para></description></method> 659<method name="conversion-operator" cv="const"><type>MPI_Comm</type><purpose>Access the MPI communicator associated with a Boost.MPI communicator. </purpose><description><para>This routine permits the implicit conversion from a Boost.MPI communicator to an MPI communicator.</para><para> 660</para></description><returns><para>The associated MPI communicator. </para> 661</returns></method> 662<method name="split" cv="const"><type><classname>communicator</classname></type><parameter name="color"><paramtype>int</paramtype><description><para>The color of this process. All processes with the same <computeroutput>color</computeroutput> value will be placed into the same group.</para></description></parameter><parameter name="key"><paramtype>int</paramtype><description><para>A key value that will be used to determine the ordering of processes with the same color in the resulting communicator. If omitted, the rank of the processes in <computeroutput>this</computeroutput> will determine the ordering of processes in the resulting group.</para></description></parameter><description><para>Split the communicator into multiple, disjoint communicators each of which is based on a particular color. This is a collective operation that returns a new communicator that is a subgroup of <computeroutput>this</computeroutput>.</para><para> 663 664</para></description><returns><para>A new communicator containing all of the processes in <computeroutput>this</computeroutput> that have the same <computeroutput>color</computeroutput>. </para> 665</returns></method> 666<method name="split" cv="const"><type><classname>communicator</classname></type><parameter name="color"><paramtype>int</paramtype></parameter></method> 667<method name="as_intercommunicator" cv="const"><type>optional< <classname>intercommunicator</classname> ></type><description><para>Determine if the communicator is in fact an intercommunicator and, if so, return that intercommunicator.</para><para> 668</para></description><returns><para>an <computeroutput>optional</computeroutput> containing the intercommunicator, if this communicator is in fact an intercommunicator. Otherwise, returns an empty <computeroutput>optional</computeroutput>. </para> 669</returns></method> 670<method name="as_graph_communicator" cv="const"><type>optional< <classname>graph_communicator</classname> ></type><description><para>Determine if the communicator has a graph topology and, if so, return that <computeroutput><classname alt="boost::mpi::graph_communicator">graph_communicator</classname></computeroutput>. Even though the communicators have different types, they refer to the same underlying communication space and can be used interchangeably for communication.</para><para> 671</para></description><returns><para>an <computeroutput>optional</computeroutput> containing the graph communicator, if this communicator does in fact have a graph topology. Otherwise, returns an empty <computeroutput>optional</computeroutput>. </para> 672</returns></method> 673<method name="has_graph_topology" cv="const"><type>bool</type><description><para>Determines whether this communicator has a Graph topology. </para></description></method> 674<method name="as_cartesian_communicator" cv="const"><type>optional< <classname>cartesian_communicator</classname> ></type><description><para>Determine if the communicator has a cartesian topology and, if so, return that <computeroutput><classname alt="boost::mpi::cartesian_communicator">cartesian_communicator</classname></computeroutput>. Even though the communicators have different types, they refer to the same underlying communication space and can be used interchangeably for communication.</para><para> 675</para></description><returns><para>an <computeroutput>optional</computeroutput> containing the cartesian communicator, if this communicator does in fact have a cartesian topology. Otherwise, returns an empty <computeroutput>optional</computeroutput>. </para> 676</returns></method> 677<method name="has_cartesian_topology" cv="const"><type>bool</type><description><para>Determines whether this communicator has a Cartesian topology. </para></description></method> 678<method name="abort" cv="const"><type>void</type><parameter name="errcode"><paramtype>int</paramtype><description><para>The error code to return from aborted processes. </para></description></parameter><description><para>Abort all tasks in the group of this communicator.</para><para>Makes a "best attempt" to abort all of the tasks in the group of this communicator. Depending on the underlying MPI implementation, this may either abort the entire program (and possibly return <computeroutput>errcode</computeroutput> to the environment) or only abort some processes, allowing the others to continue. Consult the documentation for your MPI implementation. This is equivalent to a call to <computeroutput>MPI_Abort</computeroutput> </para><para> 679 680</para></description><returns><para>Will not return. </para> 681</returns></method> 682</method-group> 683<constructor><description><para>Build a new Boost.MPI communicator for <computeroutput>MPI_COMM_WORLD</computeroutput>.</para><para>Constructs a Boost.MPI communicator that attaches to <computeroutput>MPI_COMM_WORLD</computeroutput>. This is the equivalent of constructing with <computeroutput/>(MPI_COMM_WORLD, comm_attach). </para></description></constructor> 684<constructor><parameter name="comm"><paramtype>const MPI_Comm &</paramtype></parameter><parameter name="kind"><paramtype>comm_create_kind</paramtype></parameter><description><para>Build a new Boost.MPI communicator based on the MPI communicator <computeroutput>comm</computeroutput>.</para><para><computeroutput>comm</computeroutput> may be any valid MPI communicator. If <computeroutput>comm</computeroutput> is MPI_COMM_NULL, an empty communicator (that cannot be used for communication) is created and the <computeroutput>kind</computeroutput> parameter is ignored. Otherwise, the <computeroutput>kind</computeroutput> parameters determines how the Boost.MPI communicator will be related to <computeroutput>comm:</computeroutput> </para><para><itemizedlist> 685<listitem><para>If <computeroutput>kind</computeroutput> is <computeroutput>comm_duplicate</computeroutput>, duplicate <computeroutput>comm</computeroutput> to create a new communicator. This new communicator will be freed when the Boost.MPI communicator (and all copies of it) is destroyed. This option is only permitted if <computeroutput>comm</computeroutput> is a valid MPI intracommunicator or if the underlying MPI implementation supports MPI 2.0 (which supports duplication of intercommunicators).</para> 686</listitem><listitem><para>If <computeroutput>kind</computeroutput> is <computeroutput>comm_take_ownership</computeroutput>, take ownership of <computeroutput>comm</computeroutput>. It will be freed automatically when all of the Boost.MPI communicators go out of scope. This option must not be used when <computeroutput>comm</computeroutput> is MPI_COMM_WORLD.</para> 687</listitem><listitem><para>If <computeroutput>kind</computeroutput> is <computeroutput>comm_attach</computeroutput>, this Boost.MPI communicator will reference the existing MPI communicator <computeroutput>comm</computeroutput> but will not free <computeroutput>comm</computeroutput> when the Boost.MPI communicator goes out of scope. This option should only be used when the communicator is managed by the user or MPI library (e.g., MPI_COMM_WORLD). </para> 688</listitem></itemizedlist> 689</para></description></constructor> 690<constructor><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>An MPI communicator.</para></description></parameter><parameter name="subgroup"><paramtype>const <classname>boost::mpi::group</classname> &</paramtype><description><para>A subgroup of the MPI communicator, <computeroutput>comm</computeroutput>, for which we will construct a new communicator. </para></description></parameter><description><para>Build a new Boost.MPI communicator based on a subgroup of another MPI communicator.</para><para>This routine will construct a new communicator containing all of the processes from communicator <computeroutput>comm</computeroutput> that are listed within the group <computeroutput>subgroup</computeroutput>. Equivalent to <computeroutput>MPI_Comm_create</computeroutput>.</para><para> 691</para></description></constructor> 692<method-group name="protected member functions"> 693<method name="irecv_vector" cv="const"><type><classname>request</classname></type><template> 694 <template-type-parameter name="T"/> 695 <template-type-parameter name="A"/> 696 </template><parameter name="source"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="values"><paramtype>std::vector< T, A > &</paramtype></parameter><parameter name=""><paramtype>mpl::true_</paramtype></parameter></method> 697<method name="isend_vector" cv="const"><type><classname>request</classname></type><template> 698 <template-type-parameter name="T"/> 699 <template-type-parameter name="A"/> 700 </template><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="values"><paramtype>const std::vector< T, A > &</paramtype></parameter><parameter name=""><paramtype>mpl::true_</paramtype></parameter></method> 701<method name="send_vector" cv="const"><type>void</type><template> 702 <template-type-parameter name="T"/> 703 <template-type-parameter name="A"/> 704 </template><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="value"><paramtype>const std::vector< T, A > &</paramtype></parameter><parameter name=""><paramtype>mpl::true_</paramtype></parameter></method> 705<method name="recv_vector" cv="const"><type><classname>status</classname></type><template> 706 <template-type-parameter name="T"/> 707 <template-type-parameter name="A"/> 708 </template><parameter name="source"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="value"><paramtype>std::vector< T, A > &</paramtype></parameter><parameter name=""><paramtype>mpl::true_</paramtype></parameter></method> 709<method name="irecv_vector" cv="const"><type><classname>request</classname></type><template> 710 <template-type-parameter name="T"/> 711 <template-type-parameter name="A"/> 712 </template><parameter name="source"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="values"><paramtype>std::vector< T, A > &</paramtype></parameter><parameter name=""><paramtype>mpl::false_</paramtype></parameter></method> 713<method name="isend_vector" cv="const"><type><classname>request</classname></type><template> 714 <template-type-parameter name="T"/> 715 <template-type-parameter name="A"/> 716 </template><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="values"><paramtype>const std::vector< T, A > &</paramtype></parameter><parameter name=""><paramtype>mpl::false_</paramtype></parameter></method> 717<method name="send_vector" cv="const"><type>void</type><template> 718 <template-type-parameter name="T"/> 719 <template-type-parameter name="A"/> 720 </template><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="value"><paramtype>const std::vector< T, A > &</paramtype></parameter><parameter name=""><paramtype>mpl::false_</paramtype></parameter></method> 721<method name="recv_vector" cv="const"><type><classname>status</classname></type><template> 722 <template-type-parameter name="T"/> 723 <template-type-parameter name="A"/> 724 </template><parameter name="source"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="value"><paramtype>std::vector< T, A > &</paramtype></parameter><parameter name=""><paramtype>mpl::false_</paramtype></parameter></method> 725</method-group> 726</class><enum name="comm_create_kind"><enumvalue name="comm_duplicate"/><enumvalue name="comm_take_ownership"/><enumvalue name="comm_attach"/><purpose>Enumeration used to describe how to adopt a C <computeroutput>MPI_Comm</computeroutput> into a Boost.MPI communicator. </purpose><description><para>The values for this enumeration determine how a Boost.MPI communicator will behave when constructed with an MPI communicator. The options are:</para><para><itemizedlist> 727<listitem><para><computeroutput>comm_duplicate:</computeroutput> Duplicate the MPI_Comm communicator to create a new communicator (e.g., with MPI_Comm_dup). This new MPI_Comm communicator will be automatically freed when the Boost.MPI communicator (and all copies of it) is destroyed.</para> 728</listitem><listitem><para><computeroutput>comm_take_ownership:</computeroutput> Take ownership of the communicator. It will be freed automatically when all of the Boost.MPI communicators go out of scope. This option must not be used with MPI_COMM_WORLD.</para> 729</listitem><listitem><para><computeroutput>comm_attach:</computeroutput> The Boost.MPI communicator will reference the existing MPI communicator but will not free it when the Boost.MPI communicator goes out of scope. This option should only be used when the communicator is managed by the user or MPI library (e.g., MPI_COMM_WORLD). </para> 730</listitem></itemizedlist> 731</para></description></enum> 732<data-member name="any_source"><type>const int</type><purpose>A constant representing "any process.". </purpose><description><para>This constant may be used for the <computeroutput>source</computeroutput> parameter of <computeroutput>receive</computeroutput> operations to indicate that a message may be received from any source. </para></description></data-member> 733<data-member name="any_tag"><type>const int</type><purpose>A constant representing "any tag.". </purpose><description><para>This constant may be used for the <computeroutput>tag</computeroutput> parameter of <computeroutput>receive</computeroutput> operations to indicate that a <computeroutput>send</computeroutput> with any tag will be matched by the receive. </para></description></data-member> 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790<function name="operator=="><type>BOOST_MPI_DECL bool</type><parameter name="comm1"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="comm2"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><purpose>Determines whether two communicators are identical. </purpose><description><para>Equivalent to calling <computeroutput>MPI_Comm_compare</computeroutput> and checking whether the result is <computeroutput>MPI_IDENT</computeroutput>.</para><para> 791</para></description><returns><para>True when the two communicators refer to the same underlying MPI communicator. </para> 792</returns></function> 793<function name="operator!="><type>bool</type><parameter name="comm1"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><parameter name="comm2"><paramtype>const <classname>communicator</classname> &</paramtype></parameter><purpose>Determines whether two communicators are different. </purpose><description><para> 794</para></description><returns><para><computeroutput>!</computeroutput>(comm1 == comm2) </para> 795</returns></function> 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828</namespace> 829</namespace> 830</header> 831<header name="boost/mpi/config.hpp"> 832<para>This header provides MPI configuration details that expose the capabilities of the underlying MPI implementation, and provides auto-linking support on Windows. </para><macro name="MPICH_IGNORE_CXX_SEEK"/> 833<macro name="OMPI_SKIP_MPICXX"/> 834<macro name="BOOST_MPI_HOMOGENEOUS"><purpose>Comment this macro is you are running in an heterogeneous environment. </purpose><description><para>When this flag is enabled, we assume some simple, POD-like, type can be transmitted without paying the cost of portable serialization.</para><para>Comment this if your platform is not homogeneous and that portable serialization/deserialization must be performed.</para><para>It you do so, check that your MPI implementation supports thats kind of environment. </para></description></macro> 835<macro name="BOOST_MPI_VERSION"><purpose>Major version of the underlying MPI implementation supproted standard. </purpose><description><para>If, for some reason, MPI_VERSION is not supported, you should probably set that according to your MPI documentation </para></description></macro> 836<macro name="BOOST_MPI_SUBVERSION"/> 837<macro name="BOOST_MPI_HAS_MEMORY_ALLOCATION"><purpose>Determine if the MPI implementation has support for memory allocation. </purpose><description><para>This macro will be defined when the underlying MPI implementation has support for the MPI-2 memory allocation routines <computeroutput>MPI_Alloc_mem</computeroutput> and <computeroutput>MPI_Free_mem</computeroutput>. When defined, the <computeroutput>allocator</computeroutput> class template will provide Standard Library-compliant access to these memory-allocation routines. </para></description></macro> 838<macro name="BOOST_MPI_HAS_NOARG_INITIALIZATION"><purpose>Determine if the MPI implementation has supports initialization without command-line arguments. </purpose><description><para>This macro will be defined when the underlying implementation supports initialization of MPI without passing along command-line arguments, e.g., <computeroutput>MPI_Init(NULL, NULL)</computeroutput>. When defined, the <computeroutput>environment</computeroutput> class will provide a default constructor. This macro is always defined for MPI-2 implementations. </para></description></macro> 839<macro name="BOOST_MPI_CALLING_CONVENTION"><purpose>Specifies the calling convention that will be used for callbacks from the underlying C MPI. </purpose><description><para>This is a Windows-specific macro, which will be used internally to state the calling convention of any function that is to be used as a callback from MPI. For example, the internally-defined functions that are used in a call to <computeroutput>MPI_Op_create</computeroutput>. This macro is likely only to be useful to users that wish to bypass Boost.MPI, registering their own callbacks in certain cases, e.g., through <computeroutput>MPI_Op_create</computeroutput>. </para></description></macro> 840<macro name="BOOST_MPI_BCAST_BOTTOM_WORKS_FINE"><purpose>Indicates that MPI_Bcast supports MPI_BOTTOM. </purpose><description><para>Some implementations have a broken MPI_Bcast wrt to MPI_BOTTOM. BullX MPI and LAM seems to be among them, at least for some versions. The <computeroutput>broacast_test.cpp</computeroutput> test <computeroutput>test_skeleton_and_content</computeroutput> can be used to detect that. </para></description></macro> 841<macro name="BOOST_MPI_DECL"/> 842</header> 843<header name="boost/mpi/datatype.hpp"> 844<para>This header provides the mapping from C++ types to MPI data types. </para><namespace name="boost"> 845<namespace name="mpi"> 846<struct name="is_mpi_builtin_datatype"><template> 847 <template-type-parameter name="T"/> 848 </template><inherit access="public">boost::mpl::or_< is_mpi_integer_datatype< T >, is_mpi_floating_point_datatype< T >, is_mpi_logical_datatype< T >, is_mpi_complex_datatype< T >, is_mpi_byte_datatype< T > ></inherit><purpose>Type trait that determines if there exists a built-in MPI data type for a given C++ type. </purpose><description><para>This type trait determines when there is a direct mapping from a C++ type to an MPI type. For instance, the C++ <computeroutput>int</computeroutput> type maps directly to the MPI type <computeroutput>MPI_INT</computeroutput>. When there is a direct mapping from the type <computeroutput>T</computeroutput> to an MPI type, <computeroutput><classname alt="boost::mpi::is_mpi_builtin_datatype">is_mpi_builtin_datatype</classname></computeroutput> will derive from <computeroutput>mpl::true_</computeroutput> and the MPI data type will be accessible via <computeroutput>get_mpi_datatype</computeroutput>.</para><para>In general, users should not need to specialize this trait. However, if you have an additional C++ type that can map directly to only of MPI's built-in types, specialize either this trait or one of the traits corresponding to categories of MPI data types (<computeroutput><classname alt="boost::mpi::is_mpi_integer_datatype">is_mpi_integer_datatype</classname></computeroutput>, <computeroutput><classname alt="boost::mpi::is_mpi_floating_point_datatype">is_mpi_floating_point_datatype</classname></computeroutput>, <computeroutput><classname alt="boost::mpi::is_mpi_logical_datatype">is_mpi_logical_datatype</classname></computeroutput>, <computeroutput><classname alt="boost::mpi::is_mpi_complex_datatype">is_mpi_complex_datatype</classname></computeroutput>, or <computeroutput><classname alt="boost::mpi::is_mpi_builtin_datatype">is_mpi_builtin_datatype</classname></computeroutput>). <computeroutput><classname alt="boost::mpi::is_mpi_builtin_datatype">is_mpi_builtin_datatype</classname></computeroutput> derives <computeroutput>mpl::true_</computeroutput> if any of the traits corresponding to MPI data type categories derived <computeroutput>mpl::true_</computeroutput>. </para></description></struct><struct name="is_mpi_byte_datatype"><template> 849 <template-type-parameter name="T"/> 850 </template><inherit access="public">false_</inherit><purpose>Type trait that determines if there exists a built-in byte MPI data type for a given C++ type. </purpose><description><para>This type trait determines when there is a direct mapping from a C++ type to an MPI data type that is classified as an byte data type. See <computeroutput><classname alt="boost::mpi::is_mpi_builtin_datatype">is_mpi_builtin_datatype</classname></computeroutput> for general information about built-in MPI data types. </para></description></struct><struct name="is_mpi_complex_datatype"><template> 851 <template-type-parameter name="T"/> 852 </template><inherit access="public">false_</inherit><purpose>Type trait that determines if there exists a built-in complex MPI data type for a given C++ type. </purpose><description><para>This type trait determines when there is a direct mapping from a C++ type to an MPI data type that is classified as a complex data type. See <computeroutput><classname alt="boost::mpi::is_mpi_builtin_datatype">is_mpi_builtin_datatype</classname></computeroutput> for general information about built-in MPI data types. </para></description></struct><struct name="is_mpi_datatype"><template> 853 <template-type-parameter name="T"/> 854 </template><inherit access="public">boost::mpi::is_mpi_builtin_datatype< T ></inherit><purpose>Type trait that determines if a C++ type can be mapped to an MPI data type. </purpose><description><para>This type trait determines if it is possible to build an MPI data type that represents a C++ data type. When this is the case, <computeroutput><classname alt="boost::mpi::is_mpi_datatype">is_mpi_datatype</classname></computeroutput> derives <computeroutput>mpl::true_</computeroutput> and the MPI data type will be accessible via <computeroutput>get_mpi_datatype</computeroutput>.</para><para>For any C++ type that maps to a built-in MPI data type (see <computeroutput><classname alt="boost::mpi::is_mpi_builtin_datatype">is_mpi_builtin_datatype</classname></computeroutput>), <computeroutput>is_mpi_data_type</computeroutput> is trivially true. However, any POD ("Plain Old Data") type containing types that themselves can be represented by MPI data types can itself be represented as an MPI data type. For instance, a <computeroutput>point3d</computeroutput> class containing three <computeroutput>double</computeroutput> values can be represented as an MPI data type. To do so, first make the data type Serializable (using the Boost.Serialization library); then, specialize the <computeroutput><classname alt="boost::mpi::is_mpi_datatype">is_mpi_datatype</classname></computeroutput> trait for the point type so that it will derive <computeroutput>mpl::true_:</computeroutput> </para><para><programlisting language="c++">namespace boost { namespace mpi { 855 template<> struct is_mpi_datatype<point> 856 : public mpl::true_ { }; 857} } 858</programlisting> </para></description></struct><struct name="is_mpi_floating_point_datatype"><template> 859 <template-type-parameter name="T"/> 860 </template><inherit access="public">false_</inherit><purpose>Type trait that determines if there exists a built-in floating point MPI data type for a given C++ type. </purpose><description><para>This type trait determines when there is a direct mapping from a C++ type to an MPI data type that is classified as a floating point data type. See <computeroutput><classname alt="boost::mpi::is_mpi_builtin_datatype">is_mpi_builtin_datatype</classname></computeroutput> for general information about built-in MPI data types. </para></description></struct><struct name="is_mpi_integer_datatype"><template> 861 <template-type-parameter name="T"/> 862 </template><inherit access="public">false_</inherit><purpose>Type trait that determines if there exists a built-in integer MPI data type for a given C++ type. </purpose><description><para>This type trait determines when there is a direct mapping from a C++ type to an MPI data type that is classified as an integer data type. See <computeroutput><classname alt="boost::mpi::is_mpi_builtin_datatype">is_mpi_builtin_datatype</classname></computeroutput> for general information about built-in MPI data types. </para></description></struct><struct name="is_mpi_logical_datatype"><template> 863 <template-type-parameter name="T"/> 864 </template><inherit access="public">false_</inherit><purpose>Type trait that determines if there exists a built-in logical MPI data type for a given C++ type. </purpose><description><para>This type trait determines when there is a direct mapping from a C++ type to an MPI data type that is classified as an logical data type. See <computeroutput><classname alt="boost::mpi::is_mpi_builtin_datatype">is_mpi_builtin_datatype</classname></computeroutput> for general information about built-in MPI data types. </para></description></struct> 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922<function name="get_mpi_datatype"><type>MPI_Datatype</type><template> 923 <template-type-parameter name="T"/> 924 </template><parameter name="x"><paramtype>const T &</paramtype><description><para>for an optimized call, a constructed object of the type should be passed; otherwise, an object will be default-constructed.</para></description></parameter><purpose>Returns an MPI data type for a C++ type. </purpose><description><para>The function creates an MPI data type for the given object <computeroutput>x</computeroutput>. The first time it is called for a class <computeroutput>T</computeroutput>, the MPI data type is created and cached. Subsequent calls for objects of the same type <computeroutput>T</computeroutput> return the cached MPI data type. The type <computeroutput>T</computeroutput> must allow creation of an MPI data type. That is, it must be Serializable and <computeroutput>is_mpi_datatype<T></computeroutput> must derive <computeroutput>mpl::true_</computeroutput>.</para><para>For fundamental MPI types, a copy of the MPI data type of the MPI library is returned.</para><para>Note that since the data types are cached, the caller should never call <computeroutput>MPI_Type_free()</computeroutput> for the MPI data type returned by this call.</para><para> 925 926</para></description><returns><para>The MPI data type corresponding to type <computeroutput>T</computeroutput>. </para> 927</returns></function> 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959</namespace> 960</namespace> 961<macro name="BOOST_IS_MPI_DATATYPE" kind="functionlike"><macro-parameter name="T"/></macro> 962</header> 963<header name="boost/mpi/datatype_fwd.hpp"> 964<para>This header provides forward declarations for the contents of the header <computeroutput>datatype.hpp</computeroutput>. It is expected to be used primarily by user-defined C++ classes that need to specialize <computeroutput>is_mpi_datatype</computeroutput>. </para><namespace name="boost"> 965<namespace name="mpi"> 966<struct name="packed"><purpose>a dummy data type giving MPI_PACKED as its MPI_Datatype </purpose></struct> 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025<function name="get_mpi_datatype"><type>MPI_Datatype</type><template> 1026 <template-type-parameter name="T"/> 1027 </template></function> 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058</namespace> 1059</namespace> 1060</header> 1061<header name="boost/mpi/environment.hpp"> 1062<para>This header provides the <computeroutput>environment</computeroutput> class, which provides routines to initialize, finalization, and query the status of the Boost MPI environment. </para><namespace name="boost"> 1063<namespace name="mpi"> 1064<class name="environment"><inherit access="private">noncopyable</inherit><purpose>Initialize, finalize, and query the MPI environment. </purpose><description><para>The <computeroutput>environment</computeroutput> class is used to initialize, finalize, and query the MPI environment. It will typically be used in the <computeroutput>main()</computeroutput> function of a program, which will create a single instance of <computeroutput>environment</computeroutput> initialized with the arguments passed to the program:</para><para><programlisting language="c++">int main(int argc, char* argv[]) 1065{ 1066 mpi::environment env(argc, argv); 1067} 1068</programlisting></para><para>The instance of <computeroutput>environment</computeroutput> will initialize MPI (by calling <computeroutput>MPI_Init</computeroutput>) in its constructor and finalize MPI (by calling <computeroutput>MPI_Finalize</computeroutput> for normal termination or <computeroutput>MPI_Abort</computeroutput> for an uncaught exception) in its destructor.</para><para>The use of <computeroutput>environment</computeroutput> is not mandatory. Users may choose to invoke <computeroutput>MPI_Init</computeroutput> and <computeroutput>MPI_Finalize</computeroutput> manually. In this case, no <computeroutput>environment</computeroutput> object is needed. If one is created, however, it will do nothing on either construction or destruction. </para></description><method-group name="public member functions"> 1069</method-group> 1070<constructor specifiers="explicit"><parameter name="abort_on_exception"><paramtype>bool</paramtype><default>true</default><description><para>When true, this object will abort the program if it is destructed due to an uncaught exception. </para></description></parameter><description><para>Initialize the MPI environment.</para><para>If the MPI environment has not already been initialized, initializes MPI with a call to <computeroutput>MPI_Init</computeroutput>. Since this constructor does not take command-line arguments (<computeroutput>argc</computeroutput> and <computeroutput>argv</computeroutput>), it is only available when the underlying MPI implementation supports calling <computeroutput>MPI_Init</computeroutput> with <computeroutput>NULL</computeroutput> arguments, indicated by the macro <computeroutput>BOOST_MPI_HAS_NOARG_INITIALIZATION</computeroutput>.</para><para> 1071</para></description></constructor> 1072<constructor specifiers="explicit"><parameter name="mt_level"><paramtype>threading::level</paramtype><description><para>the required level of threading support.</para></description></parameter><parameter name="abort_on_exception"><paramtype>bool</paramtype><default>true</default><description><para>When true, this object will abort the program if it is destructed due to an uncaught exception. </para></description></parameter><description><para>Initialize the MPI environment.</para><para>If the MPI environment has not already been initialized, initializes MPI with a call to <computeroutput>MPI_Init_thread</computeroutput>. Since this constructor does not take command-line arguments (<computeroutput>argc</computeroutput> and <computeroutput>argv</computeroutput>), it is only available when the underlying MPI implementation supports calling <computeroutput>MPI_Init</computeroutput> with <computeroutput>NULL</computeroutput> arguments, indicated by the macro <computeroutput>BOOST_MPI_HAS_NOARG_INITIALIZATION</computeroutput>.</para><para> 1073</para></description></constructor> 1074<constructor><parameter name="argc"><paramtype>int &</paramtype><description><para>The number of arguments provided in <computeroutput>argv</computeroutput>, as passed into the program's <computeroutput>main</computeroutput> function.</para></description></parameter><parameter name="argv"><paramtype>char **&</paramtype><description><para>The array of argument strings passed to the program via <computeroutput>main</computeroutput>.</para></description></parameter><parameter name="abort_on_exception"><paramtype>bool</paramtype><default>true</default><description><para>When true, this object will abort the program if it is destructed due to an uncaught exception. </para></description></parameter><description><para>Initialize the MPI environment.</para><para>If the MPI environment has not already been initialized, initializes MPI with a call to <computeroutput>MPI_Init</computeroutput>.</para><para> 1075</para></description></constructor> 1076<constructor><parameter name="argc"><paramtype>int &</paramtype><description><para>The number of arguments provided in <computeroutput>argv</computeroutput>, as passed into the program's <computeroutput>main</computeroutput> function.</para></description></parameter><parameter name="argv"><paramtype>char **&</paramtype><description><para>The array of argument strings passed to the program via <computeroutput>main</computeroutput>.</para></description></parameter><parameter name="mt_level"><paramtype>threading::level</paramtype><description><para>the required level of threading support</para></description></parameter><parameter name="abort_on_exception"><paramtype>bool</paramtype><default>true</default><description><para>When true, this object will abort the program if it is destructed due to an uncaught exception. </para></description></parameter><description><para>Initialize the MPI environment.</para><para>If the MPI environment has not already been initialized, initializes MPI with a call to <computeroutput>MPI_Init_thread</computeroutput>.</para><para> 1077</para></description></constructor> 1078<destructor><description><para>Shuts down the MPI environment.</para><para>If this <computeroutput>environment</computeroutput> object was used to initialize the MPI environment, and the MPI environment has not already been shut down (finalized), this destructor will shut down the MPI environment. Under normal circumstances, this only involves invoking <computeroutput>MPI_Finalize</computeroutput>. However, if destruction is the result of an uncaught exception and the <computeroutput>abort_on_exception</computeroutput> parameter of the constructor had the value <computeroutput>true</computeroutput>, this destructor will invoke <computeroutput>MPI_Abort</computeroutput> with <computeroutput>MPI_COMM_WORLD</computeroutput> to abort the entire MPI program with a result code of -1. </para></description></destructor> 1079<method-group name="public static functions"> 1080<method name="abort" specifiers="static"><type>void</type><parameter name="errcode"><paramtype>int</paramtype><description><para>The error code to return to the environment. </para></description></parameter><description><para>Abort all MPI processes.</para><para>Aborts all MPI processes and returns to the environment. The precise behavior will be defined by the underlying MPI implementation. This is equivalent to a call to <computeroutput>MPI_Abort</computeroutput> with <computeroutput>MPI_COMM_WORLD</computeroutput>.</para><para> 1081 1082</para></description><returns><para>Will not return. </para> 1083</returns></method> 1084<method name="initialized" specifiers="static"><type>bool</type><description><para>Determine if the MPI environment has already been initialized.</para><para>This routine is equivalent to a call to <computeroutput>MPI_Initialized</computeroutput>.</para><para> 1085</para></description><returns><para><computeroutput>true</computeroutput> if the MPI environment has been initialized. </para> 1086</returns></method> 1087<method name="finalized" specifiers="static"><type>bool</type><description><para>Determine if the MPI environment has already been finalized.</para><para>The routine is equivalent to a call to <computeroutput>MPI_Finalized</computeroutput>.</para><para> 1088</para></description><returns><para><computeroutput>true</computeroutput> if the MPI environment has been finalized. </para> 1089</returns></method> 1090<method name="max_tag" specifiers="static"><type>int</type><description><para>Retrieves the maximum tag value.</para><para>Returns the maximum value that may be used for the <computeroutput>tag</computeroutput> parameter of send/receive operations. This value will be somewhat smaller than the value of <computeroutput>MPI_TAG_UB</computeroutput>, because the Boost.MPI implementation reserves some tags for collective operations.</para><para> 1091</para></description><returns><para>the maximum tag value. </para> 1092</returns></method> 1093<method name="collectives_tag" specifiers="static"><type>int</type><description><para>The tag value used for collective operations.</para><para>Returns the reserved tag value used by the Boost.MPI implementation for collective operations. Although users are not permitted to use this tag to send or receive messages, it may be useful when monitoring communication patterns.</para><para> 1094</para></description><returns><para>the tag value used for collective operations. </para> 1095</returns></method> 1096<method name="host_rank" specifiers="static"><type>optional< int ></type><description><para>Retrieves the rank of the host process, if one exists.</para><para>If there is a host process, this routine returns the rank of that process. Otherwise, it returns an empty <computeroutput>optional<int></computeroutput>. MPI does not define the meaning of a "host" process: consult the documentation for the MPI implementation. This routine examines the <computeroutput>MPI_HOST</computeroutput> attribute of <computeroutput>MPI_COMM_WORLD</computeroutput>.</para><para> 1097</para></description><returns><para>The rank of the host process, if one exists. </para> 1098</returns></method> 1099<method name="io_rank" specifiers="static"><type>optional< int ></type><description><para>Retrieves the rank of a process that can perform input/output.</para><para>This routine returns the rank of a process that can perform input/output via the standard C and C++ I/O facilities. If every process can perform I/O using the standard facilities, this routine will return <computeroutput>any_source</computeroutput>; if no process can perform I/O, this routine will return no value (an empty <computeroutput>optional</computeroutput>). This routine examines the <computeroutput>MPI_IO</computeroutput> attribute of <computeroutput>MPI_COMM_WORLD</computeroutput>.</para><para> 1100</para></description><returns><para>the rank of the process that can perform I/O, <computeroutput>any_source</computeroutput> if every process can perform I/O, or no value if no process can perform I/O. </para> 1101</returns></method> 1102<method name="processor_name" specifiers="static"><type>std::string</type><description><para>Retrieve the name of this processor.</para><para>This routine returns the name of this processor. The actual form of the name is unspecified, but may be documented by the underlying MPI implementation. This routine is implemented as a call to <computeroutput>MPI_Get_processor_name</computeroutput>.</para><para> 1103</para></description><returns><para>the name of this processor. </para> 1104</returns></method> 1105<method name="thread_level" specifiers="static"><type>threading::level</type><description><para>Query the current level of thread support. </para></description></method> 1106<method name="is_main_thread" specifiers="static"><type>bool</type><description><para>Are we in the main thread? </para></description></method> 1107<method name="version" specifiers="static"><type>std::pair< int, int ></type><purpose>MPI version. </purpose><description><para>Returns a pair with the version and sub-version number. </para></description></method> 1108</method-group> 1109</class><namespace name="threading"> 1110<enum name="level"><enumvalue name="single"><default>= MPI_THREAD_SINGLE</default><description><para>Only one thread will execute. </para></description></enumvalue><enumvalue name="funneled"><default>= MPI_THREAD_FUNNELED</default><description><para>Only main thread will do MPI calls.</para><para>The process may be multi-threaded, but only the main thread will make MPI calls (all MPI calls are `<lsquo/>funneled<rsquo/>' to the main thread). </para></description></enumvalue><enumvalue name="serialized"><default>= MPI_THREAD_SERIALIZED</default><description><para>Only one thread at the time do MPI calls.</para><para>The process may be multi-threaded, and multiple threads may make MPI calls, but only one at a time: MPI calls are not made concurrently from two distinct threads (all MPI calls are `<lsquo/>serialized<rsquo/>'). </para></description></enumvalue><enumvalue name="multiple"><default>= MPI_THREAD_MULTIPLE</default><description><para>Multiple thread may do MPI calls.</para><para>Multiple threads may call MPI, with no restrictions. </para></description></enumvalue><purpose>specify the supported threading level. </purpose><description><para>Based on MPI 2 standard/8.7.3 </para></description></enum> 1111<function name="operator<<"><type>std::ostream &</type><parameter name="out"><paramtype>std::ostream &</paramtype></parameter><parameter name="l"><paramtype>level</paramtype></parameter><description><para>Formated output for threading level. </para></description></function> 1112<function name="operator>>"><type>std::istream &</type><parameter name="in"><paramtype>std::istream &</paramtype></parameter><parameter name="l"><paramtype>level &</paramtype></parameter><description><para>Formated input for threading level. </para></description></function> 1113</namespace> 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204</namespace> 1205</namespace> 1206</header> 1207<header name="boost/mpi/exception.hpp"> 1208<para>This header provides exception classes that report MPI errors to the user and macros that translate MPI error codes into Boost.MPI exceptions. </para><namespace name="boost"> 1209<namespace name="mpi"> 1210<class name="exception"><inherit access="public">exception</inherit><purpose>Catch-all exception class for MPI errors. </purpose><description><para>Instances of this class will be thrown when an MPI error occurs. MPI failures that trigger these exceptions may or may not be recoverable, depending on the underlying MPI implementation. Consult the documentation for your MPI implementation to determine the effect of MPI errors. </para></description><method-group name="public member functions"> 1211<method name="what" cv="const" specifiers="virtual"><type>const char *</type><description><para>A description of the error that occurred. </para></description></method> 1212<method name="routine" cv="const"><type>const char *</type><description><para>Retrieve the name of the MPI routine that reported the error. </para></description></method> 1213<method name="result_code" cv="const"><type>int</type><purpose>Retrieve the result code returned from the MPI routine that reported the error. </purpose></method> 1214<method name="error_class" cv="const"><type>int</type><purpose>Returns the MPI error class associated with the error that triggered this exception. </purpose></method> 1215</method-group> 1216<constructor><parameter name="routine"><paramtype>const char *</paramtype><description><para>The MPI routine in which the error occurred. This should be a pointer to a string constant: it will not be copied.</para></description></parameter><parameter name="result_code"><paramtype>int</paramtype><description><para>The result code returned from the MPI routine that aborted with an error. </para></description></parameter><description><para>Build a new <computeroutput>exception</computeroutput> exception.</para><para> 1217</para></description></constructor> 1218<destructor/> 1219</class> 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309</namespace> 1310</namespace> 1311<macro name="BOOST_MPI_CHECK_RESULT" kind="functionlike"><macro-parameter name="MPIFunc"/><macro-parameter name="Args"/><description><para>Call the MPI routine MPIFunc with arguments Args (surrounded by parentheses). If the result is not MPI_SUCCESS, use boost::throw_exception to throw an exception or abort, depending on BOOST_NO_EXCEPTIONS. </para></description></macro> 1312</header> 1313<header name="boost/mpi/graph_communicator.hpp"> 1314<para>This header defines facilities to support MPI communicators with graph topologies, using the graph interface defined by the Boost Graph Library. One can construct a communicator whose topology is described by any graph meeting the requirements of the Boost Graph Library's graph concepts. Likewise, any communicator that has a graph topology can be viewed as a graph by the Boost Graph Library, permitting one to use the BGL's graph algorithms on the process topology. </para><namespace name="boost"> 1315<struct-specialization name="graph_traits"><template> 1316 </template><specialization><template-arg>mpi::graph_communicator</template-arg></specialization><purpose>Traits structure that allows a communicator with graph topology to be view as a graph by the Boost Graph Library. </purpose><description><para>The specialization of <computeroutput>graph_traits</computeroutput> for an MPI communicator allows a communicator with graph topology to be viewed as a graph. An MPI communicator with graph topology meets the requirements of the Graph, Incidence Graph, Adjacency Graph, Vertex List Graph, and Edge List Graph concepts from the Boost Graph Library. </para></description><typedef name="vertex_descriptor"><type>int</type></typedef> 1317<typedef name="edge_descriptor"><type>std::pair< int, int ></type></typedef> 1318<typedef name="directed_category"><type>directed_tag</type></typedef> 1319<typedef name="edge_parallel_category"><type>disallow_parallel_edge_tag</type></typedef> 1320<typedef name="out_edge_iterator"><type><emphasis>unspecified</emphasis></type></typedef> 1321<typedef name="degree_size_type"><type>int</type></typedef> 1322<typedef name="adjacency_iterator"><type><emphasis>unspecified</emphasis></type></typedef> 1323<typedef name="vertex_iterator"><type>counting_iterator< int ></type></typedef> 1324<typedef name="vertices_size_type"><type>int</type></typedef> 1325<typedef name="edge_iterator"><type><emphasis>unspecified</emphasis></type></typedef> 1326<typedef name="edges_size_type"><type>int</type></typedef> 1327<method-group name="public static functions"> 1328<method name="null_vertex" specifiers="static"><type>vertex_descriptor</type><purpose>Returns a vertex descriptor that can never refer to any valid vertex. </purpose></method> 1329</method-group> 1330</struct-specialization><namespace name="mpi"> 1331<class name="graph_communicator"><inherit access="public">boost::mpi::communicator</inherit><purpose>An MPI communicator with a graph topology. </purpose><description><para>A <computeroutput><classname alt="boost::mpi::graph_communicator">graph_communicator</classname></computeroutput> is a communicator whose topology is expressed as a graph. Graph communicators have the same functionality as (intra)communicators, but also allow one to query the relationships among processes. Those relationships are expressed via a graph, using the interface defined by the Boost Graph Library. The <computeroutput><classname alt="boost::mpi::graph_communicator">graph_communicator</classname></computeroutput> class meets the requirements of the BGL Graph, Incidence Graph, Adjacency Graph, Vertex List Graph, and Edge List Graph concepts. </para></description><method-group name="public member functions"> 1332</method-group> 1333<constructor><parameter name="comm"><paramtype>const MPI_Comm &</paramtype></parameter><parameter name="kind"><paramtype>comm_create_kind</paramtype></parameter><description><para>Build a new Boost.MPI graph communicator based on the MPI communicator <computeroutput>comm</computeroutput> with graph topology.</para><para><computeroutput>comm</computeroutput> may be any valid MPI communicator. If <computeroutput>comm</computeroutput> is MPI_COMM_NULL, an empty communicator (that cannot be used for communication) is created and the <computeroutput>kind</computeroutput> parameter is ignored. Otherwise, the <computeroutput>kind</computeroutput> parameter determines how the Boost.MPI communicator will be related to <computeroutput>comm:</computeroutput> </para><para><itemizedlist> 1334<listitem><para>If <computeroutput>kind</computeroutput> is <computeroutput>comm_duplicate</computeroutput>, duplicate <computeroutput>comm</computeroutput> to create a new communicator. This new communicator will be freed when the Boost.MPI communicator (and all copies of it) is destroyed. This option is only permitted if the underlying MPI implementation supports MPI 2.0; duplication of intercommunicators is not available in MPI 1.x.</para> 1335</listitem><listitem><para>If <computeroutput>kind</computeroutput> is <computeroutput>comm_take_ownership</computeroutput>, take ownership of <computeroutput>comm</computeroutput>. It will be freed automatically when all of the Boost.MPI communicators go out of scope.</para> 1336</listitem><listitem><para>If <computeroutput>kind</computeroutput> is <computeroutput>comm_attach</computeroutput>, this Boost.MPI communicator will reference the existing MPI communicator <computeroutput>comm</computeroutput> but will not free <computeroutput>comm</computeroutput> when the Boost.MPI communicator goes out of scope. This option should only be used when the communicator is managed by the user. </para> 1337</listitem></itemizedlist> 1338</para></description></constructor> 1339<constructor specifiers="explicit"><template> 1340 <template-type-parameter name="Graph"/> 1341 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator that the new, graph communicator will be based on.</para></description></parameter><parameter name="graph"><paramtype>const Graph &</paramtype><description><para>Any type that meets the requirements of the Incidence Graph and Vertex List Graph concepts from the Boost Graph Library. This structure of this graph will become the topology of the communicator that is returned.</para></description></parameter><parameter name="reorder"><paramtype>bool</paramtype><default>false</default><description><para>Whether MPI is permitted to re-order the process ranks within the returned communicator, to better optimize communication. If false, the ranks of each process in the returned process will match precisely the rank of that process within the original communicator. </para></description></parameter><description><para>Create a new communicator whose topology is described by the given graph. The indices of the vertices in the graph will be assumed to be the ranks of the processes within the communicator. There may be fewer vertices in the graph than there are processes in the communicator; in this case, the resulting communicator will be a NULL communicator.</para><para> 1342</para></description></constructor> 1343<constructor specifiers="explicit"><template> 1344 <template-type-parameter name="Graph"/> 1345 <template-type-parameter name="RankMap"/> 1346 </template><parameter name="comm"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The communicator that the new, graph communicator will be based on. The ranks in <computeroutput>rank</computeroutput> refer to the processes in this communicator.</para></description></parameter><parameter name="graph"><paramtype>const Graph &</paramtype><description><para>Any type that meets the requirements of the Incidence Graph and Vertex List Graph concepts from the Boost Graph Library. This structure of this graph will become the topology of the communicator that is returned.</para></description></parameter><parameter name="rank"><paramtype>RankMap</paramtype><description><para>This map translates vertices in the <computeroutput>graph</computeroutput> into ranks within the current communicator. It must be a Readable Property Map (see the Boost Property Map library) whose key type is the vertex type of the <computeroutput>graph</computeroutput> and whose value type is <computeroutput>int</computeroutput>.</para></description></parameter><parameter name="reorder"><paramtype>bool</paramtype><default>false</default><description><para>Whether MPI is permitted to re-order the process ranks within the returned communicator, to better optimize communication. If false, the ranks of each process in the returned process will match precisely the rank of that process within the original communicator. </para></description></parameter><description><para>Create a new communicator whose topology is described by the given graph. The rank map (<computeroutput>rank</computeroutput>) gives the mapping from vertices in the graph to ranks within the communicator. There may be fewer vertices in the graph than there are processes in the communicator; in this case, the resulting communicator will be a NULL communicator.</para><para> 1347</para></description></constructor> 1348<method-group name="protected member functions"> 1349</method-group> 1350</class> 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410<function name="source"><type>int</type><parameter name="edge"><paramtype>const std::pair< int, int > &</paramtype></parameter><parameter name=""><paramtype>const <classname>graph_communicator</classname> &</paramtype></parameter><purpose>Returns the source vertex from an edge in the graph topology of a communicator. </purpose></function> 1411<function name="target"><type>int</type><parameter name="edge"><paramtype>const std::pair< int, int > &</paramtype></parameter><parameter name=""><paramtype>const <classname>graph_communicator</classname> &</paramtype></parameter><purpose>Returns the target vertex from an edge in the graph topology of a communicator. </purpose></function> 1412<function name="out_edges"><type><emphasis>unspecified</emphasis></type><parameter name="vertex"><paramtype>int</paramtype></parameter><parameter name="comm"><paramtype>const <classname>graph_communicator</classname> &</paramtype></parameter><purpose>Returns an iterator range containing all of the edges outgoing from the given vertex in a graph topology of a communicator. </purpose></function> 1413<function name="out_degree"><type>int</type><parameter name="vertex"><paramtype>int</paramtype></parameter><parameter name="comm"><paramtype>const <classname>graph_communicator</classname> &</paramtype></parameter><purpose>Returns the out-degree of a vertex in the graph topology of a communicator. </purpose></function> 1414<function name="adjacent_vertices"><type><emphasis>unspecified</emphasis></type><parameter name="vertex"><paramtype>int</paramtype></parameter><parameter name="comm"><paramtype>const <classname>graph_communicator</classname> &</paramtype></parameter><purpose>Returns an iterator range containing all of the neighbors of the given vertex in the communicator's graph topology. </purpose></function> 1415<function name="vertices"><type>std::pair< counting_iterator< int >, counting_iterator< int > ></type><parameter name="comm"><paramtype>const <classname>graph_communicator</classname> &</paramtype></parameter><purpose>Returns an iterator range that contains all of the vertices with the communicator's graph topology, i.e., all of the process ranks in the communicator. </purpose></function> 1416<function name="num_vertices"><type>int</type><parameter name="comm"><paramtype>const <classname>graph_communicator</classname> &</paramtype></parameter><purpose>Returns the number of vertices within the graph topology of the communicator, i.e., the number of processes in the communicator. </purpose></function> 1417<function name="edges"><type><emphasis>unspecified</emphasis></type><parameter name="comm"><paramtype>const <classname>graph_communicator</classname> &</paramtype></parameter><purpose>Returns an iterator range that contains all of the edges with the communicator's graph topology. </purpose></function> 1418<function name="num_edges"><type>int</type><parameter name="comm"><paramtype>const <classname>graph_communicator</classname> &</paramtype></parameter><purpose>Returns the number of edges in the communicator's graph topology. </purpose></function> 1419<function name="get"><type>identity_property_map</type><parameter name=""><paramtype>vertex_index_t</paramtype></parameter><parameter name=""><paramtype>const <classname>graph_communicator</classname> &</paramtype></parameter><purpose>Returns a property map that maps from vertices in a communicator's graph topology to their index values. </purpose><description><para>Since the vertices are ranks in the communicator, the returned property map is the identity property map. </para></description></function> 1420<function name="get"><type>int</type><parameter name=""><paramtype>vertex_index_t</paramtype></parameter><parameter name=""><paramtype>const <classname>graph_communicator</classname> &</paramtype></parameter><parameter name="vertex"><paramtype>int</paramtype></parameter><purpose>Returns the index of a vertex in the communicator's graph topology. </purpose><description><para>Since the vertices are ranks in the communicator, this is the identity function. </para></description></function> 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440</namespace> 1441</namespace> 1442</header> 1443<header name="boost/mpi/group.hpp"> 1444<para>This header defines the <computeroutput>group</computeroutput> class, which allows one to manipulate and query groups of processes. </para><namespace name="boost"> 1445<namespace name="mpi"> 1446<class name="group"><purpose>A <computeroutput>group</computeroutput> is a representation of a subset of the processes within a <computeroutput>communicator</computeroutput>. </purpose><description><para>The <computeroutput>group</computeroutput> class allows one to create arbitrary subsets of the processes within a communicator. One can compute the union, intersection, or difference of two groups, or create new groups by specifically including or excluding certain processes. Given a group, one can create a new communicator containing only the processes in that group. </para></description><method-group name="public member functions"> 1447<method name="rank" cv="const"><type>optional< int ></type><purpose>Determine the rank of the calling process in the group. </purpose><description><para>This routine is equivalent to <computeroutput>MPI_Group_rank</computeroutput>.</para><para> 1448</para></description><returns><para>The rank of the calling process in the group, which will be a value in [0, size()). If the calling process is not in the group, returns an empty value. </para> 1449</returns></method> 1450<method name="size" cv="const"><type>int</type><purpose>Determine the number of processes in the group. </purpose><description><para>This routine is equivalent to <computeroutput>MPI_Group_size</computeroutput>.</para><para> 1451</para></description><returns><para>The number of processes in the group. </para> 1452</returns></method> 1453<method name="translate_ranks"><type>OutputIterator</type><template> 1454 <template-type-parameter name="InputIterator"/> 1455 <template-type-parameter name="OutputIterator"/> 1456 </template><parameter name="first"><paramtype>InputIterator</paramtype><description><para>Beginning of the iterator range of ranks in the current group.</para></description></parameter><parameter name="last"><paramtype>InputIterator</paramtype><description><para>Past the end of the iterator range of ranks in the current group.</para></description></parameter><parameter name="to_group"><paramtype>const <classname>group</classname> &</paramtype><description><para>The group that we are translating ranks to.</para></description></parameter><parameter name="out"><paramtype>OutputIterator</paramtype><description><para>The output iterator to which the translated ranks will be written.</para></description></parameter><purpose>Translates the ranks from one group into the ranks of the same processes in another group. </purpose><description><para>This routine translates each of the integer rank values in the iterator range <computeroutput/>[first, last) from the current group into rank values of the corresponding processes in <computeroutput>to_group</computeroutput>. The corresponding rank values are written via the output iterator <computeroutput>out</computeroutput>. When there is no correspondence between a rank in the current group and a rank in <computeroutput>to_group</computeroutput>, the value <computeroutput>MPI_UNDEFINED</computeroutput> is written to the output iterator.</para><para> 1457 1458</para></description><returns><para>the output iterator, which points one step past the last rank written. </para> 1459</returns></method> 1460<method name="conversion-operator" cv="const"><type>bool</type><purpose>Determines whether the group is non-empty. </purpose><description><para> 1461</para></description><returns><para>True if the group is not empty, false if it is empty. </para> 1462</returns></method> 1463<method name="conversion-operator" cv="const"><type>MPI_Group</type><purpose>Retrieves the underlying <computeroutput>MPI_Group</computeroutput> associated with this group. </purpose><description><para> 1464</para></description><returns><para>The <computeroutput>MPI_Group</computeroutput> handle manipulated by this object. If this object represents the empty group, returns <computeroutput>MPI_GROUP_EMPTY</computeroutput>. </para> 1465</returns></method> 1466<method name="include"><type><classname>group</classname></type><template> 1467 <template-type-parameter name="InputIterator"/> 1468 </template><parameter name="first"><paramtype>InputIterator</paramtype></parameter><parameter name="last"><paramtype>InputIterator</paramtype></parameter><purpose>Creates a new group including a subset of the processes in the current group. </purpose><description><para>This routine creates a new <computeroutput>group</computeroutput> which includes only those processes in the current group that are listed in the integer iterator range <computeroutput/>[first, last). Equivalent to <computeroutput>MPI_Group_incl</computeroutput>.</para><para><computeroutput>first</computeroutput> The beginning of the iterator range of ranks to include.</para><para><computeroutput>last</computeroutput> Past the end of the iterator range of ranks to include.</para><para> 1469</para></description><returns><para>A new group containing those processes with ranks <computeroutput/>[first, last) in the current group. </para> 1470</returns></method> 1471<method name="exclude"><type><classname>group</classname></type><template> 1472 <template-type-parameter name="InputIterator"/> 1473 </template><parameter name="first"><paramtype>InputIterator</paramtype></parameter><parameter name="last"><paramtype>InputIterator</paramtype></parameter><purpose>Creates a new group from all of the processes in the current group, exluding a specific subset of the processes. </purpose><description><para>This routine creates a new <computeroutput>group</computeroutput> which includes all of the processes in the current group except those whose ranks are listed in the integer iterator range <computeroutput/>[first, last). Equivalent to <computeroutput>MPI_Group_excl</computeroutput>.</para><para><computeroutput>first</computeroutput> The beginning of the iterator range of ranks to exclude.</para><para><computeroutput>last</computeroutput> Past the end of the iterator range of ranks to exclude.</para><para> 1474</para></description><returns><para>A new group containing all of the processes in the current group except those processes with ranks <computeroutput/>[first, last) in the current group. </para> 1475</returns></method> 1476</method-group> 1477<constructor><purpose>Constructs an empty group. </purpose></constructor> 1478<constructor><parameter name="in_group"><paramtype>const MPI_Group &</paramtype><description><para>The <computeroutput>MPI_Group</computeroutput> used to construct this <computeroutput>group</computeroutput>.</para></description></parameter><parameter name="adopt"><paramtype>bool</paramtype><description><para>Whether the <computeroutput>group</computeroutput> should adopt the <computeroutput>MPI_Group</computeroutput>. When true, the <computeroutput>group</computeroutput> object (or one of its copies) will free the group (via <computeroutput>MPI_Comm_free</computeroutput>) when the last copy is destroyed. Otherwise, the user is responsible for calling <computeroutput>MPI_Group_free</computeroutput>. </para></description></parameter><purpose>Constructs a group from an <computeroutput>MPI_Group</computeroutput>. </purpose><description><para>This routine allows one to construct a Boost.MPI <computeroutput>group</computeroutput> from a C <computeroutput>MPI_Group</computeroutput>. The <computeroutput>group</computeroutput> object can (optionally) adopt the <computeroutput>MPI_Group</computeroutput>, after which point the <computeroutput>group</computeroutput> object becomes responsible for freeing the <computeroutput>MPI_Group</computeroutput> when the last copy of <computeroutput>group</computeroutput> disappears.</para><para> 1479</para></description></constructor> 1480</class> 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551<function name="operator=="><type>BOOST_MPI_DECL bool</type><parameter name="g1"><paramtype>const <classname>group</classname> &</paramtype></parameter><parameter name="g2"><paramtype>const <classname>group</classname> &</paramtype></parameter><purpose>Determines whether two process groups are identical. </purpose><description><para>Equivalent to calling <computeroutput>MPI_Group_compare</computeroutput> and checking whether the result is <computeroutput>MPI_IDENT</computeroutput>.</para><para> 1552</para></description><returns><para>True when the two process groups contain the same processes in the same order. </para> 1553</returns></function> 1554<function name="operator!="><type>bool</type><parameter name="g1"><paramtype>const <classname>group</classname> &</paramtype></parameter><parameter name="g2"><paramtype>const <classname>group</classname> &</paramtype></parameter><purpose>Determines whether two process groups are not identical. </purpose><description><para>Equivalent to calling <computeroutput>MPI_Group_compare</computeroutput> and checking whether the result is not <computeroutput>MPI_IDENT</computeroutput>.</para><para> 1555</para></description><returns><para>False when the two process groups contain the same processes in the same order. </para> 1556</returns></function> 1557<function name="operator|"><type>BOOST_MPI_DECL <classname>group</classname></type><parameter name="g1"><paramtype>const <classname>group</classname> &</paramtype></parameter><parameter name="g2"><paramtype>const <classname>group</classname> &</paramtype></parameter><purpose>Computes the union of two process groups. </purpose><description><para>This routine returns a new <computeroutput>group</computeroutput> that contains all processes that are either in group <computeroutput>g1</computeroutput> or in group <computeroutput>g2</computeroutput> (or both). The processes that are in <computeroutput>g1</computeroutput> will be first in the resulting group, followed by the processes from <computeroutput>g2</computeroutput> (but not also in <computeroutput>g1</computeroutput>). Equivalent to <computeroutput>MPI_Group_union</computeroutput>. </para></description></function> 1558<function name="operator&"><type>BOOST_MPI_DECL <classname>group</classname></type><parameter name="g1"><paramtype>const <classname>group</classname> &</paramtype></parameter><parameter name="g2"><paramtype>const <classname>group</classname> &</paramtype></parameter><purpose>Computes the intersection of two process groups. </purpose><description><para>This routine returns a new <computeroutput>group</computeroutput> that contains all processes that are in group <computeroutput>g1</computeroutput> and in group <computeroutput>g2</computeroutput>, ordered in the same way as <computeroutput>g1</computeroutput>. Equivalent to <computeroutput>MPI_Group_intersection</computeroutput>. </para></description></function> 1559<function name="operator-"><type>BOOST_MPI_DECL <classname>group</classname></type><parameter name="g1"><paramtype>const <classname>group</classname> &</paramtype></parameter><parameter name="g2"><paramtype>const <classname>group</classname> &</paramtype></parameter><purpose>Computes the difference between two process groups. </purpose><description><para>This routine returns a new <computeroutput>group</computeroutput> that contains all processes that are in group <computeroutput>g1</computeroutput> but not in group <computeroutput>g2</computeroutput>, ordered in the same way as <computeroutput>g1</computeroutput>. Equivalent to <computeroutput>MPI_Group_difference</computeroutput>. </para></description></function> 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574</namespace> 1575</namespace> 1576</header> 1577<header name="boost/mpi/inplace.hpp"> 1578<para>This header provides helpers to indicate to MPI collective operation that a buffer can be use both as an input and output. </para><namespace name="boost"> 1579<namespace name="mpi"> 1580<struct name="inplace_t"><template> 1581 <template-type-parameter name="T"/> 1582 </template><purpose>Wrapper type to explicitly indicate that a input data can be overriden with an output value. </purpose><data-member name="buffer"><type>T &</type></data-member> 1583<method-group name="public member functions"> 1584</method-group> 1585<constructor><parameter name="inout"><paramtype>T &</paramtype></parameter></constructor> 1586</struct><struct-specialization name="inplace_t"><template> 1587 <template-type-parameter name="T"/> 1588 </template><specialization><template-arg>T *</template-arg></specialization><data-member name="buffer"><type>T *</type></data-member> 1589<method-group name="public member functions"> 1590</method-group> 1591<constructor><parameter name="inout"><paramtype>T *</paramtype></parameter></constructor> 1592</struct-specialization> 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680<overloaded-function name="inplace"><signature><type><classname>inplace_t</classname>< T ></type><template> 1681 <template-type-parameter name="T"/> 1682 </template><parameter name="inout"><paramtype>T &</paramtype><description><para>the contributing input value, it will be overriden with the output value where one is expected. If it is a pointer, the number of elements will be provided separatly. </para></description></parameter></signature><signature><type><classname>inplace_t</classname>< T * ></type><template> 1683 <template-type-parameter name="T"/> 1684 </template><parameter name="inout"><paramtype>T *</paramtype></parameter></signature><purpose>Wrapp a input data to indicate that it can be overriden with an ouput value. </purpose><description><para> 1685 1686</para></description><returns><para>The wrapped value or pointer. </para> 1687</returns></overloaded-function> 1688 1689</namespace> 1690</namespace> 1691</header> 1692<header name="boost/mpi/intercommunicator.hpp"> 1693<para>This header defines the <computeroutput>intercommunicator</computeroutput> class, which permits communication between different process groups. </para><namespace name="boost"> 1694<namespace name="mpi"> 1695<class name="intercommunicator"><inherit access="public">boost::mpi::communicator</inherit><purpose>Communication facilities among processes in different groups. </purpose><description><para>The <computeroutput>intercommunicator</computeroutput> class provides communication facilities among processes from different groups. An intercommunicator is always associated with two process groups: one "local" process group, containing the process that initiates an MPI operation (e.g., the sender in a <computeroutput>send</computeroutput> operation), and one "remote" process group, containing the process that is the target of the MPI operation.</para><para>While intercommunicators have essentially the same point-to-point operations as intracommunicators (the latter communicate only within a single process group), all communication with intercommunicators occurs between the processes in the local group and the processes in the remote group; communication within a group must use a different (intra-)communicator. </para></description><method-group name="public member functions"> 1696<method name="local_size" cv="const"><type>int</type><description><para>Returns the size of the local group, i.e., the number of local processes that are part of the group. </para></description></method> 1697<method name="local_group" cv="const"><type><classname>boost::mpi::group</classname></type><description><para>Returns the local group, containing all of the local processes in this intercommunicator. </para></description></method> 1698<method name="local_rank" cv="const"><type>int</type><description><para>Returns the rank of this process within the local group. </para></description></method> 1699<method name="remote_size" cv="const"><type>int</type><description><para>Returns the size of the remote group, i.e., the number of processes that are part of the remote group. </para></description></method> 1700<method name="remote_group" cv="const"><type><classname>boost::mpi::group</classname></type><description><para>Returns the remote group, containing all of the remote processes in this intercommunicator. </para></description></method> 1701<method name="merge" cv="const"><type><classname>communicator</classname></type><parameter name="high"><paramtype>bool</paramtype><description><para>Whether the processes in this group should have the higher rank numbers than the processes in the other group. Each of the processes within a particular group shall have the same "high" value.</para></description></parameter><description><para>Merge the local and remote groups in this intercommunicator into a new intracommunicator containing the union of the processes in both groups. This method is equivalent to <computeroutput>MPI_Intercomm_merge</computeroutput>.</para><para> 1702 1703</para></description><returns><para>the new, merged intracommunicator </para> 1704</returns></method> 1705</method-group> 1706<constructor><parameter name="comm"><paramtype>const MPI_Comm &</paramtype></parameter><parameter name="kind"><paramtype>comm_create_kind</paramtype></parameter><description><para>Build a new Boost.MPI intercommunicator based on the MPI intercommunicator <computeroutput>comm</computeroutput>.</para><para><computeroutput>comm</computeroutput> may be any valid MPI intercommunicator. If <computeroutput>comm</computeroutput> is MPI_COMM_NULL, an empty communicator (that cannot be used for communication) is created and the <computeroutput>kind</computeroutput> parameter is ignored. Otherwise, the <computeroutput>kind</computeroutput> parameter determines how the Boost.MPI communicator will be related to <computeroutput>comm:</computeroutput> </para><para><itemizedlist> 1707<listitem><para>If <computeroutput>kind</computeroutput> is <computeroutput>comm_duplicate</computeroutput>, duplicate <computeroutput>comm</computeroutput> to create a new communicator. This new communicator will be freed when the Boost.MPI communicator (and all copies of it) is destroyed. This option is only permitted if the underlying MPI implementation supports MPI 2.0; duplication of intercommunicators is not available in MPI 1.x.</para> 1708</listitem><listitem><para>If <computeroutput>kind</computeroutput> is <computeroutput>comm_take_ownership</computeroutput>, take ownership of <computeroutput>comm</computeroutput>. It will be freed automatically when all of the Boost.MPI communicators go out of scope.</para> 1709</listitem><listitem><para>If <computeroutput>kind</computeroutput> is <computeroutput>comm_attach</computeroutput>, this Boost.MPI communicator will reference the existing MPI communicator <computeroutput>comm</computeroutput> but will not free <computeroutput>comm</computeroutput> when the Boost.MPI communicator goes out of scope. This option should only be used when the communicator is managed by the user. </para> 1710</listitem></itemizedlist> 1711</para></description></constructor> 1712<constructor><parameter name="local"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The intracommunicator containing all of the processes that will go into the local group.</para></description></parameter><parameter name="local_leader"><paramtype>int</paramtype><description><para>The rank within the <computeroutput>local</computeroutput> intracommunicator that will serve as its leader.</para></description></parameter><parameter name="peer"><paramtype>const <classname>communicator</classname> &</paramtype><description><para>The intracommunicator containing all of the processes that will go into the remote group.</para></description></parameter><parameter name="remote_leader"><paramtype>int</paramtype><description><para>The rank within the <computeroutput>peer</computeroutput> group that will serve as its leader. </para></description></parameter><description><para>Constructs a new intercommunicator whose local group is <computeroutput>local</computeroutput> and whose remote group is <computeroutput>peer</computeroutput>. The intercommunicator can then be used to communicate between processes in the two groups. This constructor is equivalent to a call to <computeroutput>MPI_Intercomm_create</computeroutput>.</para><para> 1713</para></description></constructor> 1714</class> 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804</namespace> 1805</namespace> 1806</header> 1807<header name="boost/mpi/nonblocking.hpp"> 1808<para>This header defines operations for completing non-blocking communication requests. </para><namespace name="boost"> 1809<namespace name="mpi"> 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886<function name="wait_any"><type>std::pair< <classname>status</classname>, ForwardIterator ></type><template> 1887 <template-type-parameter name="ForwardIterator"/> 1888 </template><parameter name="first"><paramtype>ForwardIterator</paramtype><description><para>The iterator that denotes the beginning of the sequence of request objects.</para></description></parameter><parameter name="last"><paramtype>ForwardIterator</paramtype><description><para>The iterator that denotes the end of the sequence of request objects. This may not be equal to <computeroutput>first</computeroutput>.</para></description></parameter><purpose>Wait until any non-blocking request has completed. </purpose><description><para>This routine takes in a set of requests stored in the iterator range <computeroutput/>[first,last) and waits until any of these requests has been completed. It provides functionality equivalent to <computeroutput>MPI_Waitany</computeroutput>.</para><para> 1889 1890</para></description><returns><para>A pair containing the status object that corresponds to the completed operation and the iterator referencing the completed request. </para> 1891</returns></function> 1892<function name="test_any"><type>optional< std::pair< <classname>status</classname>, ForwardIterator > ></type><template> 1893 <template-type-parameter name="ForwardIterator"/> 1894 </template><parameter name="first"><paramtype>ForwardIterator</paramtype><description><para>The iterator that denotes the beginning of the sequence of request objects.</para></description></parameter><parameter name="last"><paramtype>ForwardIterator</paramtype><description><para>The iterator that denotes the end of the sequence of request objects.</para></description></parameter><purpose>Test whether any non-blocking request has completed. </purpose><description><para>This routine takes in a set of requests stored in the iterator range <computeroutput/>[first,last) and tests whether any of these requests has been completed. This routine is similar to <computeroutput>wait_any</computeroutput>, but will not block waiting for requests to completed. It provides functionality equivalent to <computeroutput>MPI_Testany</computeroutput>.</para><para> 1895 1896</para></description><returns><para>If any outstanding requests have completed, a pair containing the status object that corresponds to the completed operation and the iterator referencing the completed request. Otherwise, an empty <computeroutput>optional<></computeroutput>. </para> 1897</returns></function> 1898<overloaded-function name="wait_all"><signature><type>OutputIterator</type><template> 1899 <template-type-parameter name="ForwardIterator"/> 1900 <template-type-parameter name="OutputIterator"/> 1901 </template><parameter name="first"><paramtype>ForwardIterator</paramtype><description><para>The iterator that denotes the beginning of the sequence of request objects.</para></description></parameter><parameter name="last"><paramtype>ForwardIterator</paramtype><description><para>The iterator that denotes the end of the sequence of request objects.</para></description></parameter><parameter name="out"><paramtype>OutputIterator</paramtype><description><para>If provided, an output iterator through which the status of each request will be emitted. The <computeroutput>status</computeroutput> objects are emitted in the same order as the requests are retrieved from <computeroutput/>[first,last).</para></description></parameter></signature><signature><type>void</type><template> 1902 <template-type-parameter name="ForwardIterator"/> 1903 </template><parameter name="first"><paramtype>ForwardIterator</paramtype></parameter><parameter name="last"><paramtype>ForwardIterator</paramtype></parameter></signature><purpose>Wait until all non-blocking requests have completed. </purpose><description><para>This routine takes in a set of requests stored in the iterator range <computeroutput/>[first,last) and waits until all of these requests have been completed. It provides functionality equivalent to <computeroutput>MPI_Waitall</computeroutput>.</para><para> 1904 1905</para></description><returns><para>If an <computeroutput>out</computeroutput> parameter was provided, the value <computeroutput>out</computeroutput> after all of the <computeroutput>status</computeroutput> objects have been emitted. </para> 1906</returns></overloaded-function> 1907 1908<overloaded-function name="test_all"><signature><type>optional< OutputIterator ></type><template> 1909 <template-type-parameter name="ForwardIterator"/> 1910 <template-type-parameter name="OutputIterator"/> 1911 </template><parameter name="first"><paramtype>ForwardIterator</paramtype><description><para>The iterator that denotes the beginning of the sequence of request objects.</para></description></parameter><parameter name="last"><paramtype>ForwardIterator</paramtype><description><para>The iterator that denotes the end of the sequence of request objects.</para></description></parameter><parameter name="out"><paramtype>OutputIterator</paramtype><description><para>If provided and all requests hav been completed, an output iterator through which the status of each request will be emitted. The <computeroutput>status</computeroutput> objects are emitted in the same order as the requests are retrieved from <computeroutput/>[first,last).</para></description></parameter></signature><signature><type>bool</type><template> 1912 <template-type-parameter name="ForwardIterator"/> 1913 </template><parameter name="first"><paramtype>ForwardIterator</paramtype></parameter><parameter name="last"><paramtype>ForwardIterator</paramtype></parameter></signature><purpose>Tests whether all non-blocking requests have completed. </purpose><description><para>This routine takes in a set of requests stored in the iterator range <computeroutput/>[first,last) and determines whether all of these requests have been completed. However, due to limitations of the underlying MPI implementation, if any of the requests refers to a non-blocking send or receive of a serialized data type, <computeroutput>test_all</computeroutput> will always return the equivalent of <computeroutput>false</computeroutput> (i.e., the requests cannot all be finished at this time). This routine performs the same functionality as <computeroutput>wait_all</computeroutput>, except that this routine will not block. This routine provides functionality equivalent to <computeroutput>MPI_Testall</computeroutput>.</para><para> 1914 1915</para></description><returns><para>If an <computeroutput>out</computeroutput> parameter was provided, the value <computeroutput>out</computeroutput> after all of the <computeroutput>status</computeroutput> objects have been emitted (if all requests were completed) or an empty <computeroutput>optional<></computeroutput>. If no <computeroutput>out</computeroutput> parameter was provided, returns <computeroutput>true</computeroutput> if all requests have completed or <computeroutput>false</computeroutput> otherwise. </para> 1916</returns></overloaded-function> 1917 1918<overloaded-function name="wait_some"><signature><type>std::pair< OutputIterator, BidirectionalIterator ></type><template> 1919 <template-type-parameter name="BidirectionalIterator"/> 1920 <template-type-parameter name="OutputIterator"/> 1921 </template><parameter name="first"><paramtype>BidirectionalIterator</paramtype><description><para>The iterator that denotes the beginning of the sequence of request objects.</para></description></parameter><parameter name="last"><paramtype>BidirectionalIterator</paramtype><description><para>The iterator that denotes the end of the sequence of request objects. This may not be equal to <computeroutput>first</computeroutput>.</para></description></parameter><parameter name="out"><paramtype>OutputIterator</paramtype><description><para>If provided, the <computeroutput>status</computeroutput> objects corresponding to completed requests will be emitted through this output iterator.</para></description></parameter></signature><signature><type>BidirectionalIterator</type><template> 1922 <template-type-parameter name="BidirectionalIterator"/> 1923 </template><parameter name="first"><paramtype>BidirectionalIterator</paramtype></parameter><parameter name="last"><paramtype>BidirectionalIterator</paramtype></parameter></signature><purpose>Wait until some non-blocking requests have completed. </purpose><description><para>This routine takes in a set of requests stored in the iterator range <computeroutput/>[first,last) and waits until at least one of the requests has completed. It then completes all of the requests it can, partitioning the input sequence into pending requests followed by completed requests. If an output iterator is provided, <computeroutput>status</computeroutput> objects will be emitted for each of the completed requests. This routine provides functionality equivalent to <computeroutput>MPI_Waitsome</computeroutput>.</para><para> 1924 1925</para></description><returns><para>If the <computeroutput>out</computeroutput> parameter was provided, a pair containing the output iterator <computeroutput>out</computeroutput> after all of the <computeroutput>status</computeroutput> objects have been written through it and an iterator referencing the first completed request. If no <computeroutput>out</computeroutput> parameter was provided, only the iterator referencing the first completed request will be emitted. </para> 1926</returns></overloaded-function> 1927 1928<overloaded-function name="test_some"><signature><type>std::pair< OutputIterator, BidirectionalIterator ></type><template> 1929 <template-type-parameter name="BidirectionalIterator"/> 1930 <template-type-parameter name="OutputIterator"/> 1931 </template><parameter name="first"><paramtype>BidirectionalIterator</paramtype><description><para>The iterator that denotes the beginning of the sequence of request objects.</para></description></parameter><parameter name="last"><paramtype>BidirectionalIterator</paramtype><description><para>The iterator that denotes the end of the sequence of request objects. This may not be equal to <computeroutput>first</computeroutput>.</para></description></parameter><parameter name="out"><paramtype>OutputIterator</paramtype><description><para>If provided, the <computeroutput>status</computeroutput> objects corresponding to completed requests will be emitted through this output iterator.</para></description></parameter></signature><signature><type>BidirectionalIterator</type><template> 1932 <template-type-parameter name="BidirectionalIterator"/> 1933 </template><parameter name="first"><paramtype>BidirectionalIterator</paramtype></parameter><parameter name="last"><paramtype>BidirectionalIterator</paramtype></parameter></signature><purpose>Test whether some non-blocking requests have completed. </purpose><description><para>This routine takes in a set of requests stored in the iterator range <computeroutput/>[first,last) and tests to see if any of the requests has completed. It completes all of the requests it can, partitioning the input sequence into pending requests followed by completed requests. If an output iterator is provided, <computeroutput>status</computeroutput> objects will be emitted for each of the completed requests. This routine is similar to <computeroutput>wait_some</computeroutput>, but does not wait until any requests have completed. This routine provides functionality equivalent to <computeroutput>MPI_Testsome</computeroutput>.</para><para> 1934 1935</para></description><returns><para>If the <computeroutput>out</computeroutput> parameter was provided, a pair containing the output iterator <computeroutput>out</computeroutput> after all of the <computeroutput>status</computeroutput> objects have been written through it and an iterator referencing the first completed request. If no <computeroutput>out</computeroutput> parameter was provided, only the iterator referencing the first completed request will be emitted. </para> 1936</returns></overloaded-function> 1937 1938 1939 1940 1941 1942</namespace> 1943</namespace> 1944</header> 1945<header name="boost/mpi/operations.hpp"> 1946<para>This header provides a mapping from function objects to <computeroutput>MPI_Op</computeroutput> constants used in MPI collective operations. It also provides several new function object types not present in the standard <computeroutput/> <functional> header that have direct mappings to <computeroutput>MPI_Op</computeroutput>. </para><namespace name="boost"> 1947<namespace name="mpi"> 1948<struct name="bitwise_and"><template> 1949 <template-type-parameter name="T"/> 1950 </template><purpose>Compute the bitwise AND of two integral values. </purpose><description><para>This binary function object computes the bitwise AND of the two values it is given. When used with MPI and a type <computeroutput>T</computeroutput> that has an associated, built-in MPI data type, translates to <computeroutput>MPI_BAND</computeroutput>. </para></description><typedef name="first_argument_type"><type>T</type></typedef> 1951<typedef name="second_argument_type"><type>T</type></typedef> 1952<typedef name="result_type"><type>T</type></typedef> 1953<method-group name="public member functions"> 1954<method name="operator()" cv="const"><type>T</type><parameter name="x"><paramtype>const T &</paramtype></parameter><parameter name="y"><paramtype>const T &</paramtype></parameter><description><para> 1955</para></description><returns><para><computeroutput>x</computeroutput> & y. </para> 1956</returns></method> 1957</method-group> 1958</struct><struct name="bitwise_or"><template> 1959 <template-type-parameter name="T"/> 1960 </template><purpose>Compute the bitwise OR of two integral values. </purpose><description><para>This binary function object computes the bitwise OR of the two values it is given. When used with MPI and a type <computeroutput>T</computeroutput> that has an associated, built-in MPI data type, translates to <computeroutput>MPI_BOR</computeroutput>. </para></description><typedef name="first_argument_type"><type>T</type></typedef> 1961<typedef name="second_argument_type"><type>T</type></typedef> 1962<typedef name="result_type"><type>T</type></typedef> 1963<method-group name="public member functions"> 1964<method name="operator()" cv="const"><type>T</type><parameter name="x"><paramtype>const T &</paramtype></parameter><parameter name="y"><paramtype>const T &</paramtype></parameter><description><para> 1965</para></description><returns><para>the <computeroutput>x</computeroutput> | y. </para> 1966</returns></method> 1967</method-group> 1968</struct><struct name="bitwise_xor"><template> 1969 <template-type-parameter name="T"/> 1970 </template><purpose>Compute the bitwise exclusive OR of two integral values. </purpose><description><para>This binary function object computes the bitwise exclusive OR of the two values it is given. When used with MPI and a type <computeroutput>T</computeroutput> that has an associated, built-in MPI data type, translates to <computeroutput>MPI_BXOR</computeroutput>. </para></description><typedef name="first_argument_type"><type>T</type></typedef> 1971<typedef name="second_argument_type"><type>T</type></typedef> 1972<typedef name="result_type"><type>T</type></typedef> 1973<method-group name="public member functions"> 1974<method name="operator()" cv="const"><type>T</type><parameter name="x"><paramtype>const T &</paramtype></parameter><parameter name="y"><paramtype>const T &</paramtype></parameter><description><para> 1975</para></description><returns><para><computeroutput>x</computeroutput> ^ y. </para> 1976</returns></method> 1977</method-group> 1978</struct><struct name="is_commutative"><template> 1979 <template-type-parameter name="Op"/> 1980 <template-type-parameter name="T"/> 1981 </template><inherit access="public">false_</inherit><purpose>Determine if a function object type is commutative. </purpose><description><para>This trait determines if an operation <computeroutput>Op</computeroutput> is commutative when applied to values of type <computeroutput>T</computeroutput>. Parallel operations such as <computeroutput>reduce</computeroutput> and <computeroutput>prefix_sum</computeroutput> can be implemented more efficiently with commutative operations. To mark an operation as commutative, users should specialize <computeroutput><classname alt="boost::mpi::is_commutative">is_commutative</classname></computeroutput> and derive from the class <computeroutput>mpl::true_</computeroutput>. </para></description></struct><struct name="is_mpi_op"><template> 1982 <template-type-parameter name="Op"/> 1983 <template-type-parameter name="T"/> 1984 </template><inherit access="public">false_</inherit><purpose>Determine if a function object has an associated <computeroutput>MPI_Op</computeroutput>. </purpose><description><para>This trait determines if a function object type <computeroutput>Op</computeroutput>, when used with argument type <computeroutput>T</computeroutput>, has an associated <computeroutput>MPI_Op</computeroutput>. If so, <computeroutput>is_mpi_op<Op,T></computeroutput> will derive from <computeroutput>mpl::false_</computeroutput> and will contain a static member function <computeroutput>op</computeroutput> that takes no arguments but returns the associated <computeroutput>MPI_Op</computeroutput> value. For instance, <computeroutput><classname alt="boost::mpi::is_mpi_op">is_mpi_op</classname><std::plus<int></computeroutput>,int>::op() returns <computeroutput>MPI_SUM</computeroutput>.</para><para>Users may specialize <computeroutput><classname alt="boost::mpi::is_mpi_op">is_mpi_op</classname></computeroutput> for any other class templates that map onto operations that have <computeroutput>MPI_Op</computeroutput> equivalences, such as bitwise OR, logical and, or maximum. However, users are encouraged to use the standard function objects in the <computeroutput>functional</computeroutput> and <computeroutput>boost/mpi/operations.hpp</computeroutput> headers whenever possible. For function objects that are class templates with a single template parameter, it may be easier to specialize <computeroutput>is_builtin_mpi_op</computeroutput>. </para></description></struct><struct name="logical_xor"><template> 1985 <template-type-parameter name="T"/> 1986 </template><purpose>Compute the logical exclusive OR of two integral values. </purpose><description><para>This binary function object computes the logical exclusive of the two values it is given. When used with MPI and a type <computeroutput>T</computeroutput> that has an associated, built-in MPI data type, translates to <computeroutput>MPI_LXOR</computeroutput>. </para></description><typedef name="first_argument_type"><type>T</type></typedef> 1987<typedef name="second_argument_type"><type>T</type></typedef> 1988<typedef name="result_type"><type>T</type></typedef> 1989<method-group name="public member functions"> 1990<method name="operator()" cv="const"><type>T</type><parameter name="x"><paramtype>const T &</paramtype></parameter><parameter name="y"><paramtype>const T &</paramtype></parameter><description><para> 1991</para></description><returns><para>the logical exclusive OR of x and y. </para> 1992</returns></method> 1993</method-group> 1994</struct><struct name="maximum"><template> 1995 <template-type-parameter name="T"/> 1996 </template><purpose>Compute the maximum of two values. </purpose><description><para>This binary function object computes the maximum of the two values it is given. When used with MPI and a type <computeroutput>T</computeroutput> that has an associated, built-in MPI data type, translates to <computeroutput>MPI_MAX</computeroutput>. </para></description><typedef name="first_argument_type"><type>T</type></typedef> 1997<typedef name="second_argument_type"><type>T</type></typedef> 1998<typedef name="result_type"><type>T</type></typedef> 1999<method-group name="public member functions"> 2000<method name="operator()" cv="const"><type>const T &</type><parameter name="x"><paramtype>const T &</paramtype></parameter><parameter name="y"><paramtype>const T &</paramtype></parameter><description><para> 2001</para></description><returns><para>the maximum of x and y. </para> 2002</returns></method> 2003</method-group> 2004</struct><struct name="minimum"><template> 2005 <template-type-parameter name="T"/> 2006 </template><purpose>Compute the minimum of two values. </purpose><description><para>This binary function object computes the minimum of the two values it is given. When used with MPI and a type <computeroutput>T</computeroutput> that has an associated, built-in MPI data type, translates to <computeroutput>MPI_MIN</computeroutput>. </para></description><typedef name="first_argument_type"><type>T</type></typedef> 2007<typedef name="second_argument_type"><type>T</type></typedef> 2008<typedef name="result_type"><type>T</type></typedef> 2009<method-group name="public member functions"> 2010<method name="operator()" cv="const"><type>const T &</type><parameter name="x"><paramtype>const T &</paramtype></parameter><parameter name="y"><paramtype>const T &</paramtype></parameter><description><para> 2011</para></description><returns><para>the minimum of x and y. </para> 2012</returns></method> 2013</method-group> 2014</struct> 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104</namespace> 2105</namespace> 2106</header> 2107<header name="boost/mpi/packed_iarchive.hpp"> 2108<para>This header provides the facilities for packing Serializable data types into a buffer using <computeroutput>MPI_Pack</computeroutput>. The buffers can then be transmitted via MPI and then be unpacked either via the facilities in <computeroutput>packed_oarchive.hpp</computeroutput> or <computeroutput>MPI_Unpack</computeroutput>. </para><namespace name="boost"> 2109<namespace name="mpi"> 2110<class name="packed_iarchive"><inherit access="public">iprimitive</inherit><purpose>An archive that unpacks binary data from an MPI buffer. </purpose><description><para>The <computeroutput><classname alt="boost::mpi::packed_oarchive">packed_oarchive</classname></computeroutput> class is an Archiver (as in the Boost.Serialization library) that unpacks binary data from a buffer received via MPI. It can operate on any Serializable data type and will use the <computeroutput>MPI_Unpack</computeroutput> function of the underlying MPI implementation to perform deserialization. </para></description><method-group name="public member functions"> 2111<method name="load_override"><type>void</type><template> 2112 <template-type-parameter name="T"/> 2113 </template><parameter name="x"><paramtype>T &</paramtype></parameter><parameter name=""><paramtype>mpl::false_</paramtype></parameter></method> 2114<method name="load_override"><type>void</type><template> 2115 <template-type-parameter name="T"/> 2116 </template><parameter name="x"><paramtype>T &</paramtype></parameter><parameter name=""><paramtype>mpl::true_</paramtype></parameter></method> 2117<method name="load_override"><type>void</type><template> 2118 <template-type-parameter name="T"/> 2119 </template><parameter name="x"><paramtype>T &</paramtype></parameter></method> 2120<method name="load_override"><type>void</type><parameter name=""><paramtype>archive::class_id_optional_type &</paramtype></parameter></method> 2121<method name="load_override"><type>void</type><parameter name="t"><paramtype>archive::class_id_type &</paramtype></parameter></method> 2122<method name="load_override"><type>void</type><parameter name="t"><paramtype>archive::version_type &</paramtype></parameter></method> 2123<method name="load_override"><type>void</type><parameter name="t"><paramtype>archive::class_id_reference_type &</paramtype></parameter></method> 2124<method name="load_override"><type>void</type><parameter name="t"><paramtype>archive::class_name_type &</paramtype></parameter></method> 2125</method-group> 2126<constructor><parameter name="comm"><paramtype>MPI_Comm const &</paramtype><description><para>The communicator over which this archive will be received.</para></description></parameter><parameter name="b"><paramtype>buffer_type &</paramtype><description><para>A user-defined buffer that contains the binary representation of serialized objects.</para></description></parameter><parameter name="flags"><paramtype>unsigned int</paramtype><default>boost::archive::no_header</default><description><para>Control the serialization of the data types. Refer to the Boost.Serialization documentation before changing the default flags. </para></description></parameter><parameter name="position"><paramtype>int</paramtype><default>0</default></parameter><description><para>Construct a <computeroutput><classname alt="boost::mpi::packed_iarchive">packed_iarchive</classname></computeroutput> to receive data over the given MPI communicator and with an initial buffer.</para><para> 2127</para></description></constructor> 2128<constructor><parameter name="comm"><paramtype>MPI_Comm const &</paramtype><description><para>The communicator over which this archive will be received.</para></description></parameter><parameter name="s"><paramtype>std::size_t</paramtype><default>0</default></parameter><parameter name="flags"><paramtype>unsigned int</paramtype><default>boost::archive::no_header</default><description><para>Control the serialization of the data types. Refer to the Boost.Serialization documentation before changing the default flags. </para></description></parameter><description><para>Construct a <computeroutput><classname alt="boost::mpi::packed_iarchive">packed_iarchive</classname></computeroutput> to receive data over the given MPI communicator.</para><para> 2129</para></description></constructor> 2130</class><typedef name="iprimitive"><type>packed_iprimitive</type></typedef> 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221</namespace> 2222</namespace> 2223</header> 2224<header name="boost/mpi/packed_oarchive.hpp"> 2225<para>This header provides the facilities for unpacking Serializable data types from a buffer using <computeroutput>MPI_Unpack</computeroutput>. The buffers are typically received via MPI and have been packed either by via the facilities in <computeroutput>packed_iarchive.hpp</computeroutput> or <computeroutput>MPI_Pack</computeroutput>. </para><namespace name="boost"> 2226<namespace name="mpi"> 2227<class name="packed_oarchive"><inherit access="public">oprimitive</inherit><purpose>An archive that packs binary data into an MPI buffer. </purpose><description><para>The <computeroutput><classname alt="boost::mpi::packed_iarchive">packed_iarchive</classname></computeroutput> class is an Archiver (as in the Boost.Serialization library) that packs binary data into a buffer for transmission via MPI. It can operate on any Serializable data type and will use the <computeroutput>MPI_Pack</computeroutput> function of the underlying MPI implementation to perform serialization. </para></description><method-group name="public member functions"> 2228<method name="save_override"><type>void</type><template> 2229 <template-type-parameter name="T"/> 2230 </template><parameter name="x"><paramtype>T const &</paramtype></parameter><parameter name=""><paramtype>mpl::false_</paramtype></parameter></method> 2231<method name="save_override"><type>void</type><template> 2232 <template-type-parameter name="T"/> 2233 </template><parameter name="x"><paramtype>T const &</paramtype></parameter><parameter name=""><paramtype>mpl::true_</paramtype></parameter></method> 2234<method name="save_override"><type>void</type><template> 2235 <template-type-parameter name="T"/> 2236 </template><parameter name="x"><paramtype>T const &</paramtype></parameter></method> 2237<method name="save_override"><type>void</type><parameter name=""><paramtype>const archive::class_id_optional_type &</paramtype></parameter></method> 2238<method name="save_override"><type>void</type><parameter name="t"><paramtype>const archive::class_name_type &</paramtype></parameter></method> 2239<method name="save_override"><type>void</type><parameter name="t"><paramtype>const archive::class_id_type &</paramtype></parameter></method> 2240<method name="save_override"><type>void</type><parameter name="t"><paramtype>const archive::version_type &</paramtype></parameter></method> 2241</method-group> 2242<constructor><parameter name="comm"><paramtype>MPI_Comm const &</paramtype><description><para>The communicator over which this archive will be sent.</para></description></parameter><parameter name="b"><paramtype>buffer_type &</paramtype><description><para>A user-defined buffer that will be filled with the binary representation of serialized objects.</para></description></parameter><parameter name="flags"><paramtype>unsigned int</paramtype><default>boost::archive::no_header</default><description><para>Control the serialization of the data types. Refer to the Boost.Serialization documentation before changing the default flags.</para></description></parameter><description><para>Construct a <computeroutput><classname alt="boost::mpi::packed_oarchive">packed_oarchive</classname></computeroutput> for transmission over the given MPI communicator and with an initial buffer.</para><para> 2243</para></description></constructor> 2244<constructor><parameter name="comm"><paramtype>MPI_Comm const &</paramtype><description><para>The communicator over which this archive will be sent.</para></description></parameter><parameter name="flags"><paramtype>unsigned int</paramtype><default>boost::archive::no_header</default><description><para>Control the serialization of the data types. Refer to the Boost.Serialization documentation before changing the default flags. </para></description></parameter><description><para>Construct a <computeroutput><classname alt="boost::mpi::packed_oarchive">packed_oarchive</classname></computeroutput> for transmission over the given MPI communicator.</para><para> 2245</para></description></constructor> 2246</class><typedef name="oprimitive"><type>packed_oprimitive</type></typedef> 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337</namespace> 2338</namespace> 2339</header> 2340<header name="boost/mpi/python.hpp"> 2341<para>This header interacts with the Python bindings for Boost.MPI. The routines in this header can be used to register user-defined and library-defined data types with Boost.MPI for efficient (de-)serialization and separate transmission of skeletons and content. </para><namespace name="boost"> 2342<namespace name="mpi"> 2343<namespace name="python"> 2344<function name="register_serialized"><type>void</type><template> 2345 <template-type-parameter name="T"/> 2346 </template><parameter name="value"><paramtype>const T &</paramtype><default>T()</default><description><para>A sample value of the type <computeroutput>T</computeroutput>. This may be used to compute the Python type associated with the C++ type <computeroutput>T</computeroutput>.</para></description></parameter><parameter name="type"><paramtype>PyTypeObject *</paramtype><default>0</default><description><para>The Python type associated with the C++ type <computeroutput>T</computeroutput>. If not provided, it will be computed from the same value <computeroutput>value</computeroutput>. </para></description></parameter><purpose>Register the type T for direct serialization within Boost.MPI. </purpose><description><para>The <computeroutput>register_serialized</computeroutput> function registers a C++ type for direct serialization within Boost.MPI. Direct serialization elides the use of the Python <computeroutput>pickle</computeroutput> package when serializing Python objects that represent C++ values. Direct serialization can be beneficial both to improve serialization performance (Python pickling can be very inefficient) and to permit serialization for Python-wrapped C++ objects that do not support pickling.</para><para> 2347</para></description></function> 2348<function name="register_skeleton_and_content"><type>void</type><template> 2349 <template-type-parameter name="T"/> 2350 </template><parameter name="value"><paramtype>const T &</paramtype><default>T()</default><description><para>A sample object of type T that will be used to determine the Python type associated with T, if <computeroutput>type</computeroutput> is not specified.</para></description></parameter><parameter name="type"><paramtype>PyTypeObject *</paramtype><default>0</default><description><para>The Python type associated with the C++ type <computeroutput>T</computeroutput>. If not provided, it will be computed from the same value <computeroutput>value</computeroutput>. </para></description></parameter><purpose>Registers a type for use with the skeleton/content mechanism in Python. </purpose><description><para>The skeleton/content mechanism can only be used from Python with C++ types that have previously been registered via a call to this function. Both the sender and the transmitter must register the type. It is permitted to call this function multiple times for the same type <computeroutput>T</computeroutput>, but only one call per process per type is required. The type <computeroutput>T</computeroutput> must be Serializable.</para><para> 2351</para></description></function> 2352</namespace> 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443</namespace> 2444</namespace> 2445</header> 2446<header name="boost/mpi/request.hpp"> 2447<para>This header defines the class <computeroutput>request</computeroutput>, which contains a request for non-blocking communication. </para><namespace name="boost"> 2448<namespace name="mpi"> 2449<class name="request"><purpose>A request for a non-blocking send or receive. </purpose><description><para>This structure contains information about a non-blocking send or receive and will be returned from <computeroutput>isend</computeroutput> or <computeroutput>irecv</computeroutput>, respectively. </para></description><class name="handler"><method-group name="public member functions"> 2450<method name="wait" cv="= 0" specifiers="virtual"><type><classname>status</classname></type></method> 2451<method name="test" cv="= 0" specifiers="virtual"><type>optional< <classname>status</classname> ></type></method> 2452<method name="cancel" cv="= 0" specifiers="virtual"><type>void</type></method> 2453<method name="active" cv="const = 0" specifiers="virtual"><type>bool</type></method> 2454<method name="trivial" cv="= 0" specifiers="virtual"><type>optional< MPI_Request & ></type></method> 2455</method-group> 2456<destructor/> 2457</class><class name="legacy_dynamic_primitive_array_handler"><template> 2458 <template-type-parameter name="T"/> 2459 <template-type-parameter name="A"/> 2460 </template></class><class name="legacy_serialized_array_handler"><template> 2461 <template-type-parameter name="T"/> 2462 </template></class><class name="legacy_serialized_handler"><template> 2463 <template-type-parameter name="T"/> 2464 </template></class><method-group name="public member functions"> 2465<method name="wait"><type><classname>status</classname></type><description><para>Wait until the communication associated with this request has completed, then return a <computeroutput>status</computeroutput> object describing the communication. </para></description></method> 2466<method name="test"><type>optional< <classname>status</classname> ></type><description><para>Determine whether the communication associated with this request has completed successfully. If so, returns the <computeroutput>status</computeroutput> object describing the communication. Otherwise, returns an empty <computeroutput>optional<></computeroutput> to indicate that the communication has not completed yet. Note that once <computeroutput>test()</computeroutput> returns a <computeroutput>status</computeroutput> object, the request has completed and <computeroutput>wait()</computeroutput> should not be called. </para></description></method> 2467<method name="cancel"><type>void</type><description><para>Cancel a pending communication, assuming it has not already been completed. </para></description></method> 2468<method name="trivial"><type>optional< MPI_Request & ></type><description><para>The trivial MPI requet implenting this request, provided it's trivial. Probably irrelevant to most users. </para></description></method> 2469<method name="active" cv="const"><type>bool</type><description><para>Is this request potentialy pending ? </para></description></method> 2470<method name="preserve"><type>void</type><parameter name="d"><paramtype>boost::shared_ptr< void ></paramtype></parameter></method> 2471</method-group> 2472<constructor><description><para>Constructs a NULL request. </para></description></constructor> 2473<method-group name="public static functions"> 2474<method name="make_trivial_send" specifiers="static"><type><classname>request</classname></type><template> 2475 <template-type-parameter name="T"/> 2476 </template><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="value"><paramtype>T const &</paramtype></parameter><description><para>Send a known number of primitive objects in one MPI request. </para></description></method> 2477<method name="make_trivial_send" specifiers="static"><type><classname>request</classname></type><template> 2478 <template-type-parameter name="T"/> 2479 </template><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="values"><paramtype>T const *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter></method> 2480<method name="make_packed_send" specifiers="static"><type><classname>request</classname></type><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="values"><paramtype>void const *</paramtype></parameter><parameter name="n"><paramtype>std::size_t</paramtype></parameter></method> 2481<method name="make_bottom_send" specifiers="static"><type><classname>request</classname></type><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="tp"><paramtype>MPI_Datatype</paramtype></parameter></method> 2482<method name="make_empty_send" specifiers="static"><type><classname>request</classname></type><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter></method> 2483<method name="make_trivial_recv" specifiers="static"><type><classname>request</classname></type><template> 2484 <template-type-parameter name="T"/> 2485 </template><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="value"><paramtype>T &</paramtype></parameter><description><para>Receive a known number of primitive objects in one MPI request. </para></description></method> 2486<method name="make_trivial_recv" specifiers="static"><type><classname>request</classname></type><template> 2487 <template-type-parameter name="T"/> 2488 </template><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="values"><paramtype>T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter></method> 2489<method name="make_bottom_recv" specifiers="static"><type><classname>request</classname></type><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="tp"><paramtype>MPI_Datatype</paramtype></parameter></method> 2490<method name="make_empty_recv" specifiers="static"><type><classname>request</classname></type><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="dest"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter></method> 2491<method name="make_dynamic" specifiers="static"><type><classname>request</classname></type><description><para>Construct request for simple data of unknown size. </para></description></method> 2492<method name="make_serialized" specifiers="static"><type><classname>request</classname></type><template> 2493 <template-type-parameter name="T"/> 2494 </template><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="source"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="value"><paramtype>T &</paramtype></parameter><description><para>Constructs request for serialized data. </para></description></method> 2495<method name="make_serialized_array" specifiers="static"><type><classname>request</classname></type><template> 2496 <template-type-parameter name="T"/> 2497 </template><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="source"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="values"><paramtype>T *</paramtype></parameter><parameter name="n"><paramtype>int</paramtype></parameter><description><para>Constructs request for array of complex data. </para></description></method> 2498<method name="make_dynamic_primitive_array_recv" specifiers="static"><type><classname>request</classname></type><template> 2499 <template-type-parameter name="T"/> 2500 <template-type-parameter name="A"/> 2501 </template><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="source"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="values"><paramtype>std::vector< T, A > &</paramtype></parameter><description><para>Request to recv array of primitive data. </para></description></method> 2502<method name="make_dynamic_primitive_array_send" specifiers="static"><type><classname>request</classname></type><template> 2503 <template-type-parameter name="T"/> 2504 <template-type-parameter name="A"/> 2505 </template><parameter name="comm"><paramtype><classname>communicator</classname> const &</paramtype></parameter><parameter name="source"><paramtype>int</paramtype></parameter><parameter name="tag"><paramtype>int</paramtype></parameter><parameter name="values"><paramtype>std::vector< T, A > const &</paramtype></parameter><description><para>Request to send array of primitive data. </para></description></method> 2506</method-group> 2507<method-group name="private member functions"> 2508</method-group> 2509<constructor><parameter name="h"><paramtype><classname>handler</classname> *</paramtype></parameter></constructor> 2510</class> 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600</namespace> 2601</namespace> 2602</header> 2603<header name="boost/mpi/skeleton_and_content.hpp"> 2604<para>This header provides facilities that allow the structure of data types (called the "skeleton") to be transmitted and received separately from the content stored in those data types. These facilities are useful when the data in a stable data structure (e.g., a mesh or a graph) will need to be transmitted repeatedly. In this case, transmitting the skeleton only once saves both communication effort (it need not be sent again) and local computation (serialization need only be performed once for the content). </para><namespace name="boost"> 2605<namespace name="mpi"> 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696</namespace> 2697</namespace> 2698</header> 2699<header name="boost/mpi/skeleton_and_content_fwd.hpp"> 2700<para>This header contains all of the forward declarations required to use transmit skeletons of data structures and the content of data structures separately. To actually transmit skeletons or content, include the header <computeroutput>boost/mpi/skeleton_and_content.hpp</computeroutput>. </para><namespace name="boost"> 2701<namespace name="mpi"> 2702<struct name="skeleton_proxy"><template> 2703 <template-type-parameter name="T"/> 2704 </template></struct> 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790<function name="skeleton"><type>const <classname>skeleton_proxy</classname>< T ></type><template> 2791 <template-type-parameter name="T"/> 2792 </template><parameter name="x"><paramtype>T &</paramtype></parameter></function> 2793<function name="get_content"><type>const content</type><template> 2794 <template-type-parameter name="T"/> 2795 </template><parameter name="x"><paramtype>const T &</paramtype></parameter></function> 2796 2797 2798</namespace> 2799</namespace> 2800</header> 2801<header name="boost/mpi/status.hpp"> 2802<para>This header defines the class <computeroutput>status</computeroutput>, which reports on the results of point-to-point communication. </para><namespace name="boost"> 2803<namespace name="mpi"> 2804<class name="status"><purpose>Contains information about a message that has been or can be received. </purpose><description><para>This structure contains status information about messages that have been received (with <computeroutput>communicator::recv</computeroutput>) or can be received (returned from <computeroutput>communicator::probe</computeroutput> or <computeroutput>communicator::iprobe</computeroutput>). It permits access to the source of the message, message tag, error code (rarely used), or the number of elements that have been transmitted. </para></description><data-member name="m_count" specifiers="mutable"><type>int</type></data-member> 2805<method-group name="public member functions"> 2806<method name="source" cv="const"><type>int</type><description><para>Retrieve the source of the message. </para></description></method> 2807<method name="tag" cv="const"><type>int</type><description><para>Retrieve the message tag. </para></description></method> 2808<method name="error" cv="const"><type>int</type><description><para>Retrieve the error code. </para></description></method> 2809<method name="cancelled" cv="const"><type>bool</type><description><para>Determine whether the communication associated with this object has been successfully cancelled. </para></description></method> 2810<method name="count" cv="const"><type>optional< int ></type><template> 2811 <template-type-parameter name="T"/> 2812 </template><description><para>Determines the number of elements of type <computeroutput>T</computeroutput> contained in the message. The type <computeroutput>T</computeroutput> must have an associated data type, i.e., <computeroutput>is_mpi_datatype<T></computeroutput> must derive <computeroutput>mpl::true_</computeroutput>. In cases where the type <computeroutput>T</computeroutput> does not match the transmitted type, this routine will return an empty <computeroutput>optional<int></computeroutput>.</para><para> 2813</para></description><returns><para>the number of <computeroutput>T</computeroutput> elements in the message, if it can be determined. </para> 2814</returns></method> 2815<method name="conversion-operator"><type>MPI_Status &</type><description><para>References the underlying <computeroutput>MPI_Status</computeroutput> </para></description></method> 2816<method name="conversion-operator" cv="const"><type>const MPI_Status &</type><description><para>References the underlying <computeroutput>MPI_Status</computeroutput> </para></description></method> 2817</method-group> 2818<constructor/> 2819<constructor><parameter name="s"><paramtype>MPI_Status const &</paramtype></parameter></constructor> 2820</class> 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910</namespace> 2911</namespace> 2912</header> 2913<header name="boost/mpi/timer.hpp"> 2914<para>This header provides the <computeroutput>timer</computeroutput> class, which provides access to the MPI timers. </para><namespace name="boost"> 2915<namespace name="mpi"> 2916<class name="timer"><purpose>A simple timer that provides access to the MPI timing facilities. </purpose><description><para>The <computeroutput>timer</computeroutput> class is a simple wrapper around the MPI timing facilities that mimics the interface of the Boost Timer library. </para></description><method-group name="public member functions"> 2917<method name="restart"><type>void</type><description><para>Restart the timer.</para><para> 2918</para></description><postconditions><para><computeroutput>elapsed()</computeroutput> == 0 </para> 2919</postconditions></method> 2920<method name="elapsed" cv="const"><type>double</type><description><para>Return the amount of time that has elapsed since the last construction or reset, in seconds. </para></description></method> 2921<method name="elapsed_max" cv="const"><type>double</type><description><para>Return an estimate of the maximum possible value of elapsed(). Note that this routine may return too high a value on some systems. </para></description></method> 2922<method name="elapsed_min" cv="const"><type>double</type><description><para>Returns the minimum non-zero value that <computeroutput>elapsed()</computeroutput> may return. This is the resolution of the timer. </para></description></method> 2923</method-group> 2924<constructor><description><para>Initializes the timer</para><para> 2925</para></description><postconditions><para><computeroutput>elapsed()</computeroutput> == 0 </para> 2926</postconditions></constructor> 2927<method-group name="public static functions"> 2928<method name="time_is_global" specifiers="static"><type>bool</type><description><para>Determines whether the elapsed time values are global times or local processor times. </para></description></method> 2929</method-group> 2930</class> 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020</namespace> 3021</namespace> 3022</header> 3023</library-reference>