Communicating messages



Message passing

A procedure for sending messages in PVM involves three steps. Routines and arguments will be explained in more detail later in the course.

These three steps may be combined (in PVM 3.3) in a single call to

pvmfpsend(tid,msgtag,xp,len,what,info)
This A procedure for receiving messages involves two steps. These two calls may be combined (in PVM 3.3) in a single call to
pvmfprecv(tid,msgtag,buf,len,datatype,atid,atag,alen,info)
This

Multiple message buffers

PVM 3 supports management of multiple buffers.

Packing Data


Sending Data


Combining send and pack

The routine
pvmfpsend(tid,msgtag,xp,len,what,info)
packs and sends an array of datatype what to the task identified by tid. xp is the address of the send buffer and len is the length of this buffer.


Receiving Data

There exist blocking and non-blocking receive calls.

Unpacking data


Combining receive and unpack

The routine
pvmfprecv(tid,msgtag,xp,len,what,atid,atag,alen,info)
blocks until a message with label msgtag arrives from tid. buf is the receive buffer. atid, atag, and alen return the actual tid of the sender, the actual message tag, and the actual message length respectively.

PREVIOUS NEXT
UP


Submitted by Mark Johnston,
last updated on 21 February 1995.