title: difficulty with MPI_Gather function
body: <p>I have a value on local array (named lvotes) for each of the processors (assume 3 processors), and first element of each is storing a value, i.e.:</p>
  
  <pre><code>P0 : 4
  P1 : 6
  p2 : 7
  </code></pre>
  
  <p>Now, using MPI_Gather, I want gather them all in  P0, so It will look like :</p>
  
  <pre><code>P0 : 4, 6, 7
  </code></pre>
  
  <p>I used gather this way:</p>
  
  <pre><code>MPI_Gather(lvotes, P, MPI_INT, lvotes, 1, MPI_INT, 0, MPI_COMM_WORLD);
  </code></pre>
  
  <p>But I get problems. It's my first time coding in MPI. I could use any suggestion. 
  Thanks</p>