[Contents] [Chapter 4] [Index]
This chapter describes how to increase the resource allocation to Memory Channel and shared memory; how to clean up and debug a Compaq PVM application if there was an error when running it, or if the application exited abnormally. This chapter also describes how to tune the application's performance. The chapter consists of the following sections:
Since Compaq PVM uses Memory Channel and shared memory for communications (see Setting Shared Memory and Memory Channel Parameters), their default values will have to be increased if a program fails and a message signals a problem with resources.
If Compaq PVM reports an error message indicating that PVM_BUF_SIZE should be increased, and the task exits, this indicates the standard buffer size or the user-specified buffer size is not big enough to transfer the largest messages between the tasks.
Compaq PVM attempts to remove all semaphores, and so on, before the application exits. However, some shared memory regions and/or semaphores may be left on the system which you should clean up before restarting the daemon or re-running the application.
You may need to perform one of these steps if a program exits abnormally:
Use the ipcs command to see what regions and semaphores exist and use the ipcrm command to remove them.
Run a script provided with Compaq PVM that can do much of the work for you.
A link to it is at /usr/bin/dpvmclean.
The script purges old shared memory regions, semaphores, temporary files and PVM processes that are running.
The script may not kill all PVM processes on the system, for example, if a process does not have pvm anywhere in the output generated by the ps command for that process, the script will not find it. Use the command ipcs to see what regions and semaphores exist.
The script checks to see if it is being executed by root and, if so, exits immediately. This is to avoid accidental removal of shared memory regions or semaphores used by other system processes.
Note: There is no cleanup procedure for the Memory Channel regions allocated by Compaq PVM. This is because the Memory Channel Services software ensures that any region allocated by a process is deallocated when that process dies (if it is the last process holding the region).
The following error codes are returned by Compaq PVM if an error was detected during the execution of a routine:
Compaq PVM prints error conditions detected in routines by default. You can use pvm_setopt() to turn off this automatic reporting. You can view diagnostic prints from spawned tasks using the Compaq PVM console redirection or by calling pvm_catchout() in the spawning task.
You can start Compaq PVM tasks manually under any standard serial debugger.
You can start spawned Compaq PVM tasks under a debugger. By setting the flag option to include PvmTaskDebug in the pvm_spawn() call, Compaq PVM executes the shell script (usr/bin/dpvmdbg) by default. The task being debugged can be executed on any of the hosts in the virtual machine, as specified by the flag and where arguments on pvm_spawn().
You can create your own customized debugger script to include a preferred debugger, even a parallel debugger, if one is available.
If you use pvm_psend, the data can be copied directly in the communication channels. In most cases, this eliminates the need for local copies to the PVM buffer space, and the resultant overhead associated with a second copy.
Increase the value(s) of PVM_MC_CHAN_SIZE and/or PVM_SM_CHAN_SIZE when sending large messages. This allocates more communication channel space in Memory Channel and shared memory, resulting in faster code and a more efficient use of Memory Channel resources.
The variables set for UMP_THREAD_MODE, UMP_YIELD, UMP_MULTIRAIL and UMP_ERROR_MODE can affect performance depending on your application and configuration.
[Contents] [Chapter 4] [Index]
Copyright © 1999, Digital Equipment Corporation. All rights reserved. Unpublished rights reserved under the copyright laws of the United States.