BUFINFO(3PVM)

πŸ“¦ version 3.4.6, in debian bookworm, ubuntu jammy

πŸ’– 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 if PvmDataRaw is 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 wildcard msgtag 🌸
  • tid β€” an Integer returning the source of the message. same deal β€” absolute lifesaver when the message was received with a wildcard tid πŸ¦‹
  • 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