-g and -ladebug should be used during
the compilation phase of the program. Using these options produces
the symbol table information in the object file in the format
useable by Ladebug.
To debug a program running within the PSE, you should use the modified version of Ladebug provided with the PSE software. This will let you view the activity of each peer while it is being debugged.
The modified version of Ladebug lets you:
hpfget command)
The default debugger is a modified version of Ladebug. Using Ladebug has the advantage of certain special F90 debugging features. Digital recommends using this modified version of Ladebug when parallel debugging of HPF programs is necessary.
As an alternative to Ladebug, you can select a modified version of
dbx. To do this, set the DEBUGGER environment variable
to /usr/lib/wsf/dbx . For example, from the C shell:
% setenv DEBUGGER /usr/lib/wsf/dbx
To revert to using Ladebug, unset the environment variable. For example, from the C shell:
% unsetenv DEBUGGER
To begin a PSE debugging session, include -debug
as a command line option to the program. The default debugging
environment provided is Ladebug in n windows: one X-window
terminal session attached to a Ladebug session for each peer. You
can disable the multiple window feature by setting the PSE_
DEBUG_TERM_TYPE environment variable to off
before starting the program.
Only PSE-specific command line options (refer to Section 8.5 for information about these
options) should be used on the command line when you specify the
-debug option. Use HPF-specific command line options
for the debugger's run command. For example, if a
program normally runs with the command:
% a.out -peers 4 -c tcp
Use the following sequence to run the same program under the debugger:
% a.out -peers 4 -debug Ladebug commands (set breakpoints and so on) run -c tcp
In the previous example, the command line option -peers
is a PSE-specific option. The command line option -c is
an HPF-specific option. The commands issued result in five terminal
sessions: one session contains the window that started the program
for the controlling process and the other sessions are for the peer
processes. There is one session per peer process. The title of each
peer window identifies the peer and the range of peers associated
with it. Terminal input directed at the controlling process is
broadcast to each Ladebug session or the peers (if the program is
running).
Terminal input directed to a peer window is sent only to the associated Ladebug session or peer. Terminal output occurs on the associated window. If the multiple window feature is disabled, terminal input is broadcast and the terminal output from all of the peers is intermixed.
The enhancement to the Ladebug debugger is the addition of the
hpfget command. This command lets you inspect
individual array element and is especially useful for distributed
arrays. The hpfget command has the following syntax:
% hpfget array_name(index1 . . . indexn)
An example of using this syntax is: hpfget my_
array(i,j) . The array indices must be integer expressions.
The indices themselves must not be elements of distributed arrays.
All peers determine on which peer the specified element resides. The peer that has the element prints out the element's value. All other peers display a note indicating which peer has the value. The peer that contains the value attempts to raise its X-window to the front and visibly flash the window.
hostname:0 . You must also set your session manager
security to allow displays from all peer machines.
Ladebug in n windows is an unofficial version of Ladebug. You should report bugs against Ladebug only if they can be reproduced using (scalar) F90 and the regular installed Ladebug. Otherwise, report bugs to pse@hpc.pko.dec.com.