Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pvmfsiblings(3pvm) [debian man page]

SIBLINGS(3PVM)							  PVM Version 3.4						    SIBLINGS(3PVM)

NAME
pvm_siblings - return the number and associated task ids of processes that were started together in a single spawn call. SYNOPSIS
C int ntids = pvm_siblings( int **tids ) Fortran call pvmfsiblings( ntids, index, sibling ) PARAMETERS
ntids Returns the number of tids that were spawned together. Value less than 0 indicates an error. tids Pointer to the array of tids that contains the siblings. Indexed from 0 to (ntids - 1) index Integer index of tid to be returned in sibling. If index is set to -1, then sibling is unchanged. Otherwise, must be in the range [0, ntids - 1] sibling When index is in the range [0, ntids -1], this contains the tid of the desired index. DESCRIPTION
The routine pvm_siblings returns the number of tasks and a list of task ids of processes that were spawned together in a single spawn call. The spawning task multicasts the list of successful to the spawned tasks so that each task has an identical copy of the sibling list. pvm_siblings uses local storage to keep the list of tids and does not update this list when sibling tasks exit the virtual machine. The FORTRAN version allows calling programs read a particular index in the internal sibling array. If pvm_siblings is successful, ntids will be > 0. If some error occurs then ntids will be < 0. pvm_siblings is designed to simplify the logic in static spmd-style programs. By giving tasks an identical list of tids and its size, pro- grams may self size and treat the sibling as static map between instances and tasks. The internal list is not updated when sibling tasks exit the virtual machine and should be treated as a snapshot of the parallel program when it was first started. If a task was started by pvm_spawn, then pvm_siblings will return ntids = 1 and ntids = 1 and tids will contain a single entry identical to the task id returned by pvm_mytid() EXAMPLES
C: int *tids; ntids = pvm_siblings(&tids); Fortran: INTEGER TIDS(0:MAXNPROC) CALL PVMFSIBLINGS(NTIDS, -1, IDUM) DO I = 0, NTIDS-1 CALL PVMFSIBLINGS(NTIDS, I, TIDS(I)) ERRORS
pvm_siblings can return the following error codes PvmNoTask No task at that index, or index is invalid. SEE ALSO
pvm_spawn(3PVM), pvm_mytid(3PVM), pvm_parent(3PVM) 26 June, 1997 SIBLINGS(3PVM)

Check Out this Related Man Page

MCAST(3PVM)							  PVM Version 3.4						       MCAST(3PVM)

NAME
pvm_mcast - Multicasts the data in the active message buffer to a set of tasks. SYNOPSIS
C int info = pvm_mcast( int *tids, int ntask, int msgtag ) Fortran call pvmfmcast( ntask, tids, msgtag, info ) PARAMETERS
ntask Integer specifying the number of tasks to be sent to. tids Integer array of length ntask containing the task IDs of the tasks to be sent to. msgtag Integer message tag supplied by the user. msgtag should be >= 0. It allows the user's program to distinguish between different kinds of messages . info Integer status code returned by the routine. Values less than zero indicate an error. DESCRIPTION
The routine pvm_mcast multicasts a message stored in the active send buffer to ntask tasks specified in the tids array. The message is not sent to the caller even if listed in the array of tids. The content of the message can be distinguished by msgtag. If pvm_mcast is suc- cessful, info will be 0. If some error occurs then info will be < 0. The receiving processes can call either pvm_recv or pvm_nrecv to receive their copy of the multicast. pvm_mcast is asynchronous and based on a minimum spanning tree algorithm between the pvmds. Computation on the sending processor resumes as soon as the message is safely on its way to the receiving processors. This is in contrast to synchronous communication, during which computation on the sending processor halts until the matching receive is executed by the receiving processor. pvm_mcast first determines which other pvmds contain the specified tasks. Then passes the message to these pvmds which in turn distribute the message to their local tasks without further network traffic. Multicasting is not supported by most multiprocessor vendors. Typically their native calls only support broadcasting to {m all the user's processes on a multiprocessor. Because of this omission, pvm_mcast may not be an efficient communication method on some multiprocessors except in the special case of broadcasting to all PVM processes. EXAMPLES
C: info = pvm_initsend( PvmDataRaw ); info = pvm_pkint( array, 10, 1 ); msgtag = 5 ; info = pvm_mcast( tids, ntask, msgtag ); Fortran: CALL PVMFINITSEND(PVMDEFAULT) CALL PVMFPACK( REAL4, DATA, 100, 1, INFO ) CALL PVMFMCAST( NPROC, TIDS, 5, INFO ) ERRORS
These error conditions can be returned by pvm_mcast PvmBadParam giving a msgtag < 0. PvmSysErr pvmd not responding. PvmNoBuf no send buffer. SEE ALSO
pvm_psend(3PVM), pvm_recv(3PVM), pvm_send(3PVM) 30 August, 1993 MCAST(3PVM)
Man Page