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 207: Fortran 90 User-<br />

Defined Type<br />

Displaying Fortran Types<br />

tions in a program, all using the same name. If the compiler gave <strong>TotalView</strong><br />

the function name for a nested function, <strong>TotalView</strong> displays it using the following<br />

syntax:<br />

parentfunction()`containedfunction<br />

CLI: dprint module_name‘variable_name<br />

Viewing Fortran 90 User-Defined Types<br />

A Fortran 90 user-defined type is similar to a C structure. <strong>TotalView</strong> displays<br />

a user-defined type as type(name), which is the same syntax used in Fortran<br />

90 to create a user-defined type. For example, the following code fragment<br />

defines a variable typ2 of type(whopper):<br />

TYPE WHOPPER<br />

LOGICAL, DIMENSION(ISIZE) :: FLAGS<br />

DOUBLE PRE<strong>CI</strong>SION, DIMENSION(ISIZE) :: DPSA<br />

DOUBLE PRE<strong>CI</strong>SION, DIMENSION(:), POINTER :: DPPA<br />

END TYPE WHOPPER<br />

TYPE(WHOPPER), DIMENSION(:), ALLOCATABLE :: TYP2<br />

<strong>TotalView</strong> displays this type. (See Figure 207.)<br />

Viewing Fortran 90 Deferred Shape Array Types<br />

Fortran 90 lets you define deferred shape arrays and pointers. The actual<br />

bounds of a deferred shape array are not determined until the array is allocated,<br />

the pointer is assigned, or, in the case of an assumed shape argument<br />

to a subroutine, the subroutine is called. <strong>TotalView</strong> displays the type<br />

of deferred shape arrays as type(:).<br />

When <strong>TotalView</strong> displays the data for a deferred shape array, it displays the<br />

type used in the definition of the variable and the actual type that this<br />

instance of the variable has. The actual type is not editable, since you can<br />

<strong>TotalView</strong> <strong>Users</strong> <strong>Guide</strong>: version 8.7 327

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

Saved successfully!

Ooh no, something went wrong!