next up previous

3.2 Fortran 77 Example     continued...

To send a message from one task to another, a send buffer is created to hold the data. The routine pvmfinitsend() creates and clears the buffer and returns a buffer identifier.

call pvmfinitsend(encoding, bufid)
If a single buffer is used, pvmfinitsend() must be called each time a new message is to be sent, otherwise the new message will be appended to the message already in the send buffer.

The encoding parameter can be either PVMDEFAULT or PVMRAW. The former value will form an XDRgif encoding of message data if the virtual machine configuration is determined to be heterogeneous, else no encoding is done. The latter option does no encoding of the message data.

Before issuing a send command, the buffer must be packed with data to be sent. The routine to pack data into the active send buffer is pvmfpack().

call pvmfpack(what, xp, nitem, stride, info)
The integer parameter what specifies the type of data to be packed. The possible values are
STRING  BYTE1     INTEGER2  INTEGER4 
REAL4   COMPLEX8  REAL8     COMPLEX16

and should be self-explanatory. These names are defined in the PVM Fortran include file fpvm3.h.