.PVM.mkbuf {rpvm}R Documentation

Create message buffer

Description

Creates a new message buffer

Usage

.PVM.mkbuf (encode = c("Default", "Raw", "InPlace"))

Arguments

encode a character string specifying the next message's encoding scheme. Must be one of "Default" (default), "Raw" or "InPlace".

Details

This function creates a new message buffer and sets its encoding theme (see .PVM.initsend.

It is useful if the user wishes to manage multiple message buffers and should be used in conjunction with .PVM.freebuf. .PVM.freebuf should be called for a send buffer after a message has been send and is no longer needed.

Receive buffer are created automatically by .PVM.recv and .PVM.nrecv routines and do not have to be freed unless they have been explicitly saved with .PVM.setrbuf.

Typically multiple send and receive buffer are not needed and the user can simply use the .PVM.initsend to reset the default send buffer.

Value

Returns message buffer id or -1 if failed..

Author(s)

Na (Michael) Li nali@umn.edu and A.J. Rossini rossini@u.washington.edu

References

PVM documentation

See Also

.PVM.initsend,.PVM.freebuf, .PVM.setrbuf

Examples

## Not run: bufid <- .PVM.mkbuf ("Raw")
## Send the message ...
## Not run: .PVM.freebuf (bufid)

[Package rpvm version 0.6-2 Index]