Fortran call pvmfreduce(func, data, count, datatype,
msgtag, group, rootginst, info)
PVM supplies the following predefined functions that can be specified in func. PvmMin
PvmMax
PvmSum
PvmProduct
PvmMax and PvmMin are implemented for all the dataypes listed below. For complex values the minimum [maximum] is that complex pair with the minimum [maximum] modulus. PvmSum and PvmProduct are implemented for all the dataypes listed below with the exception of PVM_BYTE and BYTE1.
C and Fortran defined datatypes are: C datatypes FORTRAN datatypes
-----------------------------------
PVM_BYTE BYTE1
PVM_SHORT INTEGER2
PVM_INT INTEGER4
PVM_FLOAT REAL4
PVM_CPLX COMPLEX8
PVM_DOUBLE REAL8
PVM_DCPLX COMPLEX16
PVM_LONG
A user defined function may be used used in func. The argument func is a function with four arguments. It is the base function used for the reduction operation. Both x and y are arrays of type specified by datatype with num entries. The arguments datatype and info are as specified above. The arguments x and num correspond to data and count above. The argument y contains received values.
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.
The current algorithm is very simple and robust. A future implementation may make more efficient use of the architecture to allow greater parallelism.
PvmNoInst Calling task is not in the group
PvmBadParam The datatype specified is not appropriate
for the specified reduction function.
PvmSysErr Pvm system error