Yes, all the component arrays of the derived type vector are of the same
size, though I am not sure that that actually makes the task any easier?

I suspected, just as you said, that copying the data into a contiguous block
of memory might be the best solution. I was hoping though that I could make
it more elegant/efficient using the MPI derived type feature.

Thanks for the quick response Derek

2010/5/4 Cole, Derek E <derek.e.c...@lmco.com>

>  Others may be able to chime in more, because I am no fortran expert, but
> you probably will have to copy it into a contiguous block in memory. Working
> with derived types is hard, especially if they are not uniform. MPI can
> probably technically handle it, but the programming effort is harder.  Are
> your arrays all equal length, same type?
>
>
>
> Derek
>
>
>
> *From:* users-boun...@open-mpi.org [mailto:users-boun...@open-mpi.org] *On
> Behalf Of *Vedran Coralic
> *Sent:* Tuesday, May 04, 2010 3:25 PM
> *To:* us...@open-mpi.org
> *Subject:* [OMPI users] Fortran derived types
>
>
>
> Hello,
>
>
>
> In my Fortran 90 code I use several custom defined derived types. Amongst
> them is a vector of arrays, i.e. v(:)%f(:,:,:). I am wondering what the
> proper way of sending this data structure from one processor to another is.
> Is the best way to just restructure the data by copying it into a vector and
> sending that or is there a simpler way possible by defining an MPI derived
> type that can handle it?
>
>
>
> I looked into the latter myself but so far, I have only found the solution
> for a scalar fortran derived type and the methodology that was suggested in
> that case did not seem naturally extensible to the vector case.
>
>
>
>
>
> Thanks any help you can give me!
>
>
>
> --
> Vedran Coralic
>
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>



-- 
Vedran Coralic

Reply via email to