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 and Analyzing Arrays<br />

Figure 212: Fortran Array<br />

with Inverse Order and<br />

Limited Extent<br />

specify a (2:3,7::–1) slice with an integer*4(–1:5,2:10) Fortran array. (See<br />

Figure 212.)<br />

After you enter this slice value, <strong>TotalView</strong> only shows elements in rows 2<br />

and 3 of the array, beginning with column 10 and ending with column 7.<br />

Using Slices in the Lookup Variable Command<br />

When you use the View > Lookup Variable command to display a Variable<br />

Window, you can include a slice expression as part of the variable name.<br />

Specifically, if you type an array name followed by a set of slice descriptions<br />

in the View > Lookup Variable command dialog box, <strong>TotalView</strong> initializes<br />

the Slice field in the Variable Window to this slice description.<br />

If you add subscripts to an array name in the View > Lookup Variable dialog<br />

box, <strong>TotalView</strong> will look up just that array element.<br />

CLI: dprint small_array(5,5)<br />

You can, of course, type an expression into the View > Lookup Variable<br />

dialog box; for example, you could type small_array(i-1,j-1).<br />

Array Slices and Array Sections<br />

An array slice allows you to see a part of an array. The slice allows you to<br />

remove parts of the array you do not want to see. For example, if you have<br />

a 10,000 element array, you could tell <strong>TotalView</strong> that it should only display<br />

100 of these elements. Fortran has introduced the concept of an array section.<br />

When you create an array section, you are creating a new array that is<br />

a subset of the old array. Because it is a new array, its first array index is 1.<br />

In Figure 213 on page 337, the top left Variable Window displays an elevenelement<br />

array slice. The bottom right Variable Window displays an elevenelement<br />

array.<br />

336 Chapter 15: Examining Arrays

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

Saved successfully!

Ooh no, something went wrong!