Reduce
MPI_Reduce(void *operand, void *result, int ct, MPI_Datatype dt, MPI_Op op, int root, MPI_Comm comm)
Each process in the communication collective comm puts his contribution in operand. When complete result on the root process contains the result of the requested operation op on the set of input data.
On processes other than root, result is undefined
MPI_Reduce(&integral, &total, 1, MPI_FLOAT, MPI_SUM, 0, MPI_COMM_WORLD);