Debugging Fortran 90 Modules

Fortran 90 and Fortran 95 let you place functions, subroutines, and variables inside modules. These modules can then be USEd (included) elsewhere. When modules are USEd, the names in the module become available in the using compilation unit, unless they have been excluded by USE ONLY, or renamed. This means that you do not need to explicitly qualify the name of a module function or variable from the Fortran source code.

When debugging this kind of information, you will need to know the location of the function being called. Consequently, TotalView uses the following syntax when it displays a function contained within a module:

    modulename`functionname

You can use also this syntax in the File > New Program and View > Lookup Variable commands.

Fortran 90 also introduced the idea of a contained function that is only visible in the scope of its parent and siblings. There can be many contained functions in a program, all using the same name. If the compiler gave TotalView the function name for a nested functions, TotalView displays it using the following syntax:

    parentfunction()`containedfunction

Within contained functions, all of the parent function's variables are visible and accessible through a static chain. If the compiler retained information about the static chain, TotalView can access these variables in the same way as the compiled code does. Consequently, they are visible in Variable Windows, and from evaluation points or expressions. If the compiler does not pass on information about the static chain, TotalView can still find these up-level variables and display them in Variable Windows, but you will not be able to use them in evaluation points or expressions.

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0