SEND(3PVM)

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

πŸ’Œ SEND(3PVM) β€” pvm_send, bestie edition

okay so like, welcome to the PVM Version 3.4 girlies' guide to pvm_send πŸ’… this is a 3PVM manual page and we're gonna read it together, no cap.


✨ NAME ✨

pvm_send β€” sends the data in the active message buffer. Immediately. Not later, not eventually, immediately. it's giving "no thoughts, just vibes, message is already gone" πŸ¦‹


🌸 SYNOPSIS 🌸

C:

int info = pvm_send( int tid, int msgtag )

Fortran:

call pvmfsend( tid, msgtag, info )

πŸŽ€ PARAMETERS πŸŽ€

  • tid β€” integer task identifier of the destination process. i.e. who you're sending this to 🫢
  • msgtag β€” integer message tag supplied by the user. lowkey important: msgtag should be >= 0 ⭐
  • info β€” integer status code that the routine hands back to you. the receipts, basically πŸ’–

πŸ‘‘ DESCRIPTION πŸ‘‘

so the routine pvm_send sends a message that's stored in the active send buffer over to the PVM process identified by tid. and msgtag? that's the little label you slap on the message content so everyone knows what's in it 🏷️

if pvm_send slays (aka succeeds), info will be 0. if some error happens, then info will be < 0. simple as that, bestie 😭

now, the tea: pvm_send is asynchronous β˜• computation on the sending processor picks right back up as soon as the message is safely on its way to the receiving processor. this is in contrast to synchronous communication, where computation on the sending processor just sits there halted until the matching receive is executed by the receiving processor. one of these is main character energy, one of these is waiting in line πŸ™ˆ

the PVM model guarantees the following about message order, and this is important so listen up πŸ‘‚ if task 1 sends message A to task 2, then task 1 sends message B to task 2, then message A will arrive at task 2 before message B. periodt. moreover, if both messages arrive before task 2 does a receive, then a wildcard receive will always return message A. the queue does not play games πŸ’€

⚠️ okay real talk, this part matters: terminating a PVM task immediately after sending a message or messages from it may result in those messages being lost. to be sure, always call pvm_exit() before stopping. do not skip this. do not be cute about it. call pvm_exit() 🚨

🌈 EXAMPLES 🌈

C, iconic:

info = pvm_initsend( PvmDataDefault );
info = pvm_pkint( array, 10, 1 );
msgtag = 3 ;
info = pvm_send( tid, msgtag );

Fortran, also iconic:

CALL PVMFINITSEND(PVMRAW, INFO)
CALL PVMFPACK( REAL8, DATA, 100, 1, INFO )
CALL PVMFSEND( TID, 3, INFO )

πŸ’€ ERRORS πŸ’€

these error conditions can be returned by pvm_send, and yes we're listing all of them:

  • PvmBadParam β€” you gave an invalid tid or a msgtag. ngl, that's on you πŸ“
  • PvmSysErr β€” pvmd not responding. it's ghosting you 😭
  • PvmNoBuf β€” no active send buffer. try pvm_initsend() before send 🧚

πŸ”₯ SEE ALSO πŸ”₯

pvm_initsend(3PVM), pvm_mcast(3PVM), pvm_pack(3PVM), pvm_psend(3PVM), pvm_recv(3PVM)


and that's the whole page, bestie ✨ this was PVM Version 3.4, dated 30 August, 1993 β€” yes she's an elder but she still ate πŸ’… mwah, go call pvm_exit() 🫢

πŸ“¦ where this page comes from