SIBLINGS(3PVM)
π SIBLINGS β the pvm_siblings manual, bestie edition π
okay so this is pvm_siblings from the PVM Version 3.4 manual (the 3PVM girlies know π
). It's a C and Fortran routine and it's genuinely so useful, let me tell you everything, no cap.
β¨ NAME β¨
pvm_siblings β returns the number and the associated task ids of processes that were started together in a single spawn call. yes bestie, the whole friend group π«Ά
πΈ 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. If this value is less than0, that's an error, bestie πtidsβ a pointer to the array of tids that contains the siblings. Indexed from0to(ntids - 1), okay, zero-indexed, we love that for us.indexβ integer index of the tid to be returned insibling. Ifindexis set to-1, thensiblingis left unchanged. Otherwise, it must be in the range[0, ntids - 1]β colour inside the lines please πsiblingβ whenindexis in the range[0, ntids -1], this contains the tid of the desired index. slay.
π¦ DESCRIPTION π¦
So 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. it's giving synced group chat β¨
pvm_siblings uses local storage to keep the list of tids and does not update this list when sibling tasks exit the virtual machine. So it's a snapshot, not a live feed, iykyk.
The FORTRAN version lets 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. periodt.
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 a 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()
main character energy, honestly π
π 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 the index is invalid. yeah that one's on you bestie π
π₯ SEE ALSO π₯
pvm_spawn(3PVM), pvm_mytid(3PVM), pvm_parent(3PVM)
go read those too, they're literally the rest of the friend group π
k that's the whole page, mwah π this one's from PVM Version 3.4, dated 26 June, 1997 β vintage but iconic, we stan a timeless classic πβ¨π¦
π¦ where this page comes from
- debian bookworm: pvm-dev 3.4.6-5
- ubuntu jammy: pvm-dev 3.4.6-3.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms