LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Khaled Al Salem (alsalem_at_[hidden])
Date: 2005-04-15 18:05:33


Hello,
   I wrote an f90 mpi code to solve a 3D problem. The topology is
         obtained using mpi_cart_creat. At the end of the calculations I wish
         to get the results gathered from all processors into one big 3
         dimensional array that can be directly visualized without going
         through post-processing. The problem is that mpi_gather doesn't
         gather the results from the different proccessors as blocks.
         for example, in 2D, if proc. 1 has the following
         
         1 1 1
         1 1 1
         1 1 1
         
         and proc. 2
         
         2 2 2
         2 2 2
         2 2 2

         then mpi_gather results in the following
         
         1 1 1 1 1 1
         1 1 1 2 2 2
         2 2 2 2 2 2

         the results that I'm after would be
         
         1 1 1 2 2 2
         1 1 1 2 2 2
         1 1 1 2 2 2

         is there an easy way to do this?