Page 1 of 1

scatter and gather

PostPosted: Tue Sep 18, 2007 7:16 am
by Danesh_D
Hi all,

I would like to gather a distributed matrix on root processor (0, 0) in a processors grid. I know that "GEMR2D" can be used to scatter a matrix by distributing it, but how can I gather an already scattered matrix?

Regards,

Danesh

PostPosted: Wed Sep 19, 2007 10:40 am
by Julien Langou
Hello Danesh,
if you know how to scatter a matrix with GEMR2D, it's kind of weird you do not figure
out how to gather a ScaLAPACK parallel distributed matrix with GEMR2D on one process.
It's simply the reverse. You have the ScaLAPACK parallel distributed matrix
(M,N,A,IA,JA,DESCA). Then you create a ScaLAPACK matrix B that is on only one
process: (M,N,B,IB,JB,DESCB). One way to go is to set
Code: Select all
IB=1, JB=1, DESCB(5) = mb = M, DESCB(6) = nb = N, DESCB(7) = rsrc = 0, DESCB(8) = csrc = 0,

and that should do it, no?
(never try in this sense)
Julien.