Scilab function

pvm_reduce - Performs a reduce operation over members of the specified group

Calling Sequence

[buff, info] = pvm_reduce(func, buff, msgtag, group, rootginst)

Parameters

Description

pvm_reduce performs global operations such as max, min, sum or product over all the tasks in a group. All group members call pvm_reduce with their local data, and the result of the reduction operation appears on the user specified root task root. The root task is identified by its instance number in the group.

Max and Min are implemented for scalar datatypes (double, complex). For complex values the minimum [maximum] is that complex pair with the minimum [maximum] modulus. Sum and Product are implemented for scalar datatypes.

Note: pvm_reduce does not block. If a task calls pvm_reduce and then leaves the group before the root has called pvm_reduce an error may occur.

Examples

See Also