SETMINFO(3PVM)
π SETMINFO(3PVM) π
okay bestie so this one is from the PVM Version 3.4 manual, and it's literally the glow-up guide for message headers π
β¨ NAME β¨
pvm_getminfo, pvm_setminfo β get or set header information of a message. reading the receipt vs. writing the receipt, that's the whole vibe π§Ύβ¨
πΈ SYNOPSIS πΈ
C int info = pvm_getminfo( int bufid, struct pvmminfo *mi )
int info = pvm_setminfo( int bufid, struct pvmminfo *mi )
Fortran call pvmfgetminfo( bufid, len, ctx, tag, wid, enc, crc,
src, dst, info )
call pvmfsetminfo( bufid, ctx, tag, wid, src, dst, info )
so C gets the cute little struct, and Fortran gets the whole laundry list of arguments. both are valid. both ate. π
π¦ PARAMETERS π¦
bufidβ the message buffer identifier. it's giving "which message are we even talking about" β¨miβ the struct that's holding all the header info, like a little handbag of metadata πinfoβ result code. the "how did it go" receipt π«Ά- For a description of the Fortran parameters, see below. (yes queen, keep scrolling, they're all listed in the DESCRIPTION π)
π DESCRIPTION π
These functions read and set information passed in message headers, which may be of interest to certain applications. Typically, they will be used when it is necessary to get the message context or wait id to use the same values in a reply message. (translation: you're replying to someone and you need to match their energy exactly β same context, same wait id, no cap π)
The fields affected are:
lenβ The length in bytes of the body of the message. This will be equal to the actual size of the data packed, ifPvmDataRawis used, otherwise it may include pad bytes. so like, the true size of the fit unless there's padding sneaking in πctxβ The context sent with the message.tagβ The tag sent with the message.widβ Wait Identifier, used to match a reply message to the corresponding request. this is the main character of reply-matching ngl πencβ Message Encoding, either the data signature of the sender, or0x10000000for XDR.crcβ The CRC checksum of the message body. the vibe check, but mathematically rigorous βsrcβ The tid of the sender.dstβ The tid of the destination.
All fields may be read, but only ctx, tag, wid, src and dst may be set.
not me readinglen,encandcrcand then trying to write them back π bestie you can look but you cannot touch, those three are read-only, periodt.
pvm_getmwid and pvm_setmwid return PvmOk if successful, or else a negative error code.
π EXAMPLES π
/* return a message to a caller with the same tag and wait id */
struct pvmminfo mi1, mi2;
pvm_recv(-1, -1);
/* ... process, compose reply message */
pvm_getminfo(pvm_getrbuf(), &mi1);
pvm_getminfo(pvm_getsbuf(), &mi2);
mi2.wid = mi1.wid;
pvm_send(mi1.src, mi1.tag);
see how it grabs the info off the receive buffer, then copies the wid onto the send buffer, and sends it right back to mi1.src with mi1.tag? that's the whole "reply like you remember them" arc and honestly? iconic. π«Άβ¨
π ERRORS π
The following error conditions can be returned by pvm_getmwid or pvm_setmwid:
PvmBadParamβ Invalid value forbufidormiargument. you handed it something cursed, bestie πPvmNoSuchBufβ Message bufferbufiddoesn't exist. ghost buffer. no thoughts, no header, no message π
π SEE ALSO π
pvm_bufinfo(3PVM)β go read that one too, it's the sibling page and it's lowkey essential π
that's the whole page, no notes π huge shoutout to the PVM Version 3.4 girlies and this absolute relic dated 13 March, 1996 β she's vintage, she's valid, she's still compiling. mwah, stay buffered, bestie πβ¨π¦
π¦ 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