BUFINFO(3PVM)
π BUFINFO(3PVM) β the PVM Version 3.4 era, bestie
okay so. you're deep in PVM (that's Parallel Virtual Machine, the whole vibe) and you've got a message buffer just... sitting there. and you're like "who even sent you, how big are you, what's your tag" π bestie. pvm_bufinfo() is the answer. it's the little detective that tells you everything about a message buffer. no cap.
β¨ NAME β¨
pvm_bufinfo() β Returns information about a message buffer. that's it, that's the whole job, and she does it flawlessly. π
π 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, and it's specifying a particular message buffer identifier. like, which buffer are we talking about, bestie, be specific. π―bytesβ an Integer that comes back to you holding the length in bytes of the body of the message. lowkey important: this equals the actual size of the data packed ifPvmDataRawis used β otherwise it may include pad bytes. so don't come for her if the number looks a lil chunky. π«Άmsgtagβ an Integer returning the message label. this one is giving lifesaver energy when the message was received with a wildcardmsgtag, because otherwise you'd have no idea what tag it actually had. π₯tidβ an Integer returning the source of the message. same deal: super useful when the message was received with a wildcardtidand you're sitting there like "who r u". πinfoβ an Integer status code returned by the routine. values less than zero mean an error happened. so ifinfois negative, it's not a vibe. π
π DESCRIPTION π
the routine pvm_bufinfo returns information about the requested message buffer. typically it's used to figure out facts about the last received message β like its size, or where it came from. the way that this is especially useful is when an application is set up to receive any incoming message, and the action it takes depends on the source tid and the msgtag attached to whichever message shows up first. iconic behavior, honestly. π
if pvm_bufinfo is successful, info will be 0. if some error occurs, then info will be < 0. that's the whole mood. β
π 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β the specified buffer does not exist. she's not there. gone. missing. πPvmBadParamβ invalid argument. something you passed in was not it. π
π¦ SEE ALSO π¦
pvm_recv(3PVM) β go read her too, they're besties fr fr. π«Ά
and that's the page, babes π this was PVM Version 3.4, dated 30 August, 1993 β yes she's an elder icon and we respect her, periodt. now 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