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.

Debugging OpenMP Applications<br />

Figure 94: Sample OpenMP Debugging Session<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

� OpenMP master thread � Original routine name<br />

� OpenMP worker threads � Outlined routine name<br />

� Manager threads � Slave Thread Window<br />

(don’t touch these threads)<br />

� Stack parent token (select or<br />

dive to view master)<br />

Viewing OpenMP Private and Shared Variables<br />

<strong>TotalView</strong> lets you view both OpenMP private and shared variables.<br />

The compiler maintains OpenMP private variables in the outlined routine, and<br />

treats them like local variables. See “Displaying Local Variables and Registers” on<br />

page 292. In contrast, the compiler maintains OpenMP shared variables in<br />

the master thread’s original routine stack frame. However, <strong>Guide</strong> compilers<br />

pass shared variables to the outlined routine as parameter references.<br />

<strong>TotalView</strong> lets you display shared variables through a Process Window<br />

focused on the OpenMP master thread, or through one of the OpenMP<br />

worker threads.<br />

134 Chapter 7: Setting Up Parallel Debugging Sessions

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

Saved successfully!

Ooh no, something went wrong!