Dissection of trapezoidal rule

We use \( MPI\_reduce \) to collect data from each process. Note also the use of the function \( MPI\_Wtime \).

//  this function defines the function to integrate
double int_function(double x)
{
  double value = 4./(1.+x*x);
  return value;
} // end of function to evaluate