Viewing Modules and Their Data
Fortran 90 lets you place functions, subroutines, and variables inside modules. You can then include these modules elsewhere with a USE command. This command makes the names in the module available in the using compilation unit, unless you either exclude them with a USE ONLY statement or rename them. This means that you don’t need to explicitly qualify the name of a module function or variable from the Fortran source code.
When debugging this kind of information, you need to know the location of the function being called, so TotalView uses the following syntax when it displays a function contained in a module:
modulenamefunctionname
Variable names are handled similarly:
modulenamevariablename
NOTE: This assumes that TotalView is able to determine the module in which the function or variable resides. Sometimes the information the compiler makes available is insufficient and sometimes, although a function uses a module, TotalView is unable to determine that a module is the source of the function, and so is unable to properly qualify the names. In this case names are displayed unqualified as a local function with local variables.
The above qualified syntax can be used with the Lookup File or Function view, and with the dprint command in the CLI:
dprint modulenamevariablename
Figure 54 illustrates some of the points made above.
Figure 54, Display of Fortran Module Data
The qualified subroutine name appears in the Call Stack, and the qualified variable names appear in the Local Variables view. Note also that the init() routine can be called from main without qualification because of the USE statement.