From: sanpawat@allegro.cs.tufts.edu (Sanpawat Kantabutra)
Newsgroups: comp.parallel.mpi
Subject: Re: send/recv
Date: 10 Mar 1999 00:42:28 GMT
Organization: Tufts University
Message-Id: <7c4f5k$6vj$1@news3.tufts.edu>
References: <7c4b4e$ag0$1@nnrp1.dejanews.com>
Xref: ukc comp.parallel.mpi:4722


srrmt@my-dejanews.com wrote:
: Hello,I am new to mpi. My question is whether I can pass a C structure in
: MPI_Send. If yes, what should be its parameters. Specifically, what should 
: be the datatype parameter in the send statement.  Thanks in advance.  Sri.

Hi,
Yes, you could. MPI has a feature for that. If I am not mistaken, it is
something called MPI_Commit(..). You have to define your own type and
then commit to it. Look up in MPI manuals. They are availble on the web.
Or, you could go to UChicago to find it. Personally, I do not use 
structure to work with MPI. It is easier for me to send the array of 
things in primitive types and define an index function to simulate 
structure access instead. -sk 
----------------------------------------
Perpetual optimism is a force multiplier

