title: increasing the number of CPUs in mpi increses the processing time?
body: <p>I am new to parallel computing, so I decided to start from hello world compiling with Mpich2. Here is the code: </p>
  
  <pre><code>/* helloworld.c */
  
  #include &lt;stdio.h&gt;
  
  /* You MUST include this for the MPI_* functions */
  #include "mpi.h"
  
  int main(int argc, char **argv) {
     int rank;
     char host[150];
     int namelen;
  
     /* Initialize MPI. This handles mpich-specific command line arguments */
     MPI_Init(&amp;argc, &amp;argv);
  
     /* Get my rank. My rank number gets stored in the 'rank' variable */
     MPI_Comm_rank(MPI_COMM_WORLD, &amp;rank);
  
     /* Look up what computer I am running on. Store it in 'host' */
     MPI_Get_processor_name(host,&amp;namelen);
  
     printf("Hello world (Rank: %d / Host: %s)\n", rank, host);
     fflush(stdout);
  
     /* Finalize: Close connections to the other children, clean up memory
      * the MPI library has allocated, etc */
     MPI_Finalize();
     return 0;
  }
  </code></pre>
  
  <p>I compile and run it like this:</p>
  
  <pre><code>mpicc helloworld.c -o myhello 
  mpirun -nc 2 ./myhello
  </code></pre>
  
  <p>It works. However I noticed by increasing the number of CPUs the wall clock time increased which I expect it to decrease?! Moreover there is no limitation for the number of CPUs, However my laptop has 5 core but I can set the number of CPUs in the code as much as I want, I expect some error if I exceed the number of real CPUs.</p>