RECV(3PVM)
β¨ NAME β¨
omg hi bestie, welcome to RECV(3PVM) β the manual page for pvm_recv from PVM Version 3.4. It's giving "receive a message" and honestly? iconic. π
pvm_recv - Receive a message. That's the whole NAME section, periodt. π
π¦ SYNOPSIS π¦
C int bufid = pvm_recv( int tid, int msgtag )
Fortran call pvmfrecv( tid, msgtag, bufid )
π PARAMETERS π
tidβ Integer task identifier of sending process supplied by the user. Like, who sent this?tidknows. πmsgtagβ Integer message tag supplied by the user.msgtagshould be>= 0. (The wildcard-1lore is coming, don't worry. π¦)bufidβ Integer returns the value of the new active receive buffer identifier. Values less than zero indicate an error. So ifbufidis negative, it's not slay, it's a problem. π
π DESCRIPTION π
Okay so pvm_recv is the moment you block your process until a message with label msgtag has arrived from tid. Then it places that message in a new active receive buffer, and that also clears the current receive buffer. New buffer, who dis? β¨
A -1 in msgtag or tid matches anything. This gives you these options, bestie:
- If
tid = -1andmsgtagis defined by the user, thenpvm_recvwill accept a message from any process which has a matchingmsgtag. π«Ά - If
msgtag = -1andtidis defined by the user, thenpvm_recvwill accept any message that is sent from processtid. π - If
tid = -1andmsgtag = -1, thenpvm_recvwill accept any message from any process. Wildcard chaos, but make it correct. π
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. Moreover, if both messages arrive before task 2 does a receive, then a wildcard receive will always return message A. The queue is queued. π
If pvm_recv is successful, bufid will be the value of the new active receive buffer identifier. If some error occurs then bufid will be < 0. Simple as that. π
pvm_recv is blocking, which means the routine waits until a message matching the user specified tid and msgtag values arrives at the local pvmd. If the message has already arrived then pvm_recv returns immediately with the message. So it's not ghosting you, it's literally waiting by the phone. βοΈ
Once pvm_recv returns, the data in the message can be unpacked into the user's memory using the unpack routines. That's your cue to unpack, bestie. π
π EXAMPLES π
C:
tid = pvm_parent();
msgtag = 4 ;
bufid = pvm_recv( tid, msgtag );
info = pvm_upkint( tid_array, 10, 1 );
info = pvm_upkint( problem_size, 1, 1 );
info = pvm_upkfloat( input_array, 100, 1 );
Fortran:
CALL PVMFRECV( -1, 4, BUFID )
CALL PVMFUNPACK( INTEGER4, TIDS, 25, 1, INFO )
CALL PVMFUNPACK( REAL8, MATRIX, 100, 100, INFO )
π ERRORS π
These error conditions can be returned by pvm_recv:
PvmBadParamβ giving an invalidtidvalue, ormsgtag < -1. π©PvmSysErrβpvmdnot responding. π
π₯ SEE ALSO π₯
pvm_bufinfo(3PVM)pvm_getminfo(3PVM)pvm_nrecv(3PVM)pvm_unpack(3PVM)pvm_probe(3PVM)pvm_send(3PVM)pvm_mcast(3PVM)
mwah π that's the whole RECV(3PVM) manual page, bestie β from PVM Version 3.4, dated 30 August, 1993, and yes, it's still giving main character energy. bye π«Ά
π¦ 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