SETOPT(3PVM)
π SETOPT(3PVM) π
ok bestie, sit down, hydrate, because we're about to read the manual page for pvm_setopt β that's the libpvm options setter, from PVM Version 3.4 π¦ no cap, it's a whole vibe.
πΈ NAME πΈ
pvm_setopt β sets libpvm options. that's it. that's the whole name section. iconic π
β¨ SYNOPSIS β¨
C girlies:
int oldval = pvm_setopt( int what, int val )
Fortran besties:
call pvmfsetopt( what, val, oldval )
π PARAMETERS π
whatβ an integer that defines what you're setting, queen. it's one of these twenty-five beauties:PvmRoute1β message routing policyPvmDebugMask2β libpvm debug maskPvmAutoErr3β auto error reportingPvmOutputTid4β stdout destination for childrenPvmOutputCode5β output message tag for childrenPvmTraceTid6β trace data destination for childrenPvmTraceCode7β trace message tag for childrenPvmTraceBuffer8β trace buffer size for childrenPvmTraceOptions9β trace collection options for childrenPvmFragSize10β message fragment sizePvmResvTids11β allow messages to reserved tags and TIDsPvmSelfOutputTid12β stdout destinationPvmSelfOutputCode13β output message tagPvmSelfTraceTid14β trace data destinationPvmSelfTraceCode15β trace message tagPvmSelfTraceBuffer16β trace buffer sizePvmSelfTraceOptions17β trace collection optionsPvmShowTids18βpvm_catchoutprints task ids with outputPvmPollType19β message wait policy (shared memory)PvmPollTime20β message spinwait durationPvmOutputContext21β output message context for childrenPvmTraceContext22β trace message context for childrenPvmSelfOutputContext23β output message contextPvmSelfTraceContext24β trace message contextPvmNoReset25β do not kill task on reset
valβ integer, the new setting for the option. the pre-set glow-ups are:- for
PvmRoute:PvmDontRoute1β don't request or grant connectionsPvmAllowDirect2β (default) don't request but allowPvmRouteDirect3β request and allow connections
- for
PvmTraceOptions:PvmTraceFull1β (default) do full trace eventsPvmTraceTime2β only do PVM routine timingsPvmTraceCount3β only do PVM routine profiling (call counts)
- for
PvmPollType:PvmPollConstant1β spin on its message queuePvmPollSleep2β poll the message queuePvmPollTimetimes
- for
oldvalβ integer that hands you back the previous setting of the option. it's giving receipts π§Ύβ¨
π DESCRIPTION π
the routine pvm_setopt is a general purpose function β a total main character β used to set miscellaneous options in the PVM library. and what is one of these:
PvmRoute
advises PVM on whether to set up direct task-to-task links PvmRouteDirect (using TCP) for all subsequent communication. once a link is established it persists until the application finishes, fr fr. if a direct link can not be established because one of the two tasks has requested PvmDontRoute, or because adequate resources aren't available, then the default route through the PVM daemons is used. on multiprocessors such as Intel Paragon this option is ignored, because the communication between tasks on these machines always uses the native protocol for direct communication. pvm_setopt can be called multiple times to selectively establish direct links, but is typically set only once near the beginning of each task. PvmAllowDirect is the default route setting. this setting on task A allows other tasks to set up direct links to A. once a direct link is established between tasks, both tasks will use it for sending messages. π€
PvmDebugMask
when debugging is turned on, PVM will log detailed information about its operations and progress on its stderr stream. val is the debugging level. default is not to print any debug information. (she's quiet. she's mysterious. π)
PvmAutoErr
when an error results from a libpvm function call and PvmAutoErr is set to 1 (the default), an error message is automatically printed on stderr. a setting of 0 disables this. a setting of 2 causes the library to terminate the task by calling exit() after printing the error message. a setting of 3 causes the library to abort after printing the error message. π
PvmOutputTid
sets the stdout destination for children tasks (spawned after the call to pvm_setopt). everything printed on the standard output of tasks spawned by the calling task is packed into messages and sent to the destination. val is the TID of a PVM task. setting PvmOutputTid to 0 redirects stdout to the master pvmd, which writes to the log file /tmp/pvml.<uid> The default setting is inherited from the parent task, else is 0.
PvmOutputCode
sets the message tag for standard output messages. should only be set when a task has PvmOutputTid set to itself.
PvmTraceTid
sets the trace data message destination for children tasks (spawned after the call to pvm_setopt). libpvm trace data is sent as messages to the destination. val is the TID of a PVM task. setting PvmTraceTid to 0 discards trace data. the default setting is inherited from the parent task, else is 0.
PvmTraceCode
sets the message tag for trace data messages. should only be set when a task has PvmTraceTid set to itself.
PvmTraceBuffer
sets the trace buffer size for trace event collection (in bytes). rather than send a separate message for each trace event, the events are written to a message buffer until the buffer reaches PvmTraceBuffer bytes. then a single large trace message is sent. this can greatly reduce tracing intrusion. make sure you call pvm_exit() in your tasks to flush the trace buffer! π¨
PvmTraceOptions
sets the PVM built-in tracing options. this is useful for custom trace collection tools to allow analysis of library routine execution times and invocation counts. by default, tracing with PvmTraceFull produces full trace events with calling arguments and return values. using PvmTraceTime produces total time spent executing each library routine. the PvmTraceCount option keep only a count of the number of times each routine was called.
PvmFragSize
Val specifies the message fragment size in bytes. default value varies with host architecture.
PvmResvTids
a val of 1 enables the task to send messages with reserved tags and to non-task destinations. the default (0) causes libpvm to generate a PvmBadParam error when a reserved identifier is specified. π
PvmSelfOutputTid
sets the stdout destination for the calling task. everything printed on stdout is packed into messages and sent to the destination. Note: this only works for spawned tasks, because the pvmd doesn't get the output from tasks started by other means. val is the TID of a PVM task. setting PvmSelfOutputTid to 0 redirects stdout to the master pvmd, which writes to the log file /tmp/pvml.<uid>. the default setting is inherited from the parent task, else is 0. setting either PvmSelfOutputTid or PvmSelfOutputCode also causes both PvmOutputTid and PvmOutputCode to take on the values of PvmSelfOutputTid and PvmSelfOutputCode, respectively. (they're a package deal, bestie π)
PvmSelfOutputCode
sets the message tag for standard output messages.
PvmSelfTraceTid
sets the trace data message destination for the calling task. libpvm trace data is sent as messages to the destination. val is the TID of a PVM task. setting PvmSelfTraceTid to 0 discards trace data. the default setting is inherited from the parent task, else is 0. setting either PvmSelfTraceTid or PvmSelfTraceCode also causes both PvmTraceTid and PvmTraceCode to take on the values of PvmSelfTraceTid and PvmSelfTraceCode, respectively.
PvmSelfTraceCode
sets the message tag for trace data messages.
PvmSelfTraceBuffer
sets the trace buffer size for trace event collection (in bytes).
PvmSelfTraceOptions
sets the PVM built-in tracing options for the calling task (see PvmTraceOptions).
PvmShowTids
if true (nonzero), pvm_catchout tags each line of output printed by a child task with the task id. otherwise, output is exactly as printed. π
PvmPollType
sets the message wait policy when using shared-memory message transport. setting PvmPollType to PvmPollConstant causes the application to spin on its message queue waiting for a message. setting PvmPollType to PvmPollSleep causes the application to poll the message queue for messages PvmPollTime times before pending on the semaphore.
PvmPollTime
sets the poll count for applications checking their message queue before they pend on the semaphore. this option is ignored if PvmPollType is set to PvmPollConstant. (she said "i'm sitting this one out" π
)
PvmOutputContext
sets the message context for output collection messages from children.
PvmTraceContext
sets the message context for trace data messages from children.
PvmSelfOutputContext
sets the message context for output collection from the calling task.
PvmSelfTraceContext
sets the message context for trace data messages from the calling task.
PvmNoReset
when set true (non-zero integer value) informs PVM *not* to kill off the calling task when performing a "reset" command, such as issued by the "pvm" console. β¨
pvm_setopt returns the previous value of the option. if an error occurs, the PVM error code is returned in place of the option value. so like, check that return value, okay? π
π EXAMPLES π
C besties:
oldval = pvm_setopt( PvmRoute, PvmRouteDirect );
Fortran besties:
CALL PVMFSETOPT( PVMAUTOERR, 1, OLDVAL )
π ERRORS π
this error condition can be returned:
PvmBadParamβ giving an invalid value. (bestie you gave her the wrong number π)
π¦ SEE ALSO π¦
pvm_getopt(3PVM)
and that's the whole page, bestie β no cap, you're now certified in libpvm option-setting ππ this iconic little number was dated 4 April, 1994, and yes, she ate. periodt. πβ¨
π¦ 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