[mpich-discuss] Query regarding structure of dynamic array derived datatype

Mahesh Doijade maheshdoijade at gmail.com
Thu Mar 21 03:42:21 CDT 2013


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

On Thu, Mar 21, 2013 at 2:36 AM, Pavan Balaji <balaji at mcs.anl.gov> wrote:

>
> 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 at mpich.org
> > To manage subscription options or unsubscribe:
> > https://lists.mpich.org/mailman/listinfo/discuss
> >
>
> --
> Pavan Balaji
> http://www.mcs.anl.gov/~balaji
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20130321/80530290/attachment.html>


More information about the discuss mailing list