Allreduce Type

Next: , Previous: Alltoall, Index: Index

The allreduce[operation] type is quite similar to the reduce type, but the reduction will be performed on each process and the result is also available to all.

Operation Semantics
min Find the minimum value
max Find the maximum value
sum Add the values up
prod Find the product of the value
land Compute the logical and
band Compute the bitwise and
lor Compute the logical or
bor Compute the bitwise or
lxor Compute the logical xor
bxor Compute the bitwise xor
minloc Find the minimum value and location
replace Current value in the target memory is replaced by the value supplied by the origin

Examples

var x:Int::allocated[multiple[]];
var p;
par p from 0 to 3
{
(x::allreduce["min"]):=p;
};

In this case all processes will perform the reduction on p and all processes will have the minimum value of p placed into their copy of x.

Last Modified: August 2008