BUFINFO(3PVM)

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

πŸ’Œ 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 if PvmDataRaw is 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 wildcard msgtag, 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 wildcard tid and 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 if info is 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