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-bounces@open-mpi.org [mailto:users-bounces@open-mpi.org] On Behalf Of Vedran Coralic
Sent: Tuesday, May 04, 2010 3:25 PM
To: users@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