LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2003-08-04 16:20:46


On Sat, 2 Aug 2003 seberino_at_[hidden] wrote:

> Is an allgather possible to give every node a complete copy of this 2D
> array that is spread out over all the nodes???
>
> Node Number What part of array "a" it has
> =================================================
>
> 0 a(1,1), a(1,2), a(1,3) (i.e. a(1,1-3))
> 1 a(2,1), a(2,2), a(2,3) (i.e. a(2,1-3))
> 2 a(3,1), a(3,2), a(3,3) (i.e. a(3,1-3))
> 3 a(4,1), a(4,2), a(4,3) (i.e. a(4,1-3))
>
> 4 a(1,4), a(1,5), a(1,6) (i.e. a(1,4-6))
> 5 a(2,4), a(2,5), a(2,6) (i.e. a(2,4-6))
> 6 a(3,4), a(3,5), a(3,6) (i.e. a(3,4-6))
> 7 a(4,4), a(4,5), a(4,6) (i.e. a(4,4-6))

Yes, it sounds like an Allgather is what you want to do. Check out Figure
4.1 in the MPI-1 spec (p92) for a handy diagram of what each of the data
movement collectives do in MPI.

> I've heard about column-major order and row-major order but always
> forget which one is C and which one Fortran90 uses.

This shouldn't be an issue here.

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/