1MCAST(3PVM) PVM Version 3.4 MCAST(3PVM)
2
3
4
6 pvm_mcast - Multicasts the data in the active message buffer to a set
7 of tasks.
8
9
11 C int info = pvm_mcast( int *tids, int ntask, int msgtag )
12
13 Fortran call pvmfmcast( ntask, tids, msgtag, info )
14
15
17 ntask Integer specifying the number of tasks to be sent to.
18
19 tids Integer array of length ntask containing the task IDs of the
20 tasks to be sent to.
21
22 msgtag Integer message tag supplied by the user. msgtag should be >=
23 0. It allows the user's program to distinguish between differ‐
24 ent kinds of messages .
25
26 info Integer status code returned by the routine. Values less than
27 zero indicate an error.
28
29
31 The routine pvm_mcast multicasts a message stored in the active send
32 buffer to ntask tasks specified in the tids array. The message is not
33 sent to the caller even if listed in the array of tids. The content of
34 the message can be distinguished by msgtag. If pvm_mcast is success‐
35 ful, info will be 0. If some error occurs then info will be < 0.
36
37 The receiving processes can call either pvm_recv or pvm_nrecv to
38 receive their copy of the multicast. pvm_mcast is asynchronous and
39 based on a minimum spanning tree algorithm between the pvmds. Computa‐
40 tion on the sending processor resumes as soon as the message is safely
41 on its way to the receiving processors. This is in contrast to syn‐
42 chronous communication, during which computation on the sending proces‐
43 sor halts until the matching receive is executed by the receiving pro‐
44 cessor.
45
46 pvm_mcast first determines which other pvmds contain the specified
47 tasks. Then passes the message to these pvmds which in turn distribute
48 the message to their local tasks without further network traffic.
49
50 Multicasting is not supported by most multiprocessor vendors. Typi‐
51 cally their native calls only support broadcasting to {\m all the
52 user's processes on a multiprocessor. Because of this omission,
53 pvm_mcast may not be an efficient communication method on some multi‐
54 processors except in the special case of broadcasting to all PVM pro‐
55 cesses.
56
57
59 C:
60 info = pvm_initsend( PvmDataRaw );
61 info = pvm_pkint( array, 10, 1 );
62 msgtag = 5 ;
63 info = pvm_mcast( tids, ntask, msgtag );
64
65 Fortran:
66 CALL PVMFINITSEND(PVMDEFAULT)
67 CALL PVMFPACK( REAL4, DATA, 100, 1, INFO )
68 CALL PVMFMCAST( NPROC, TIDS, 5, INFO )
69
70
72 These error conditions can be returned by pvm_mcast
73
74 PvmBadParam
75 giving a msgtag < 0.
76
77 PvmSysErr
78 pvmd not responding.
79
80 PvmNoBuf
81 no send buffer.
82
84 pvm_psend(3PVM), pvm_recv(3PVM), pvm_send(3PVM)
85
86
87
88 30 August, 1993 MCAST(3PVM)