title: MPI Total run time
body: <p>I have one program (which calculates the matrix multiplication with cannon algorithm), is implemented in MPI for C, I have set a clock to see the TOTAL time of this program, with total I mean all the process sum.</p>
  
  <p>But as a result I get the time of each process.</p>
  
  <p>Part of my code at the beginning of my main:</p>
  
  <pre><code> clock_t begin, end;
   double time_spent;
   begin = clock();
  
   /* Initializing */
   MPI_Init (&amp;argc, &amp;argv);
  </code></pre>
  
  <p>Then at the end of my code I have:</p>
  
  <pre><code>  MPI_Finalize();
  
    end = clock();
    time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
    printf("\n\nTIME: %f SECONDS\n\n", time_spent);
  </code></pre>