Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pvm_barrier(3pvm) [debian man page]

BARRIER(3PVM)							  PVM Version 3.4						     BARRIER(3PVM)

NAME
pvm_barrier - Blocks the calling process until all processes in a group have called it. SYNOPSIS
C int info = pvm_barrier( char *group, int count ) Fortran call pvmfbarrier( group, count, info ) PARAMETERS
group Character string group name. The group must exist and the calling process must be a member of the group. count Integer specifying the number of group members that must call pvm_barrier before they are all released. Though not required, count is expected to be the total number of members of the specified group. info Integer status code returned by the routine. Values less than zero indicate an error. DESCRIPTION
The routine pvm_barrier blocks the calling process until count members of the group have called pvm_barrier. The count argument is required because processes could be joining the given group after other processes have called pvm_barrier. Thus PVM doesn't know how many group members to wait for at any given instant. Although count can be set less, it is typically the total number of members of the group. So the logical function of the pvm_barrier call is to provide a group synchronization. During any given barrier call all participating group members must call barrier with the same count value. Once a given barrier has been successfully passed, pvm_barrier can be called again by the same group using the same group name. If pvm_barrier is successful, info will be 0. If some error occurs then info will be < 0. EXAMPLES
C: inum = pvm_joingroup( "worker" ); . . info = pvm_barrier( "worker", 5 ); Fortran: CALL PVMFJOINGROUP( "shakers", INUM ) COUNT = 10 CALL PVMFBARRIER( "shakers", COUNT, INFO ) ERRORS
These error conditions can be returned by pvm_barrier PvmSysErr pvmd was not started or has crashed. PvmBadParam giving a count < 1. PvmNoGroup giving a non-existent group name. PvmNotInGroup calling process is not in specified group. SEE ALSO
pvm_joingroup(3PVM) 30 August, 1993 BARRIER(3PVM)

Check Out this Related Man Page

FREEZEGROUP(3PVM)						  PVM Version 3.4						 FREEZEGROUP(3PVM)

NAME
pvm_freezegroup - Freezes dynamic group membership and caches info locally SYNOPSIS
C int info = pvm_freezegroup( char *group , int size) Fortran call pvmffreezegroup( group, size, info ) PARAMETERS
group Character string group name of an existing group. size Size of the group when it is frozen info size of group on success. Values less than 0 indicate and error. DESCRIPTION
The routine pvm_freezegroup makes a dynamic group named group static. The group information is then "cached" by all group members. pvm_freezegroup is a synchronizing routine and must be called by all group members to complete. size indicates the size the dynamic group should be when made static. A value of -1 indicates that the current size of the group should be used. info returns error information. Once a dynamic group has been frozen with pvm_freezegroup , all subsequent operations that can be satisfied with local data use the locally held information. For processes that are outside of the group, the first group call, e.g., pvm_bcast(), will cause the static group infor- mation to be copied to the calling process. Subsequent operations then use the local information. Barriers are still arbitrated by the group server. Group members should call pvm_lvgroup to leave the group and free any allocated structures that hold the group information. Processes not in the group may call pvm_lvgroup to free any locally allocated structures. In this case, an error code of PvmNotInGroup or PvmNoGroup will be returned to the caller. Barrier are always arbitrated by the group server, even if the group has been made static with pvm_freezegroup. If a process leaves a static group while other process are waiting at a barrier, then PvmNoGroup is returned to all processes waiting at the barrier. Future barrier calls with the defunct static group, return the same error. EXAMPLES
C: inum = pvm_joingroup("worker"); info = pvm_freezegroup( "worker", size ); Fortran: CALL PVMFJOINGROUP('group2', inum) CALL PVMFFREEZEGROUP( 'group2', size, info ) ERRORS
These error conditions can be returned by pvm_freezegroup PvmSysErr pvmd was not started or has crashed. PvmBadParam giving a NULL group name. PvmDupGroup trying to freeze a group that is already frozen. PvmNotInGroup trying to freeze a group that you are not in. BUGS
There is no way to unfreeze a group. Processes are not notified if a frozen group becomes invalid. Having a non-member process call pvm_lvgroup to free structures is a bit strange. SEE ALSO
pvm_barrier(3PVM), pvm_lvgroup(3PVM) 16 March 1995 FREEZEGROUP(3PVM)
Man Page