1PROBE(3PVM) PVM Version 3.4 PROBE(3PVM)
2
3
4
6 pvm_probe - Check if message has arrived.
7
8
10 C int bufid = pvm_probe( int tid, int msgtag )
11
12 Fortran call pvmfprobe( tid, msgtag, bufid )
13
14
16 tid Integer task identifier of sending process supplied by the
17 user.
18
19 msgtag Integer message tag supplied by the user. msgtag should be >=
20 0.
21
22 bufid Integer returning the value of the new active receive buffer
23 identifier. Values less than zero indicate an error.
24
25
27 The routine pvm_probe checks to see if a message with label msgtag has
28 arrived from tid. If a matching message has arrived pvm_probe returns
29 a buffer identifier in bufid. This bufid can be used with pvm_bufinfo
30 to determine information about the message such as its source and
31 length.
32
33 If the requested message has not arrived, then pvm_probe returns with a
34 0 in bufid. If some error occurs bufid will be < 0.
35
36 A -1 in msgtag or tid matches anything. This allows the user the fol‐
37 lowing options. If tid = -1 and msgtag is defined by the user, then
38 pvm_probe will accept a message from any process which has a matching
39 msgtag. If msgtag = -1 and tid is defined by the user, then pvm_probe
40 will accept any message that is sent from process tid. If tid = -1 and
41 msgtag = -1, then pvm_probe will accept any message from any process.
42
43 pvm_probe can be called multiple times to check if a given message has
44 arrived yet. After the message has arrived, pvm_recv must be called
45 before the message can be unpacked into the user's memory using the
46 unpack routines.
47
48
50 C:
51 tid = pvm_parent();
52 msgtag = 4 ;
53 arrived = pvm_probe( tid, msgtag );
54 if ( arrived )
55 info = pvm_bufinfo( arrived, &len, &tag, &tid );
56 else
57 /* go do other computing */
58
59 Fortran:
60 CALL PVMFPROBE( -1, 4, ARRIVED )
61 IF ( ARRIVED .GT. 0 ) THEN
62 CALL PVMFBUFINFO( ARRIVED, LEN, TAG, TID, INFO )
63 ELSE
64 * GO DO USEFUL WORK
65 ENDIF
66
67
69 These error conditions can be returned by pvm_probe.
70
71 PvmBadParam
72 giving an invalid tid value or msgtag.
73
74 PvmSysErr
75 pvmd not responding.
76
78 pvm_bufinfo(3PVM), pvm_getminfo(3PVM), pvm_nrecv(3PVM), pvm_recv(3PVM),
79 pvm_unpack(3PVM)
80
81
82
83 30 August, 1993 PROBE(3PVM)