Process control and process groups

MPI programs are designed to run as more than one process and can span many machines. Linaro DDT lets you group these processes so that you can perform actions on more than one process at a time. The status of processes is displayed in the Process Group viewer.

The Process Group viewer is displayed (by default) at the top of the screen with multi-colored rows. Each row relates to a group of processes and operations that can be performed on the currently highlighted group (for example, playing, pausing, and stepping) by clicking on the toolbar buttons. You can switch between groups by clicking on them or their processes. The highlighted group is indicated by a lighter shade. Groups can be created, deleted, or modified at any time, with the exception of the All group, which cannot be modified.

To add a group click the Create Group button, or right-click in the Process Group viewer and choose Create Group from the context-sensitive menu that is displayed. This context menu can also be used to rename groups, delete individual processes from a group, and jump to the current position of a process in the source code viewer. You can load and save the current groups to a file, and you can create sub-groups from the processes currently playing, paused, or finished. You can even create a sub-group excluding the members of another group. For example, to take the complement of the Workers group, select the All group and choose Copy, but without Workers.

You can also use the context menu to switch between the two different methods of viewing the list of groups. These methods are called the Detailed view and the Summary view.

Detailed view

The Detailed view is ideal for working with small numbers of processes. If your program has 32 processes or less, DDT defaults to the Detailed view. You can use the context menu to switch to this view.

The Process Group Detailed view

In the Detailed view, each process is represented by a square containing its MPI rank (0 through n-1). The squares are color-coded; red for a paused process, green for a playing process, and gray for a finished/dead process. Selected processes are highlighted with a lighter shade of their color and the current process also has a dashed border.

When a single process is selected the local variables are displayed in the Variable viewer and displayed expressions are evaluated. You can make the Source Code viewer jump to the file and line for the current stack frame (if available) by double-clicking on a process.

To copy processes from one group to another, click and drag the processes. To delete a process, press the Delete key. When modifying groups it is useful to select more than one process by holding down one or more of the following keys:

Key

Description

Ctrl

Click to add/remove process from selection

Shift

Click to select a range of processes

Alt

Click to select an area of processes

Note

Some window managers (such as KDE) use Alt + drag to move a window. You must disable this feature in your window manager if you want to use DDT’s area select.

Summary view

The Summary view is ideal for working with moderate to large numbers of processes. If your program has 32 processes or more, DDT defaults to this view. You can use the context menu to switch to this view.

The Process Group Summary view

In the Summary view, individual processes are not shown. Instead, for each group, Linaro DDT shows:

  • The number of processes in the group.

  • The processes belonging that group. Here 1-2048 means processes 1 through 2048 inclusive, and 1-10, 12-1024 means processes 1-10 and processes 12-1024 (but not process 11). If this list becomes too long, it is truncated with a . If you hover the mouse over the list you can see more details.

  • The number of processes in each state (playing, paused, or finished). If you hover the mouse over each state you can see a list of the processes currently in that state.

  • The rank of the currently selected process. You can change the current process by clicking here, typing a new rank, then pressing Enter. Only ranks belonging to the current group will be accepted.

Show processes lets you switch a single group into the Detailed view and back again. This is useful if you are debugging a 2048 process program, but have narrowed the problem down to just 12 processes, which you have put in a group.