MPI_Op_create(user_function, commute, op) MPI_Op_free(op)The user function should performuser_function(invec, inoutvec, len, datatype)
inoutvec[i] = invec[i] op inoutvec[i];for i from 0 to len-1.
user_function can be non-commutative (e.g., matrix multiply).