|
NAMEpvm_siblings - return the number and associated task ids of processes that were started together in a single spawn call.SYNOPSISC int ntids = pvm_siblings( int **tids ) PARAMETERS
DESCRIPTIONThe 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, programs 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() EXAMPLESC: 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)) ERRORSpvm_siblings can return the following error codes
SEE ALSOpvm_spawn(3PVM), pvm_mytid(3PVM), pvm_parent(3PVM)
Visit the GSP FreeBSD Man Page Interface. |