On Thu, 22 May 2003, Renzo Mischianti wrote:
> I have a problem... I have a 4d Matrix (matrix(a,b,c,d)) and I want to send
> a part of it to some processors, but I must to split it on c coordinate
> (like matrix(a,b,c/n,d) n = number of processors to split it).
>
> - do I have to define a datatype and copy elements there?
> or
> - is there an instruction that make it automatically??
>
> and then to receive the result respecting the matrix structure?
>
> What's the best way??
It might be possible to describe such a data structure using the MPI
derived datatypes, but I'm not exactly sure how one would do so. There is
definitely not an MPI function to do it for you :).
Most likely, you will have to copy (or just lay it out correctly to begin
with) such that your data is contigous (or at least easier to describe
using the MPI derived datatypes).
You might want to look at a book on MPI programming - it may be able to
offer more advice on data layout and distribution.
Hope this helps,
Brian
--
Brian Barrett
LAM/MPI developer and all around nice guy
Have a LAM/MPI day: http://www.lam-mpi.org/
|