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 UPC Programs<br />

Figure 110: A Pointer to a<br />

Shared Variable<br />

Displaying Pointer to Shared Variables<br />

<strong>TotalView</strong> understands pointer-to-shared data and displays the components<br />

of the data, as well as the target of the pointer to shared variables.<br />

For example,Figure 110 shows this data being displayed:<br />

In this figure, notice the following:<br />

� Because the Type field shows the full type name, <strong>TotalView</strong> is telling you<br />

that this is a pointer to a shared int with a block size of 10.<br />

� In this figure, <strong>TotalView</strong> also displays the upc_threadof ("T0"), the<br />

upc_phaseof ("P0"), and the upc_addrfield (0x0x10010ec4) components of<br />

this variable.<br />

In the same way that <strong>TotalView</strong> normally shows the target of a pointer variable,<br />

it also shows the target of a UPC pointer variable. When dereferencing<br />

a UPC pointer, <strong>TotalView</strong> fetches the target of the pointer from the UPC<br />

thread with which the pointer has affinity.<br />

You can update the pointer by selecting the pointer value and editing the<br />

thread, phase, or address values. If the phase is corrupt, you’ll see something<br />

like the following in the Value area:<br />

T0;P6;0x3ffc0003b00 -><br />

0xc0003c80 (-1073726336)<br />

In this example, the pointer is invalid because the phase is outside the legal<br />

range. <strong>TotalView</strong> displays a similar message if the thread is invalid.<br />

Since the pointer itself is not shared, you can use the TView > Show Across<br />

commands to display the value from each of the UPC threads. (See<br />

Figure 111 on page 161.)<br />

160 Chapter 7: Setting Up Parallel Debugging Sessions

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

Saved successfully!

Ooh no, something went wrong!