Hi,
Thanks for your reply, after looking at various MPI derived datatype creation functions other than MPI_Pack according to me option can probably be of using MPI_Type_create_struct but then for each structure element I have to create a separate derived datatype as the block lengths will be different due to dynamic array present in them, so again the extra memory will be required now for type-maps of these datatypes.
Is the approach of MPI_Type_create_struct mentioned above will be better than MPI_Pack in this case? also is there any other optimal way to do this?
--
Regards,
-- Mahesh Doijade
Please look through the derived datatype constructs in MPI. Google can
help you find some tutorials.
-- Pavan
> _______________________________________________
On 03/19/2013 06:12 AM US Central Time, Mahesh Doijade wrote:
> Hi,
> I have a struct as -
> struct A
> {
> int size;
> int *lptr;
> };
> And then I have array of such structure, I want to only send
> dynamic array present in each of the structs to other process.
> One of the options is to do it with MPI_Pack but then I have read it is
> not so good from performance point of view.
> What can be the other opt
>
> --
>
> Regards,
> -- Mahesh Doijade
>
>
>
>
>
> discuss mailing list discuss@mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>
--
Pavan Balaji
http://www.mcs.anl.gov/~balaji