30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The following are some additional examples:<br />

Setting Group Focus<br />

dfocus g1 dgroups –add –new thread<br />

Creates a new thread group that contains all the<br />

threads in all the processes in the control group associated<br />

with process 1.<br />

set mygroup [dgroups –add –new thread<br />

$GROUP($SGROUP(2))]<br />

dgroups –remove –g $mygroup 2.3<br />

dfocus g$mygroup/2 dgo<br />

These three commands define a new group that contains<br />

all the threads in the process 2 share group except<br />

for thread 2.3, and then continue that set of<br />

threads. The first command creates a new group that<br />

contains all the threads from the share group; the second<br />

removes thread 2.3; and the third runs the remaining<br />

threads.<br />

Using the g Specifier: An Extended Example<br />

The meaning of the g width specifier is sometimes not clear when it is coupled<br />

with a group scope specifier. Why have a g specifier when you have<br />

four other group specifiers? Stated in another way, isn’t something like gL<br />

redundant?<br />

The simplest answer, and the reason you most often use the g specifier, is<br />

that it forces the group when the default focus indicates something different<br />

from what you want it to be.<br />

The following example shows this. The first step sets a breakpoint in a multithreaded<br />

OMP program and execute the program until it hits the breakpoint.<br />

d1. dbreak 35<br />

Loaded OpenMP support library libguidedb_3_8.so :<br />

KAP/Pro Toolset 3.8<br />

1<br />

d1. dcont<br />

Thread 1.1 has appeared<br />

Created process 1/37258, named "omp_prog"<br />

Thread 1.1 has exited<br />

Thread 1.1 has appeared<br />

Thread 1.2 has appeared<br />

Thread 1.3 has appeared<br />

Thread 1.1 hit breakpoint 1 at line 35 in<br />

".breakpoint_here"<br />

The default focus is d1.

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

Saved successfully!

Ooh no, something went wrong!