SETOPT(3PVM)

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

πŸ’– SETOPT πŸ’–

okay bestie, sit down, hydrate, because this is the manual page for pvm_setopt β€” that's SETOPT(3PVM) in the catalog, and it's the one that sets libpvm options. iconic behavior, honestly πŸ¦‹


✨ NAME ✨

pvm_setopt β€” Sets libpvm options. That's it. That's the whole job description. πŸ’…


🌸 SYNOPSIS 🌸

C:

int oldval = pvm_setopt( int what, int val )

Fortran:

call pvmfsetopt( what, val, oldval )

πŸŽ€ PARAMETERS πŸŽ€

  • what β€” an Integer that defines what you're setting. Has to be one of these, no substitutions bestie:
    • 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 β€” an Integer giving the new setting for that option. And listen, some of these have ✨predefined✨ values, so let me put you on:

Predefined values for PvmRoute:

  • PvmDontRoute β€” 1 β€” don't request or grant connections
  • PvmAllowDirect β€” 2 β€” (default) don't request but allow
  • PvmRouteDirect β€” 3 β€” request and allow connections

Predefined values 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)

Predefined values for PvmPollType:

  • PvmPollConstant β€” 1 β€” spin on its message queue
  • PvmPollSleep β€” 2 β€” poll the message queue PvmPollTime times
  • oldval β€” an Integer that comes back holding the previous setting of the option. So you always get the receipts. 🧾

πŸ’œ DESCRIPTION πŸ’œ

The routine pvm_setopt is a general purpose function used to set miscellaneous options in the PVM library. what is one of:

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. 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.

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. ⚠️ bestie, 2 and 3 are not a drill β€” your task is GONE.

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! 🚨 (yes really, flush it, don't leave your trace data hanging, that's so rude)

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 keeps 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. (so don't @ me with a number, it depends on your machine πŸ’…)

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, they move together 🫢)

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. (no extra seasoning, just the raw output ✨)

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.

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. (survival mode: engaged πŸ’€)


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 check your return value bestie, it's doing double duty πŸ‘€


πŸ¦‹ EXAMPLES πŸ¦‹

C:

oldval = pvm_setopt( PvmRoute, PvmRouteDirect );

Fortran:

CALL PVMFSETOPT( PVMAUTOERR, 1, OLDVAL )

πŸ’€ ERRORS πŸ’€

This error condition can be returned:

  • PvmBadParam β€” giving an invalid value.

Translation: you passed something it didn't recognize. It's telling you, gently, that you fumbled. πŸ™ˆ


🌈 SEE ALSO 🌈

pvm_getopt(3PVM) β€” the read-only sibling, go say hi πŸ‘‘


okay that's the whole page bestie, you ate that πŸ’…βœ¨ this was PVM Version 3.4, dated 4 April, 1994, and yes the girls were setting libpvm options even back then. now go forth and pvm_setopt responsibly πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from