Newsgroups: comp.parallel.pvm
From: burns@etdesg.trw.com (James S. Burns)
Subject: Re: difference between psend/send and precv/recv ???
Organization: TRW Space & Electronics Group, Redondo Beach, CA
Date: 21 May 1996 01:46:50 GMT
Message-ID: <4nr7aa$32v@ns1.nba.TRW.COM>

Laszlo Ladanyi (ladanyi@cs.cornell.edu) wrote:
: For psend and send, it is obvious that psend should be more efficient, since 
: it has to malloc a buffer only once, not in chunks. But I don't really see,
: why psend would be more efficient than send with InPlace, especially, if
: I send only one chunk of data. As far as I understand, psend will allocate
: a buffer and copy the header/data there together, while send will just allocate
: space for the header (and only for one frag if I have just one chunk), which
: should be faster, shouldn't it?

pvm_psend sends the data without creating and packing a send buffer.
pvm_send PvmDataInPlace also sends the data without packing, however
it incurs an extra communication because is must send the header first.
Then it sends the data.  pvm_send must also be unpacked after being
received with pvm_recv.


: As for precv, there I really don't see why is it faster than recv (suppose for
: a second that they are interchangable). For both the the daemon will allocate 
: a buffer of length message size and will receive the data there. From then 
: on the data will be copied directly to the user space via either directly 
: from precv or via various upk calls after recv. All precv can save is the
: several function call to the upk functions, but if I have just one chunk
: that's negligible.

pvm_recv must copy the data twice.  pvm_precv does not need to copy the
data, it accepts it into a pre-allocated buffer.


Jim

Opinions are my own, not my employers :)



