1. A data-processing system for performing collective operations, the system comprising: a plurality of network nodes, a first plurality of processors, and a first plurality of collective engines, wherein each one of the plurality of network nodes is coupled to one of the first plurality of processors, wherein each one of the plurality of network nodes includes one of the first plurality of collective engines, and wherein each of the first plurality of collective engines is configurable to specify a parent network node of that respective collective engine; a network that interconnects the plurality of network nodes; and a memory operatively coupled to the first plurality of processors, wherein the memory contains instructions of a software process that, when executed by a given one of the first plurality of processors, cause that given processor to: determine, in the parent network node of a first one of the plurality of collective engines, a first subset of other network nodes of the system that are to be used to execute a collective operation, logically arrange the subset of other network nodes into a hierarchical structure, transmit the collective operation to the subset of other network nodes based on the hierarchical structure via at the network, and receive, into the parent network node of the first one of the plurality of collective engines, a set of results from the execution of the collective operations from the subset of the other processor nodes; perform the collective operation on the received set of results to generate a final collective result; and pass the final collective result to the software process, wherein the collective operation specifies a vector reduction operation that is performed on a plurality of vector operands, each vector operand including a plurality of vector elements, and where the set of results received into the parent network node of the first one of the plurality of collective engines includes a vector result for each of the plurality of vector operands that are each passed between network, and wherein the specified vector reduction operation is performed on each respective vector element.