PROBE(3PVM)
π NAME π
pvm_probe β bestie, it literally checks if your message has arrived. that's it, that's the whole job π«Ά
β¨ SYNOPSIS β¨
C:
int bufid = pvm_probe( int tid, int msgtag )
Fortran:
call pvmfprobe( tid, msgtag, bufid )
π PARAMETERS π
tidβ an Integer task identifier for the sending process, and it's supplied by you, the user πmsgtagβ an Integer message tag, also supplied by you. heads up:msgtagshould be>= 0.bufidβ an Integer that returns the value of the new active receive buffer identifier. anything less than zero = an error, no cap.
πΈ DESCRIPTION πΈ
okay so the routine pvm_probe checks whether a message with label msgtag has arrived from tid. if a matching message has arrived, pvm_probe hands you back a buffer identifier in bufid. and the way that you can then use that bufid with pvm_bufinfo to find out stuff about the message, like its source and its length? iconic. π
if the message you asked for has not arrived yet, then pvm_probe comes back with a 0 in bufid. and if some error happens, bufid will be < 0. π
now this is the part where it gets fun β a -1 in msgtag or tid matches anything. literally anything. so that gives you these options, bestie:
- if
tid = -1andmsgtagis defined by the user, thenpvm_probewill accept a message from any process which has a matchingmsgtag⨠- if
msgtag = -1andtidis defined by the user, thenpvm_probewill accept any message that is sent from processtidπ - if
tid = -1andmsgtag = -1, thenpvm_probewill accept any message from any process. wild. π¦
also, pvm_probe can be called multiple times to check if a given message has arrived yet. but here's the thing β after the message has arrived, pvm_recv must be called before the message can be unpacked into your memory using the unpack routines. so don't skip that step, okay? it's giving mandatory. π
π§ EXAMPLES π§
C:
tid = pvm_parent();
msgtag = 4 ;
arrived = pvm_probe( tid, msgtag );
if ( arrived )
info = pvm_bufinfo( arrived, &len, &tag, &tid );
else
/* go do other computing */
Fortran:
CALL PVMFPROBE( -1, 4, ARRIVED )
IF ( ARRIVED .GT. 0 ) THEN
CALL PVMFBUFINFO( ARRIVED, LEN, TAG, TID, INFO )
ELSE
* GO DO USEFUL WORK
ENDIF
π ERRORS π
these error conditions can be returned by pvm_probe. keep them in mind, fr fr.
PvmBadParamβ you gave an invalidtidvalue ormsgtag. πPvmSysErrβpvmdnot responding. it's not ghosting you, it's just... not responding. π
π SEE ALSO π
pvm_bufinfo(3PVM), pvm_getminfo(3PVM), pvm_nrecv(3PVM), pvm_recv(3PVM), pvm_unpack(3PVM)
and that's the whole page, bestie π«Ά this was PVM Version 3.4, dated 30 August, 1993 β yeah she's vintage but she ATE and left no crumbs. periodt. πβ¨π
π¦ 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