10.2.8 Gather Procedure

The Gather Procedure takes an input vector that is distributed across all the processors and gathers it into another distributed vector or array according to an indirect index vector or array. No collisions are possible, since this call is effectively pulling values out of a distributed variable, and there is a different location for each pulled value. This is the opposite of the Scatter procedure.

Calling syntax:

call Gather (Output, Input, Index, Trace)

Input variables:

 Index  An optional integer vector or array of indirect references to positions in the Input vector. This must be included on the first call to this procedure with a given data structure, but may be omitted on subsequent calls if the Trace variable is present. [Optional]
 Input  A real, integer or logical vector that is distributed across all the processors.
 Trace  An optional structure that stores the setup from a previous Gather/Scatter call using the same Index variable and Input vector length. If Trace is present and uninitialized, it is set by this procedure. If Trace is present, it is used regardless of whether Index is present.

Output variables:

 Output  The gathered version of the Input vector, distributed across the processors.
 Trace  If present, Trace is set to the setup information for this Gather/Scatter. [Optional]

The Gather code listing contains additional documentation.

Michael L. Hall