1
.TH pvm_recv 1 "May 1998" "Scilab // Group" "Scilab function"
4
pvm_recv - receive a message.
7
[buff, info, msgtid, tag] = pvm_recv(tid, msgtag)
12
: integer, task identifier of sending process supplied by the user.
14
msgtag : integer, message tag supplied by the user. msgtag should be
18
: scilab variable, where the received message will be stored.
21
: integer, status code returned by the routine. Values less than zero indicate an error.
23
msgtid : integer, returning the source of the message. Useful when the
24
message was received with a wildcard tid.
27
: integer, returning the message label. Useful when the message
28
was received with a wildcard msgtag.
32
blocks the process until a message with label
36
pvm_recv then places the message in \fIbuff\fR.
42
matches anything. This allows the user the following options. If tid
43
= -1 and msgtag is defined by the user, then pvm_recv will accept a
44
message from any process which has a matching msgtag. If msgtag = -1
45
and tid is defined by the user, then pvm_recv will accept any message
46
that is sent from process tid. If tid = -1 and msgtag = -1, then
47
pvm_recv will accept any message from any process.
49
When wildcard are used, the application is able to receive any
50
incoming message. If the action taken depends on the source tid and
51
the msgtag associated with the message that comes in first, the
52
information given by msgtid and tag can be very usefull.
54
The PVM model guarantees the following about message order. If task 1
55
sends message A to task 2, then task 1 sends message B to task 2,
56
message A will arrive at task 2 before message B. Moreover, if both
57
messages arrive before task 2 does a receive, then a wildcard receive
58
will always return message A.
61
will be the status code returned by the routine.
62
If some error occurs then
66
pvm_recv is blocking which means the routine waits until a message
67
matching the user specified tid and msgtag values arrives at the local
68
pvmd. If the message has already arrived then pvm_recv returns
69
immediately with the message.
71
Once pvm_recv returns, the data in the message can be unpacked
72
into the user's memory using the unpack routines.
76
[b, info, msgtid, tag] = pvm_recv(pvm_parent(),100)
77
g = pvm_recv(pvm_parent(),200)