Opened 8 years ago

#10115 new Bugs

Documentation for Boost MPI gather()

Reported by: Max Gerlach <gerlach@…> Owned by: Matthias Troyer
Milestone: To Be Determined Component: mpi
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

This is the current documentation for gather() [taken from github.com/boostorg/mpi/blob/master/include/boost/mpi/collectives.hpp]:

/**
 *  @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.
 */

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.

Change History (0)

Note: See TracTickets for help on using tickets.