[mpich-discuss] URGENT.. Passing Array..
Dave Goodell
goodell at mcs.anl.gov
Thu Dec 3 09:52:04 CST 2009
I haven't studied your sample code, but you probably want to create
two datatypes in your program. One to describe a column in your image
and one to describe a row in the image. MPI_Type_vector is probably
the most straightforward way to create these types. The MPI Standard
[1] (section 4.1.2) provides descriptions of how to use this routine,
as do many of the books out there such as "Using MPI" [2].
You can then send and receive your rows and columns using these
derived datatypes.
-Dave
[1] http://www.mpi-forum.org/docs/mpi-2.2/mpi22-report.pdf
[2] http://www.amazon.com/Using-MPI-Programming-Engineering-Computation/dp/0262571323
On Dec 3, 2009, at 12:51 AM, Anuj Patel wrote:
> Hi thanks for reply.
>
> Actually i am trying to paralleling simple HAAR WAVELET.
>
> In that i need to take summation and subtraction of two row/column
> out of an very large array(which represents an image) and is in N*N
> form with very large dimensions.
>
> so what i want to do is pass two row/column to each worker process.
> so in that part i am confused how to do that.
>
> because i studied matrix multiplication but it just passes one row
> and a complete array to each worker.
>
> i hope i mad it bit clear. and i am attaching serial algo here.
>
> Thanks.
>
> Anuj Patel
>
>
> On Wed, Dec 2, 2009 at 8:50 PM, Dave Goodell <goodell at mcs.anl.gov>
> wrote:
> On Dec 2, 2009, at 2:07 AM, Anuj Patel wrote:
>
> can anyone tell me how to pass two row and column at a time.?
>
> Can you elaborate a little bit? Are you trying to pass two rows and
> two columns of an array as an argument to a function? Is it in C or
> Fortran?
>
> Or do you mean how to send an MPI message containing the data from
> two rows and two columns of an array?
>
> -Dave
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
> <hs.c>_______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
More information about the mpich-discuss
mailing list