The PTP Debug Perspective

Main features of the PTP Debug perspective

Here is a view of the PTP Debug perspective, showing

Launching a parallel debug session

  1. Create a Parallel Application for Debug launch similar to creating it for Run... (See Launching parallel programs, but the necessary information is given below.)
  2. In the Debug launch dialog (Run -> Debug ... or use the Debug icon on the eclipse toolbar)
  3. Select 'Debugger' tab..
  4. Select 'Stop in main' to automatically stop the job
  5. Make sure the Debugger is set to "SDM" - use the pulldown menu.
  6. Change any other default settings (not normally required)
  7. Select the Debug button (or hit "Apply" to save these settings if you do not intend to launch immediately.)

  1. For existing Parallel Application launch configurations, you can simply launch using the debug button rather than the Run button

  1. Eclipse may ask you to switch to the PTP Debug perspective.
  2. Answer yes; if you check "Remember my decision" it won't ask you this for future launches. It will then switch to the PTP Debug perspective.

The Parallel Debug Perspective

The debug perspective appears as in the example above. This is a launch with 32 processes set on the launch configuration. The Parallel Debug view shows the 32 processes (yellow diamonds indicate a stopped process); the Debug view shows process 0 stopped at main; the Source view shows the line at which process 0 is stopped.

Note that the breakpoints view (upper right) is empty, since no breakpoints are set. You can view the variables in this area by selecting the tab on the Variables View

Note that most variables don't have valid values yet since we haven't executed their initializations in the program.

Process Sets

Traditional debuggers apply operations to a single process. Parallel debugging operations apply to a single process or to arbitrary collections of processes.

A process set is a means of simultaneously referring to one or more processes.

When a parallel debug session is first started, all processes are placed in a set, called the 'Root' set. Sets are always associated with a single Job. A job can have any number of process sets. A set can contain from 1 to the number of processes in a job.

Operations on Process sets

Use the icons in the toolbar of the Parallel Debug view to create, modify, and delete process sets, and to change the current process set.

Debug operations on the Parallel Debug View toolbar always apply to the current set.

Creating Process Sets

  1. A process set is created by selecting a rectangular region with the mouse, or click the mouse and shift-click or ctrl-click to select a contiguous region, or separate processes, respectively

  1. Create a process set from the group that was selected by clicking on the image in the icon ..

Adding processes to a set

Processes can be added to an existing process set by clicking on the down-arrow to the right of the icon:

Changing the current set

To change the current process set, select the icon and choose from the list via the down-arrow , or click on the image in the icon itself to cycle through the sets.

Removing processes from a set

To remove processes from the current set, select the processes as described above, and Click the "Remove Elements" button.

Deleting a process set

Select the "Delete Set" icon to delete the current process set.

Breakpoints

There are two main types of parallel breakpoints in PTP.

Breakpoints are colored depending on which processes the breakpoint applies to:

Setting Breakpoints

To create a set breakpoint, make sure the current job is selected, then double-click on the left edge of an editor window, at the line on which you want to set the breakpoint. Or, right click and use the context menu.

To create a global breakpoint, first make sure that no jobs are selected (click in white part of jobs view if necessary). double-click on the left edge of an editor window. Note that if a job is selected, the breakpoint will apply to the current set.

Breakpoint information

Hover over a breakpoint to see more information.

Use the Breakpoints view to see all breakpoints.

Use the menu in the Breakpoints view to group breakpoints by type.

For example the above selection will list the breakpoints by process set.

Current Instruction Pointer

The current instruction pointer is used to show the current location of suspended processes. In traditional programs, there is a single instruction pointer. (The exception to this is multi-threaded programs.) In parallel programs, there is an instruction pointer for every process.

The PTP debugger shows one instruction pointer for every group of processes at the same location.

Note: The group of processes represented by an instruction pointer is not necessarily the same as a process set.

In the normal debugger, the single instruction pointer is indicated with the blue arrow icon. The current source line is also highlighted.

In the PTP (parallel) debugger, there are multiple instruction pointers.

The marker depends on the type of process stopped at that location.

Hovering over the instruction pointer provides additional information.

Process Registration and the Debug View

Process set commands apply to groups of processes. For finer control and more detailed information, a process can be registered and isolated in the Debug View.

Registered processes, including their stack traces, appear in the 'Debug' view. Any number of processes can be registered, and processes can be registered or un-registered at any time.

To register a process, double-click its process icon in the Jobs view. Note that the process "diamond" then is surrounded by a box. The process appears in the debug view.

To un-register a process, double-click on the same icon. The box disappears, and the process is removed from the debug view.

Note that the debug commands (icons including run, step, etc.) in the toolbar of the Jobs view (tab title: Parallel Debug) control the currently selected process set. The debug commands in the toolbar of the Debug view control the single process that is currently selected in that view.

Terminating the debug session

Click on the terminate icon in the Parallel Debug View. Note that the terminate icon in the Debug (Process) view will terminate a single process.

Putting it all together

Note that with the above instructions, you should now be able to do the following: Answers are in italics.

Back to Top | Back to Table of Contents