LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Daniel Ng (danielng52_at_[hidden])
Date: 2007-10-04 08:59:33


Hi Brian,
Thanks for the explaination.
After going through the available datatypes, I've successfully coded using
MPI_Type_indexed. The data definiton is clear and it works.
Thanks again.
Daniel.

----- Original Message -----
From: "Brian Barrett" <brbarret_at_[hidden]>
To: "General LAM/MPI mailing list" <lam_at_[hidden]>
Sent: Thursday, October 04, 2007 12:30 PM
Subject: Re: LAM: Which derived datatype?

> 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
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/