Fortran Parameters
A Fortran PARAMETER defines a named constant. If your compiler generates debug information for parameters, they are displayed in the same way as any other variable. However, some compilers do not generate information that TotalView can use to determine the value of a PARAMETER. This means that you must make a few changes to your program if you want to see this type of information. For Fortran 90, you can define variables in a module that you initialize to the value of these PARAMETER constants; for example:
 
INCLUDE ‘PARAMS.INC’
MODULE CONSTS
SAVE
INTEGER PI_C = PI
...
END MODULE CONSTS
The PARAMS.INC file contains your parameter definitions. You then use these parameters to initialize variables in a module. After you compile and link this module into your program, the values of these parameter variables are visible. For Fortran 77, you can achieve the same results if you make the assignments in a common block and then include the block in main(). You can also use a block data subroutine to access this information.
Figure 58 assigns a parameter to a local variable for display in the Data View:
Figure 58, Fortran Parameters
If the compiler provides enough information to look at parameters directly, then you can add the parameter directly to the Data View, like so:
Figure 59, Fortran Parameters, added to Data View