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

This A procedure for receiving messages involves two steps. These two calls may be combined (in PVM 3.3) in a single call to

Multiple message buffers

PVM 3 supports management of multiple buffers.

Packing Data

Sending Data

Combining send and pack

The routine
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
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.


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