BCAST(3PVM)
π BCAST(3PVM) β the pvm_bcast glow-up
okay bestie, welcome to PVM Version 3.4, where we broadcast messages to whole friend groups at once π this page is all about pvm_bcast from section 3 of the PVM manual, and yes, it slays.
β¨ NAME β¨
pvm_bcast β broadcasts the data in the active message buffer to a group of processes. it's giving "group chat announcement" energy π£
π¦ SYNOPSIS π¦
C:
int info = pvm_bcast( char *group, int msgtag )
Fortran:
call pvmfbcast( group, msgtag, info )
π PARAMETERS π
groupβ a character string, the group name of an existing group. like, the group has to actually exist, bestie, we can't just make one up on the spot πmsgtagβ an integer message tag that you supply. it should be>= 0. it's how your program tells different kinds of messages apart, iykyk.infoβ integer status code returned by the routine. values less than zero mean something went wrong π
π DESCRIPTION π
So pvm_bcast broadcasts a message that's chillin' in the active send buffer to all the members of group. And here's the tea: in PVM 3.2 and later, the broadcast message is not sent back to the sender. periodt.
Any PVM task can call pvm_bcast() β it does not need to be a member of the group. main character energy honestly, just showing up uninvited but it's fine β¨. The content of the message can be distinguished by msgtag. If pvm_bcast is successful, info will be 0. If some error occurs then info will be < 0.
pvm_bcast is asynchronous. 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 a matching receive is executed by all the receiving processors. so likeβ¦ async is the "sent, moving on, no waiting around" vibe, and sync is the "not leaving until everyone replies" vibe. we stan async π
pvm_bcast first determines the tids of the group members by checking a group data base. A multicast is performed to these tids. If the group is changed during a broadcast, the change will not be reflected in the broadcast. So no, you can't sneak-edit the roster mid-announcement π«Ά
heads up bestie: 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_bcast may not be an efficient communication method on some multiprocessors. not a bug, just the way it is π
π EXAMPLES π
C:
info = pvm_initsend( PvmDataRaw );
info = pvm_pkint( array, 10, 1 );
msgtag = 5 ;
info = pvm_bcast( "worker", msgtag );
Fortran:
CALL PVMFINITSEND( PVMDEFAULT )
CALL PVMFPKFLOAT( DATA, 100, 1, INFO )
CALL PVMFBCAST( 'worker', 5, INFO )
π ERRORS π
These error conditions can be returned by pvm_bcast:
PvmSysErrβpvmdwas not started or has crashed. rip, the daemon ghosted us π»PvmBadParamβ giving a negativemsgtag. bestie. it literally said>= 0πPvmNoGroupβ giving a non-existent group name. you can't broadcast to a group that isn't group-ing π
π SEE ALSO π
pvm_joingroup(3PVM)β go read it, it's the prequel, fr fr
okay that's the whole page, no cap π this was PVM Version 3.4 manual page BCAST(3PVM), dated 30 August, 1993 β vintage but iconic, and she still ate πΈπ¦β¨
π¦ 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