SEND(3PVM)

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

✨ SEND(3PVM) ✨

okay bestie, this is pvm_send from PVM Version 3.4 β€” the "just yeet it over there right now" function πŸ’Œ and honestly? she's iconic.


πŸŽ€ NAME πŸŽ€

pvm_send β€” immediately sends the data in the active message buffer. no waiting, no queuing up your feelings, we are SENDING. πŸ’…


🌸 SYNOPSIS 🌸

C girlies:

int info = pvm_send( int tid, int msgtag )

Fortran girlies:

call pvmfsend( tid, msgtag, info )

πŸ¦‹ PARAMETERS πŸ¦‹

  • tid β€” Integer task identifier of the destination process. who we're sending to, fr fr. πŸ“¬
  • msgtag β€” Integer message tag supplied by the user. msgtag should be >= 0. this is the little label you slap on your message so the receiver knows what's what 🏷️
  • info β€” Integer status code returned by the routine. she tells you how it went πŸ’β€β™€οΈ

πŸ’– DESCRIPTION πŸ’–

The routine pvm_send sends a message stored in the active send buffer to the PVM process identified by tid. The msgtag is used to label the content of the message. If pvm_send is successful, info will be 0. If some error occurs then info will be < 0. so like, zero is the slay outcome, negative is the 😭 outcome.

The pvm_send routine is asynchronous. Computation on the sending processor resumes as soon as the message is safely on its way to the receiving processor. 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. so basically pvm_send is the friend who's like "okay I texted them, my job here is done, moving on" ✌️ instead of the friend who stands there watching the typing bubble until it's read πŸ’€

The PVM model guarantees the following about message order β€” and this part is important, no cap:

  • If task 1 sends message A to task 2, then task 1 sends message B to task 2, message A will arrive at task 2 before message B. order is preserved, bestie. the universe respects the queue 🧚
  • Moreover, if both messages arrive before task 2 does a receive, then a wildcard receive will always return message A.
⚠️ 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. like, do NOT just dip mid-sentence, finish your thought first bestie 😭

⭐ EXAMPLES ⭐

C:

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

Fortran:

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

see how it's just init β†’ pack β†’ send? a whole little routine. she's got a process 🫢


πŸ’€ ERRORS πŸ’€

These error conditions can be returned by pvm_send:

  • PvmBadParam β€” giving an invalid tid or a msgtag. you handed her something she cannot work with, bestie πŸ™ˆ
  • PvmSysErr β€” pvmd not responding. the daemon is ghosting you πŸ‘»
  • PvmNoBuf β€” no active send buffer. Try pvm_initsend() before send. there's literally nothing to send, you forgot to set up the vibe first 😭

🌈 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 one's from the PVM Version 3.4 era, dated 30 August, 1993 β€” so yeah, she's vintage, but vintage is literally just classic and classic never goes out of style. sending you good info == 0 vibes only βœ¨πŸŽ€πŸ’…

πŸ“¦ where this page comes from