.PVM.recv {rpvm}R Documentation

Blocking receive

Description

Receive a message.

Usage

.PVM.recv (tid = -1, msgtag = -1)

Arguments

tid tid of sending process (-1 matches any tid)
msgtag integer message tag (>=0) supplied by the user (-1 matches any message tag)

Details

.PVM.recv blocks the process until a message with lable msgtag has arrived from tid. It then places the message in a new active receive buffer, which also clears the current receive buffer.

A -1 in tid or msgtag matches anything. Later .PVM.bufinfo can be used to find out the tid of the sending process or msgtag.

The PVM model guarantees the following about message order. If task 1 sends message A to task 2, then task 1 sends message B to task 2, message A will arrive at task 2 before message B. Moreover, if both tasks arrive before task 2 does a receive, then a wildcard receive will always return message A.

.PVM.recv is blocking, which means the routing waits until a message matching the user specified tid and msgtag value arrives at the local pvmd.

Value

Returns the id of the new active receive buffer. -1 indicates an error.

Author(s)

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

References

PVM documentation

See Also

.PVM.send, .PVM.nrecv, .PVM.bufinfo

Examples

## Not run: myparent <- .PVM.parent ()
## Not run: bufid <- .PVM.recv (myparent, 4)
## Not run: data <- .PVM.upkintvec ()

[Package rpvm version 0.6-2 Index]