MCAST(3PVM)
π MCAST β bestie edition π
ok so you wanna know about pvm_mcast, from PVM Version 3.4? say less. this is the multicast girlie of the PVM family and she's about to send your message to a whole squad of tasks. πβ¨
β¨ NAME β¨
pvm_mcast β Multicasts the data in the active message buffer to a set of tasks.
like. one message. many tasks. one queen, many subjects. π
π¦ SYNOPSIS π¦
C:
int info = pvm_mcast( int *tids, int ntask, int msgtag )
Fortran:
call pvmfmcast( ntask, tids, msgtag, info )
π PARAMETERS π
ntaskβ an Integer, bestie, telling you how many tasks you're sending to. the count. the number. the vibe. β¨tidsβ an Integer array of lengthntaskholding the task IDs of the tasks you're sending to. that's your guest list. πmsgtagβ an Integer message tag you supply. it should be>= 0. it lets your program tell different kinds of messages apart. yes it's basically a name tag at a party. π·οΈinfoβ the Integer status code the routine hands back. anything less than zero means something went wrong. π
π DESCRIPTION π
pvm_mcast multicasts a message sitting in the active send buffer out to ntask tasks, the ones named in the tids array. lowkey important: the message is NOT sent to the caller, even if the caller's own tid is chillin' in that array. you're the host, not a guest, bestie. π«Ά
the content of the message can be distinguished by msgtag. if pvm_mcast is successful, info will be 0. if some error occurs then info will be < 0. periodt.
the receiving processes can call either pvm_recv or pvm_nrecv to receive their copy of the multicast. π―
pvm_mcast is asynchronous and it's based on a minimum spanning tree algorithm between the pvmds β yes, it's giving efficient tree energy, no cap. π³ 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. one of these waits for a text back, the other doesn't. π
here's the actual mechanics: pvm_mcast first determines which other pvmds contain the specified tasks. then it passes the message to these pvmds, which in turn distribute the message to their local tasks without further network traffic. iconic behavior honestly. π₯
β οΈ real talk: multicasting is not supported by most multiprocessor vendors. typically their native calls only support broadcasting to 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. so know your hardware, bestie. π
πΈ 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β you gave amsgtag < 0. girl. no. πPvmSysErrβ pvmd not responding. she's ghosting you. π»PvmNoBufβ no send buffer. nothing to send, nowhere to be. π«
π₯ SEE ALSO π₯
pvm_psend(3PVM)pvm_recv(3PVM)pvm_send(3PVM)
and that's the whole page, bestie!! π this little legend is dated 30 August, 1993, and it comes to you straight from PVM Version 3.4 β yes she's vintage, yes she still slays, we stan a legacy queen. πππ¦β¨
π¦ 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