Yes, MPI can broadcast arbitrary structures.
Your best bet would probably be to take a tutorial or read a book on
MPI datatypes -- they're a somewhat complex topic and the tutorials
cover them much better than I can in a single e-mail. In short, what
you'll do is define a datatype that describes your struct's, and then
use it as an argument to the MPI send/receive or collective functions
(e.g., MPI_Bcast). Without knowing anything more about your
application, that's the best assistance I can guess at. :-)
A tip -- before you start, be sure to be aware of the memory
constraints of each node; check to see that it can actually hold all
10,000 zones in its physical memory. If not, you'll start swapping
physical and virtual memory, which can be a serious detriment to
performance (depending on how much swapping occurs).
FWIW, this MPI tutorial is excellent:
http://webct.ncsa.uiuc.edu:8900/public/MPI/
On Nov 8, 2005, at 12:26 PM, Subir Singh Lamba wrote:
> Hi,
>
> I would like to seek suggestion as to how to broadcast a strcucture
> to other processor's. let me write in detail. I am generating some
> 10,000 3d figures (called zones) using only five processor (it could
> vary). I make each processor calculate the geometry parameter for a
> 2000 3d figures. That is :-
> process with rank=0 calculates geometry parameters for zones from 1
> to 2000.
> process with rank=1 calculates geometry parameters for zones from
> 2001 to 4000 .. etc
>
> All the parameters are stored in structure which is common to each
> processor but one processor stores on information for 2000 zones rest
> it NULL in its memory. But I want each processor to have information
> about all the 10,000 zones. So my question is How to write the data
> into the memory of other processor. For e.g. information about first
> 2000 zones into memory of processor with rank=1,2,3,4.
>
> thanks,
>
> Subir
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
--
{+} Jeff Squyres
{+} The Open MPI Project
{+} http://www.open-mpi.org/
|