1BCAST(3PVM) PVM Version 3.4 BCAST(3PVM)
2
3
4
6 pvm_bcast - Broadcasts the data in the active message buffer to a group
7 of processes.
8
9
11 C int info = pvm_bcast( char *group, int msgtag )
12
13 Fortran call pvmfbcast( group, msgtag, info )
14
15
17 group Character string group name of an existing group.
18
19 msgtag Integer message tag supplied by the user. msgtag should be >=
20 0. It allows the user's program to distinguish between differ‐
21 ent kinds of messages .
22 info integer status code returned by the routine. Values less
23 than zero indicate an error.
24
25
27 The routine pvm_bcast broadcasts a message stored in the active send
28 buffer to all the members of group. In PVM 3.2 and later the broadcast
29 message is not sent back to the sender. Any PVM task can call
30 pvm_bcast(), it need not be a member of the group. The content of the
31 message can be distinguished by msgtag. If pvm_bcast is successful,
32 info will be 0. If some error occurs then info will be < 0.
33
34 pvm_bcast is asynchronous. Computation on the sending processor
35 resumes as soon as the message is safely on its way to the receiving
36 processors. This is in contrast to synchronous communication, during
37 which computation on the sending processor halts until a matching
38 receive is executed by all the receiving processors.
39
40 pvm_bcast first determines the tids of the group members by checking a
41 group data base. A multicast is performed to these tids. If the group
42 is changed during a broadcast the change will not be reflected in the
43 broadcast. Multicasting is not supported by most multiprocessor ven‐
44 dors. Typically their native calls only support broadcasting to all
45 the user's processes on a multiprocessor. Because of this omission,
46 pvm_bcast may not be an efficient communication method on some multi‐
47 processors.
48
49
51 C:
52 info = pvm_initsend( PvmDataRaw );
53 info = pvm_pkint( array, 10, 1 );
54 msgtag = 5 ;
55 info = pvm_bcast( "worker", msgtag );
56
57 Fortran:
58 CALL PVMFINITSEND( PVMDEFAULT )
59 CALL PVMFPKFLOAT( DATA, 100, 1, INFO )
60 CALL PVMFBCAST( 'worker', 5, INFO )
61
62
64 These error conditions can be returned by pvm_bcast
65
66 PvmSysErr
67 pvmd was not started or has crashed.
68
69 PvmBadParam
70 giving a negative msgtag.
71
72 PvmNoGroup
73 giving a non-existent group name.
74
76 pvm_joingroup(3PVM)
77
78
79
80 30 August, 1993 BCAST(3PVM)