Boost C++ Libraries: Ticket #10115: Documentation for Boost MPI gather() https://svn.boost.org/trac10/ticket/10115 <p> This is the current documentation for gather() [taken from github.com/boostorg/mpi/blob/master/include/boost/mpi/collectives.hpp]: </p> <pre class="wiki">/** * @brief Gather the values stored at every process into a vector at * the root process. * * @c gather is a collective algorithm that collects the values * stored at each process into a vector of values at the @p root * process. This vector is indexed by the process number that the * value came from. The type @c T of the values may be any type that * is serializable or has an associated MPI data type. * * When the type @c T has an associated MPI data type, this routine * invokes @c MPI_Gather to gather the values. * * @param comm The communicator over which the gather will occur. * * @param in_value The value to be transmitted by each process. For * gathering arrays of values, @c in_values points to storage for * @c n*comm.size() values. * * @param out_values 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. * * @param root The process ID number that will collect the * values. This value must be the same on all processes. */ </pre><p> Surely the sentence "@c in_values points to storage for @c n*comm.size() values" is wrong. in_values only needs to hold n values. However, out_values should have storage for n*comm.size() values on the root process. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10115 Trac 1.4.3