BCAST(3PVM)

πŸ“¦ version 3.4.6, in debian bookworm, ubuntu jammy

πŸ’Œ 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 β€” pvmd was not started or has crashed. rip, the daemon ghosted us πŸ‘»
  • PvmBadParam β€” giving a negative msgtag. 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