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.

Displaying Fortran Types<br />

Figure 208: Fortran 90<br />

Pointer Value<br />

achieve the same effect by editing the definition’s type. The following<br />

example shows the type of a deferred shape rank 2 array of real data with<br />

runtime lower bounds of –1 and 2, and upper bounds of 5 and 10:<br />

Type: real(:,:)<br />

Actual Type: real(-1:5,2:10)<br />

Slice: (:,:)<br />

Viewing Fortran 90 Pointer Types<br />

A Fortran 90 pointer type lets you point to scalar or array types.<br />

<strong>TotalView</strong> implicitly handles slicing operations that set up a pointer or<br />

assumed shape subroutine argument so that indices and values it displays<br />

in a Variable Window are the same as in the Fortran code; for example:<br />

integer, dimension(10), target :: ia<br />

integer, dimension(:), pointer :: ip<br />

do i = 1,10<br />

ia(i) = i<br />

end do<br />

ip => ia(10:1:-2)<br />

After diving through the ip pointer, <strong>TotalView</strong> displays the windows shown<br />

in Figure 208:<br />

The address displayed is not that of the array’s base. Since the array’s<br />

stride is negative, array elements that follow are at lower absolute<br />

addresses. Consequently, the address displayed is that of the array element<br />

328 Chapter 14: Examining and Changing Data

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

Saved successfully!

Ooh no, something went wrong!