[Spread-users] Use of SP_scat_receive and SP_scat_multicast

Jonathan Stanton jonathan at cnds.jhu.edu
Wed Dec 8 10:27:20 EST 2004


On Wed, Dec 08, 2004 at 07:21:09AM -0800, Mike Perik wrote:
> I would like to understand how these can be used a
> little better.
> Let's say I have a scatter message that has two
> elements and I have data in each element.  I send the
> scatter message and another process does a
> SP_scat_receive().
> Are the two elements sent as one message or two, I'm
> assuming only 1?

Yes. It is sent as one Spread message.

> What will happen if the receiver only does a
> SP_receive()?  

They will receive all of the data concatenated into one contiguous 

> Will the receiver get the complete message or only the
> first one (element)?

complete messages.

> Is the complete scatter message limited by the max
> message length or just each element?

The complete scatter must be less then the maximum message length 
(roughly 130KB in practice)

> If the receiver uses SP_scat_receiver() does more than
> one message get returned into the buffers?


> I think that sending and receiving using the scat
> methods only send a receive a single message and their
> benefits are that you can read/write data into
> multiple buffers. Just want to confirm it though.

Yes. It is useful to avoid having to copy several separate data buffers 
into one large contiguous buffer to send. Purely an efficiency and 
cleanliness of API issue. 

> Some of these questions come from a lack of experience
> with iovec type facilities, so thanks for you
> patience.  

Sure. As you noticed, the *_scat_ interface is designed to solve exactly 
the same problem las iovec and writev().



Jonathan R. Stanton         jonathan at cs.jhu.edu
Dept. of Computer Science   
Johns Hopkins University    

More information about the Spread-users mailing list