SEND(3PVM)
β¨ 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.msgtagshould 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 invalidtidor amsgtag. you handed her something she cannot work with, bestie πPvmSysErrβpvmdnot responding. the daemon is ghosting you π»PvmNoBufβ no active send buffer. Trypvm_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
- 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