title: Ordering Output in MPI
body: <p>in a simple MPI program I have used a column wise division of a large matrix.
  How can I order the output so that each matrix appears next to the other ordered ?
  I have tried this simple code the effect is quite different from the wanted:</p>
  
  <pre><code>for(int i=0;i&lt;10;i++)
  {
      for(int k=0;k&lt;numprocs;k++)
      {
          if (my_id==k){
              for(int j=1;j&lt;10;j++)
                  printf("%d",data[i][j]);
          }
          MPI_Barrier(com);
      }
      if(my_id==0)
          printf("\n");
  }
  </code></pre>
  
  <p>Seems that each process has his own stdout and so is impossible to have  ordered lines output without sending all the data to one master which will print out. Is my guess true ? Or what I'm doing wrong ?</p>