SETOPT(3PVM)

NAME
pvm_setopt - Sets various libpvm options.

SYNOPSIS
C    int oldval = pvm_setopt( int what, int val )
Fortran    call pvmfsetopt( what, val, oldval )

PARAMETERS

what
    Integer defining what is being set. Options include:
    PvmRoute        1    routing policy
    PvmDebugMask    2    debugmask
    PvmAutoErr      3    auto error reporting
    PvmOutputTid    4    stdout device for children
    PvmOutputCode   5    output msgtag
    PvmTraceTid     6    trace device for children
    PvmTraceCode    7    trace msgtag
    PvmFragSize     8    message fragment size

val Integer specifying new setting of option. Predefined route values are:
    PvmDontRoute    1
    PvmAllowDirect  2
    PvmRouteDirect  3

oldval
    Integer returning the previous setting of the option.

DISCUSSION
The routine pvm_setopt is a general purpose function to allow the user to set options in the PVM system. In PVM 3.2 pvm_setopt can be used to set several options including: automatic error message printing, debugging level, and communication routing method for all subsequent PVM calls. Pvm_setopt returns the previous value of set in oldval.

PvmRoute: In the case of communication routing, pvm_setopt advises PVM on whether or not to set up direct task-to-task links PvmRouteDirect (using TCP) for all subsequent communication. Once a link is established it remains until the application finishes. If a direct link can not be established because one of the two tasks has requested PvmDontRoute or because no resources are 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: For this option val is the debugging level. When debugging is turned on, PVM will log detailed information about its operations and progress on it's stderr stream. Default is no debug information.

PvmAutoErr: In the case of automatic error printing, Any PVM routines that return an error condition will automatically print the associated error message. The argument val defines whether this reporting is to be turned on (1) or turned off (0) for subsequent calls. A value of (2) will cause the program to exit after printing the error message (Not implemented in 3.2). Default is reporting turned on.

PvmOutputTid: For this option val is the stdout device for children. All the standard output from the calling task and any tasks it spawns will be redirected to the specified device. Val is the tid of a PVM task or pvmd. The Default val of 0 redirects stdout to master host, which writes to the log file /tmp/pvml.<uid>

PvmOutputCode: Only meaningful on task with PvmOutputTid set to itself. This is the message tag value to be used in receiving messages containing standard output from other tasks.

PvmTraceTid: For this option val is the task responsible for writing out trace event for the calling task and all its children. Val is the tid of a PVM task or pvmd. The Default val of 0 redirects trace to master host.

PvmTraceCode: Only meaningful on task with PvmTraceTid set to itself. This is the message tag value to be used in receiving messages containing trace output from other tasks.

PvmFragSize: For this option val specifies the message fragment size in bytes. Default value varies with host architecture.

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.

SEE ALSO
getopt(3PVM)