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.

Displaying Thread Objects<br />

that has the lowest index. This might not be the first displayed element if<br />

you used a slice to display the array with reversed indices.<br />

Displaying Fortran Parameters<br />

A Fortran PARAMETER defines a named constant. If your compiler generates<br />

debug information for parameters, they are displayed in the same way as<br />

any other variable. However, some compilers do not generate information<br />

that <strong>TotalView</strong> can use to determine the value of a PARAMETER. This means<br />

that you must make a few changes to your program if you want to see this<br />

type of information.<br />

If you’re using Fortran 90, you can define variables in a module that you initialize<br />

to the value of these PARAMETER constants; for example:<br />

INCLUDE ‘PARAMS.INC’<br />

MODULE CONSTS<br />

SAVE<br />

INTEGER PI_C = PI<br />

...<br />

END MODULE CONSTS<br />

The PARAMS.INC file contains your parameter definitions. You then use<br />

these parameters to initialize variables in a module. After you compile and<br />

link this module into your program, the values of these parameter variables<br />

are visible.<br />

If you’re using FORTRAN 77, you can achieve the same results if you make<br />

the assignments in a common block and then include the block in main().<br />

You can also use a block data subroutine to access this information.<br />

Displaying Thread Objects<br />

On HP Alpha Tru64 UNIX and IBM AIX systems, <strong>TotalView</strong> can display information<br />

about mutexes and conditional variables. In addition, <strong>TotalView</strong> can<br />

display information on read/write locks and data keys on IBM AIX. You can<br />

obtain this information by selecting the Tools > Thread Objects command.<br />

After selecting this command, <strong>TotalView</strong> displays a window that contains<br />

either two tabs (HP Alpha) or four tabs (IBM). Figure 209 on page 330<br />

shows AIX examples.<br />

Diving on any line in these windows displays a Variable Window that contains<br />

additional information about the item.<br />

Here are some things you should know:<br />

� If you’re displaying data keys, many applications initially set keys to 0<br />

(the NULL pointer value). <strong>TotalView</strong> doesn’t display a key’s information,<br />

however, until a thread sets a non-NULL value to the key.<br />

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

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

Saved successfully!

Ooh no, something went wrong!