On Sep 30, 2007, at 10:44 PM, Daniel Ng wrote:
> I would like to use a single send for sending strided data as
> described
> below.
>
> double dataArray[100];
> for (i=0; i<100; i+=10)
> send dataArray[2+i], dataArray[4+i];
>
> There will be numerous occurances of this send throughout the entire
> program. As recommended, I should use derived datatype (vector/struct)
> rather than pack/unpack into a contiguous memory. Which derived
> datatype
> would give the best performance?
You're correct in your assessment that using derived datatypes is a
better idea than packing/unpacking. For LAM/MPI, the performance
difference will be minimal. For more advanced MPI implementations
like Open MPI, the performance difference can be noticeable. The nice
thing about MPI implementations is that whatever is the most straight-
forward way to create a datatype will be the best in terms of MPI's
ability to optimize. So I would look less at "how can the MPI
optimize this derived datatype" and look more at "what is the easiest
way to describe my data". A good MPI implementation will cover for
the rest.
> I've tried searching at LAM/MPI website
> http://www.lam-mpi.org/using/support/ but it always gives this message
>
> "Sorry, you didn't specify any search criteria, so no search was
> performed."
Yeah, LAM's search engine is borked. It's on my list of things to
fix, but hasn't gotten to the top yet.
Hope this helps,
Brian
|