title: MPI: Variable does not increase
body: <p>I'm trying to get an intution about how MPI works. Therefore I started with a little example:</p>
  
  <pre><code>...
  MPI_Comm_rank(MPI_COMM_WORLD, &amp;tid);
  MPI_Comm_size(MPI_COMM_WORLD, &amp;nthreads);
  
  int message = 2;
  
  if(tid != 0)
  {
      MPI_Recv(&amp;rec, 1, MPI_INT, tid-1, 0, MPI_COMM_WORLD, &amp;status);
      printf("Process %i receive %i\n", tid, rec);
  }
  
  if(tid != nthreads-1)
  {
      message++;
      printf("Process %i sends %i\n", tid, message);
      MPI_Send(&amp;message, 1, MPI_INT, tid+1, 0, MPI_COMM_WORLD);
  }
  ...
  </code></pre>
  
  <p>That works fine despite the fact that <code>message</code> does seem to increase above 3. Why is that?</p>