[Contents] [Chapter 3] [Chapter 5] [Index]



Running a Compaq PVM Application

This chapter describes how to run your PVM application using Compaq PVM. It consists of the following sections:

4.1 Setting Environment Variables

This section provides the information required to change environment variables, where appropriate, before running Compaq PVM.

The only process that checks these environment variables is the first dpvm daemon that starts on a cluster under a particular user ID. On startup, it checks for these variables and sets internal structures accordingly. A subsequent daemon or task that is started by that user (before the first daemon is shut down) automatically gets the same values for these variables without checking their own environment variables.

  1. Compaq PVM uses 'channel buffers' to communicate between tasks. (A channel buffer is a preallocated memory region used for interprocess communication.) A parent and child require two channel buffers for bidirectional communications.

    Channel buffers are also required to communicate with the Compaq PVM daemon. Therefore, a parent task, a child task, and the Compaq PVM daemon require up to six channel buffers to enable full task-to-task and task-to-daemon communication.

    You can specify the number of channel buffers and the size of each buffer by setting the following environment variables:

    PVM_MC_CHAN_SIZE sets the size in bytes of a Memory Channel communication channel (must be a multiple of 1024).

    PVM_SM_CHAN_SIZE sets the size in bytes of a shared memory communication channel (must be a multiple of 1024).

    PVM_BUF_SIZE sets the size of the local PVM buffer. This must be at least as big as the largest message to be sent (must be a multiple of 1024, default = 1048576).

    To change the memory channel buffer size to 32K when using the C-shell, enter the following command:

    setenv PVM_MC_CHAN_SIZE 32768

  2. The environment variable PVM_BUF_SIZE sets up a local PVM buffer which needs to be at least as big as the largest message to be sent. To set up a region of 200K, enter the following command:

    setenv PVM_BUF_SIZE 204800

  3. When spawning a task under a debugger, the delegate shell-script used is usr/bin/dpvmdbg. If an alternative debugging script is to be used, you can set it with the use of the DPVM_DEBUGGER environment variable. This environment variable must be set on each host prior to starting the daemon.

    An example for setting the variable in the .cshrc file is:

    setenv DPVM_DEBUGGER /usr/user/pvm/bin/dpvmdbg

  4. The environment variable PVM_EXPORT can be used to indicate the environment variables to export from a parent task to children tasks when using pvm_spawn. Multiple names must be separated by ':'. If PVM_EXPORT is not set, environment variables are not exported.

  5. The environment variable PVMDDEBUG can be used to set the default dpvmd debugging mask. It is used to debug dpvmd, and is not used to debug application programs.

  6. The environment variable PVMTASKDEBUG sets the default libdpvm debugging mask. It is used to debug libdpvm, and is not used to debug application programs.

4.1.1 Setting UMP Environment Variables

UMP is the communication layer used by Compaq PVM. The following section details the environment variables relating to UMP:

  1. The environment variable UMP_MULTIRAIL controls the assignment of UMP "channels" to the underlying Memory Channel physical rail structure. The default rail assignment method evenly distributes UMP "channels" over the available hardware rails.

    The argument string takes the form: [report|avoid:N] where report enables the printing of a channel distribution/usage report and avoid:N will cause no channel to be assigned to rail N.

    Examples:

    > setenv UMP_MULTIRAIL "report"
    will use the default "pressure" assignment and generate a final usage report.

    > setenv UMP_MULTIRAIL "avoid:1,report"
    will NOT assign rail 1 and will also generate a final report.

  2. The environment variable UMP_THREAD_MODE controls the use of additional data-moving threads within UMP. By default, an extra thread is not used. This can be modified by setting the option to one of the following:

    "merging" selects an optimized multithread implementation. This may be useful when there are more CPUs available than PVM processes.

    "single" (*) is the default value.

  3. The environment variable UMP_YIELD controls the method by which executing threads yield to a competing thread, when multiple threads are being used.

    "kernel" informs the kernel level scheduler when a thread is willing to yield.

    "user" informs the thread level scheduler when a thread is willing to yield.

    "swap" will alternate between each of the above.

    "none" will effectively disable a thread from ever "yielding".

  4. The environment variable UMP_TIMEOUT is used to determine the timeout value (in seconds) when draining UMP channels during an ump_close(). The default value is 300.

  5. The environment variable UMP_FRAGSIZE determines the fragmentation of UMP data transfers. By default it has a value of 4096 (bytes). Data transfers that are of UMP_FRAGSIZE or less are not fragmented. All other data transfers will be fragmented into chunks of UMP_FRAGSIZE or less.

    Example: A message transfer of 16k bytes will be fragmented into 4 chunks of 4k bytes.

  6. The environment variable UMP_ERROR_MODE determines the level of error checking to be performed on Memory Channel transactions.

    "none" performs no error checking.

    "one" checks for errors once at start up and shutdown.

    "inter" checks for errors intermittently. This is the default setting.

    "always" checks for errors on every transaction.

    "recover" will resend data in the event of an error.

4.2 Starting Compaq PVM

To start running Compaq PVM, follow these steps:

  1. Log in to your normal user account.

  2. To start the Compaq PVM console, enter the following command:

    dpvm

  3. When Compaq PVM is running, follow the same procedures as for standard PVM.

4.2.1 Commands Supported by the Console

The console supports the following commands:

Command

Action Performed

conf

Shows current configuration

quit

Exits without changing configuration

halt

Halts all daemons in the cluster and exits

add

Adds another Memory Channel host to the cluster

delete

Removes a Memory Channel host from the PVM cluster

alias

Defines/lists command aliases

echo

Echoes arguments

id

Prints console task id

jobs

Displays list of running jobs

kill

Terminates tasks

mstat

Shows status of host

ps

Lists tasks

pstat

Shows status of tasks

reset

Kills all tasks

setenv

Displays or sets environment variables

sig

Sends signal to signal

spawn

Spawns task

trace

Sets/displays trace event mask

unalias

Undefines command alias

version

Shows libpvm version


[Contents] [Chapter 3] [Chapter 5] [Index]


pvm@ilo.dec.com

Copyright © 1999, Digital Equipment Corporation. All rights reserved. Unpublished rights reserved under the copyright laws of the United States.