xp argument is the first item to be packed,
the total number of items to be packed and
stride is the stride to
use when packing.
A single message can contain any number of different data types and there is no limit on the complexity of the message. However, you should ensure that the received message is unpacked in the same way it was originally packed.
The routine to send a message is
call pvmfsend(tid, msgtag, info)This routine attaches an integer label of
msgtagand immediately sends the contents of the send buffer to the task with with task id of
msgtagcan be used to distinguish different ``types'' of messages that a task could send out.
In the example code, within a loop, the master program clears the send
buffer for each new message and packs this buffer with the number of
array elements that follow in the message and a portion of the array to
be sent to the task.
Since each consecutive item from the array
a is to be sent,
starting with the num_data*(i-1)+1 position, the stride for the
packing routine is 1.
task_ids array that was returned from the
is used to address each different task that will receive a portion of
The arbitrarily chosen value `4' is the
msgtag used to
label the messages.