LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: seberino_at_[hidden]
Date: 2003-09-21 21:51:09


Jeff

I hope you are right that you can do mpi_allgatherv's
just as easily with 2d arrays as with 1d arrays.

I'm confused however why you don't see a gotcha regarding
order of indices...

"3 elements from node0" means different things for different
orderings of indices don't you agree?....

It may mean {a(1,1),a(2,1),a(3,1)} or {a(1,1),a(1,2),a(1,3)}.
You'll "gather" different guys from same nodes!!!!

Do you see what I mean?

chris

On Mon, Aug 04, 2003 at 05:20:46PM -0400, Jeff Squyres wrote:
> 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/
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/

--
_______________________________________
Christian Seberino, Ph.D.
SPAWAR Systems Center San Diego
Code 2872
49258 Mills Street, Room 158
San Diego, CA 92152-5385
U.S.A.
Phone: (619) 553-9973
Fax  : (619) 553-6521
Email: seberino_at_[hidden]
_______________________________________