BUFINFO(3PVM)
π BUFINFO(3PVM) β or, how to snoop on your message buffers (lovingly) π
okay bestie, so this is a page from PVM Version 3.4, and it's all about pvm_bufinfo(). no cap, it's lowkey one of the most useful little gremlins in the whole PVM toolbox. let's get into it π«Ά
β¨ NAME β¨
pvm_bufinfo() β returns information about a message buffer. it's giving detective energy, fr fr π
β¨ SYNOPSIS β¨
C int info = pvm_bufinfo( int bufid, int *bytes, int *msgtag,
int *tid )
Fortran call pvmfbufinfo( bufid, bytes, msgtag, tid, info )
β¨ PARAMETERS β¨
bufidβ an Integer that says which message buffer identifier we're talking about. it's the specific one, the main character πbytesβ an Integer that comes back with the length in bytes of the body of the message. heads up though: this equals the actual size of the data packed ifPvmDataRawis used β otherwise it may include pad bytes. so like, don't be shocked if it's a lil extra πmsgtagβ an Integer returning the message label. this one's your bestie when the message was received with a wildcardmsgtagπΈtidβ an Integer returning the source of the message. same deal β absolute lifesaver when the message was received with a wildcardtidπ¦infoβ the Integer status code the routine hands back. anything less than zero means error, so if you see that, it's not slaying π
β¨ DESCRIPTION β¨
so, pvm_bufinfo returns information about the requested message buffer. typically you use it to figure out facts about the last received message β like its size, or where it came from. and honestly? pvm_bufinfo is especially useful when your application is set up to receive any incoming message, and whatever it does next depends on the source tid and the msgtag attached to whichever message shows up first. it's like reading the vibe check before you decide how to act π
if pvm_bufinfo is successful, info will be 0. if some error occurs then info will be < 0. periodt.
β¨ EXAMPLES β¨
C:
bufid = pvm_recv( -1, -1 );
info = pvm_bufinfo( bufid, &bytes, &type, &source );
Fortran:
CALL PVMFRECV( -1, -1, BUFID )
CALL PVMFBUFINFO( BUFID, BYTES, TYPE, SOURCE, INFO )
β¨ ERRORS β¨
this error condition can be returned by pvm_bufinfo:
PvmNoSuchBufβ specified buffer does not exist. it's gone, babe, nowhere to be found πPvmBadParamβ invalid argument. ngl that one's on you π
β¨ SEE ALSO β¨
pvm_recv(3PVM)
okay that's the whole page, no skips, no crumbs left behind π
and that's a wrap, bestie β this one's from PVM Version 3.4, dated 30 August, 1993, and it ate, fr fr. go forth and inspect those buffers πβ¨π
π¦ 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