1BARRIER(3PVM) PVM Version 3.4 BARRIER(3PVM)
2
3
4
6 pvm_barrier - Blocks the calling process until all processes in a group
7 have called it.
8
9
11 C int info = pvm_barrier( char *group, int count )
12
13 Fortran call pvmfbarrier( group, count, info )
14
15
17 group Character string group name. The group must exist and the call‐
18 ing process must be a member of the group.
19
20 count Integer specifying the number of group members that must call
21 pvm_barrier before they are all released. Though not required,
22 count is expected to be the total number of members of the
23 specified group.
24
25 info Integer status code returned by the routine. Values less than
26 zero indicate an error.
27
28
30 The routine pvm_barrier blocks the calling process until count members
31 of the group have called pvm_barrier. The count argument is required
32 because processes could be joining the given group after other pro‐
33 cesses have called pvm_barrier. Thus PVM doesn't know how many group
34 members to wait for at any given instant. Although count can be set
35 less, it is typically the total number of members of the group. So the
36 logical function of the pvm_barrier call is to provide a group synchro‐
37 nization. During any given barrier call all participating group mem‐
38 bers must call barrier with the same count value. Once a given barrier
39 has been successfully passed, pvm_barrier can be called again by the
40 same group using the same group name.
41
42 If pvm_barrier is successful, info will be 0. If some error occurs then
43 info will be < 0.
44
45
47 C:
48 inum = pvm_joingroup( "worker" );
49 .
50 .
51 info = pvm_barrier( "worker", 5 );
52
53 Fortran:
54 CALL PVMFJOINGROUP( "shakers", INUM )
55 COUNT = 10
56 CALL PVMFBARRIER( "shakers", COUNT, INFO )
57
58
60 These error conditions can be returned by pvm_barrier
61
62 PvmSysErr
63 pvmd was not started or has crashed.
64
65 PvmBadParam
66 giving a count < 1.
67
68 PvmNoGroup
69 giving a non-existent group name.
70
71 PvmNotInGroup
72 calling process is not in specified group.
73
75 pvm_joingroup(3PVM)
76
77
78
79 30 August, 1993 BARRIER(3PVM)