title: C - MPI: Parallel Processing of Column Arrays
body: <p>I have a matrix (c) of 10x10 (M = 10) elements in which I divide the matrix by rows to be executed by 5 different processes (slaves = 5) with each process corresponding to 2 rows of that matrix.</p>
  
  <pre><code>offset = 0;
  rows = (M / slaves);
  MPI_Send(&amp;c[offset][0], rows*M, MPI_DOUBLE, id_slave,0,MPI_COMM_WORLD);
  offset= offset+rows;
  </code></pre>
  
  <p>Now I want to divide the matrix but by columns. I did the test  as follows by changing array indices but not working:</p>
  
  <pre><code>MPI_Send(&amp;c[0][offset], rows*M, MPI_DOUBLE, id_slave,0,MPI_COMM_WORLD);
  </code></pre>
  
  <p>Do you know how to do it? Thank you.</p>