30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Examining Groups<br />

Manipulating Processes and Threads<br />

When you debug a multi-process program, <strong>TotalView</strong> adds processes to<br />

both a control and a share group as the process starts. These groups are<br />

not related to either UNIX process groups or PVM groups. (See Chapter 2,<br />

“About Threads, Processes, and Groups,” on page 15 for information on groups.)<br />

Because a program can have more than one control group and more than<br />

one share group, <strong>TotalView</strong> decides where to place a process based on the<br />

type of system call—which can either be fork() or execve()—that created or<br />

changed the process. The two types of process groups are:<br />

Control Group The parent process and all related processes. A control<br />

group includes children that a process forks (processes<br />

that share the same source code as the parent).<br />

It also includes forked children that subsequently call a<br />

function such as execve(). That is, a control group can<br />

contain processes that don’t share the same source<br />

code as the parent.<br />

Control groups also include processes created in parallel<br />

programming disciplines like MPI.<br />

Share Group The set of processes in a control group that shares the<br />

same source code. Members of the same share group<br />

share action points.<br />

See Chapter 13, “Using Groups, Processes, and Threads,” on page 251 for a complete<br />

discussion of groups.<br />

<strong>TotalView</strong> automatically creates share groups when your processes fork children<br />

that call the execve() function, or when your program creates processes<br />

that use the same code as some parallel programming models such as MPI<br />

do.<br />

<strong>TotalView</strong> names processes according to the name of the source program,<br />

using the following naming rules:<br />

� <strong>TotalView</strong> names the parent process after the source program.<br />

� The name for forked child processes differs from the parent in that<br />

<strong>TotalView</strong> appends a numeric suffix (.n). If you’re running an MPI program,<br />

the numeric suffix is the process’s rank in COMM_WORLD.<br />

� If a child process calls the execve() function after it is forked, <strong>TotalView</strong><br />

places a new executable name in angle brackets ().<br />

In the following figure, assume that the generate process doesn’t fork any<br />

children, and that the filter process forks two child processes. Later, the<br />

first child forks another child, and then calls the execve() function to execute<br />

the expr program. In this figure, the middle column shows the names<br />

that <strong>TotalView</strong> uses. (See Figure 152 on page 236.<br />

<strong>TotalView</strong> <strong>Users</strong> <strong>Guide</strong>: version 8.7 235

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!