~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/pvm/pvm_recv.man

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH pvm_recv 1 "May 1998" "Scilab // Group" "Scilab function"
2
 
.so ../sci.an
3
 
.SH NAME
4
 
pvm_recv - receive a message.
5
 
.SH CALLING SEQUENCE
6
 
.nf
7
 
[buff, info, msgtid, tag] = pvm_recv(tid, msgtag)
8
 
.fi
9
 
.SH PARAMETERS
10
 
.TP 5
11
 
tid
12
 
: integer, task identifier of sending process supplied by the user.
13
 
.TP 5
14
 
msgtag : integer, message tag supplied by the user.  msgtag should be
15
 
>= 0.
16
 
.TP 4
17
 
buff
18
 
: scilab variable, where the received message will be stored.
19
 
.TP 6
20
 
info
21
 
: integer, status code returned by the routine. Values less than zero indicate an error.
22
 
.TP 6
23
 
msgtid : integer, returning  the source of the  message.  Useful when the
24
 
message was received with a wildcard tid.
25
 
.TP 6
26
 
tag
27
 
: integer, returning the  message label.  Useful when the message
28
 
was received with a wildcard msgtag.
29
 
 
30
 
.SH DESCRIPTION
31
 
\fVpvm_recv\fR 
32
 
blocks the process until a message with label
33
 
.I msgtag
34
 
has arrived from
35
 
.I tid.
36
 
pvm_recv then places the message in \fIbuff\fR. 
37
 
.PP
38
 
A -1 in
39
 
.I msgtag
40
 
or
41
 
.I tid
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.
48
 
 
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.
53
 
.PP
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.
59
 
.PP
60
 
.I info
61
 
will be the status code returned by the routine. 
62
 
If some error occurs then
63
 
.I info
64
 
will be < 0.
65
 
.PP
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.
70
 
.PP
71
 
Once pvm_recv returns, the data in the message can be unpacked
72
 
into the user's memory using the unpack routines.
73
 
 
74
 
.SH EXAMPLE
75
 
.nf
76
 
[b, info, msgtid, tag] = pvm_recv(pvm_parent(),100)
77
 
g = pvm_recv(pvm_parent(),200)
78
 
 
79
 
.fi
80
 
.SH SEE ALSO
81
 
pvm_send, pvm_bcast