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.

Figure 95: OpenMP Shared Variable<br />

To see these variables, you must:<br />

Debugging OpenMP Applications<br />

1 Select the outlined routine in the Stack Trace Pane, or select the original<br />

routine stack frame in the OpenMP master thread.<br />

2 Dive on the variable name, or select the View > Lookup Variable command.<br />

When prompted, enter the variable name.<br />

CLI: dprint<br />

You will need to set your focus to the OpenMP master thread<br />

first.<br />

<strong>TotalView</strong> opens a Variable Window that displays the value of the OpenMP<br />

shared variable, as shown in Figure 95.<br />

Shared variables reside in the OpenMP master thread’s stack. When displaying<br />

shared variables in OpenMP worker threads, <strong>TotalView</strong> uses the<br />

stack context of the OpenMP master thread to find the shared variable.<br />

<strong>TotalView</strong> uses the OpenMP master thread’s context when displaying the<br />

shared variable in a Variable Window.<br />

You can also view OpenMP shared variables in the Stack Frame Pane by<br />

selecting either of the following:<br />

� Original routine stack frame in the OpenMP master thread.<br />

� Stack parent token line in the Stack Trace Pane of OpenMP worker<br />

threads, as shown in the following figure.<br />

<strong>TotalView</strong> Reference <strong>Guide</strong>: version 8.7 135

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

Saved successfully!

Ooh no, something went wrong!