Gather the values from each process in the non-root group into an array of values at the root process. On the root process, the pth element of the result will be equal to the value parameter of the process with rank p in the other group when this routine returns. This variant can be called only by the root process or by members of the leaf (non-root) group.

Namespace:  MPI
Assembly:  MPI (in MPI.dll)
Version: (


public T[] Gather<T>(
	int root
Visual Basic (Declaration)
Public Function Gather(Of T) ( _
	root As Integer _
) As T()
Visual C++
generic<typename T>
array<T>^ Gather(
	int root


Type: System..::.Int32
Used to indicate the process gathering the data. At the root, should be Root. At leaf group processes should be the rank of the root process in the root group. At non-root processes in the root group, should be Null.

Type Parameters

Any serializable type.

Return Value

See Also