SETOPT(3PVM)

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

πŸ’– 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:
    • PvmRoute 1 β€” message routing policy
    • PvmDebugMask 2 β€” libpvm debug mask
    • PvmAutoErr 3 β€” auto error reporting
    • PvmOutputTid 4 β€” stdout destination for children
    • PvmOutputCode 5 β€” output message tag for children
    • PvmTraceTid 6 β€” trace data destination for children
    • PvmTraceCode 7 β€” trace message tag for children
    • PvmTraceBuffer 8 β€” trace buffer size for children
    • PvmTraceOptions 9 β€” trace collection options for children
    • PvmFragSize 10 β€” message fragment size
    • PvmResvTids 11 β€” allow messages to reserved tags and TIDs
    • PvmSelfOutputTid 12 β€” stdout destination
    • PvmSelfOutputCode 13 β€” output message tag
    • PvmSelfTraceTid 14 β€” trace data destination
    • PvmSelfTraceCode 15 β€” trace message tag
    • PvmSelfTraceBuffer 16 β€” trace buffer size
    • PvmSelfTraceOptions 17 β€” trace collection options
    • PvmShowTids 18 β€” pvm_catchout prints task ids with output
    • PvmPollType 19 β€” message wait policy (shared memory)
    • PvmPollTime 20 β€” message spinwait duration
    • PvmOutputContext 21 β€” output message context for children
    • PvmTraceContext 22 β€” trace message context for children
    • PvmSelfOutputContext 23 β€” output message context
    • PvmSelfTraceContext 24 β€” trace message context
    • PvmNoReset 25 β€” do not kill task on reset
  • val β€” integer, the new setting for the option. the pre-set glow-ups are:
    • for PvmRoute:
      • PvmDontRoute 1 β€” don't request or grant connections
      • PvmAllowDirect 2 β€” (default) don't request but allow
      • PvmRouteDirect 3 β€” request and allow connections
    • for PvmTraceOptions:
      • PvmTraceFull 1 β€” (default) do full trace events
      • PvmTraceTime 2 β€” only do PVM routine timings
      • PvmTraceCount 3 β€” only do PVM routine profiling (call counts)
    • for PvmPollType:
      • PvmPollConstant 1 β€” spin on its message queue
      • PvmPollSleep 2 β€” poll the message queue PvmPollTime times
  • 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