TotalView User Guide : Part II: Setting Up : Setting Up Parallel Debugging Sessions : Debugging OpenMP Applications : Viewing OpenMP Private and Shared Variables

Viewing OpenMP Private and Shared Variables
You can view both OpenMP private and shared variables.
The compiler maintains OpenMP private variables in the outlined routine, and treats them like local variables. See Displaying Local Variables and Registers”. In contrast, the compiler maintains OpenMP shared variables in the master thread’s original routine stack frame.
You can display shared variables through a Process Window focused on the OpenMP master thread, or through one of the OpenMP worker threads.
To see these variables:
1
2
Dive on the variable name, or select the View > Lookup Variable command. When prompted, enter the variable name.
A Variable Window is launched that displays the value of the OpenMP shared variable, as shown in Figure 95.
Shared variables reside in the OpenMP master thread’s stack. When displaying shared variables in OpenMP worker threads, TotalView uses the stack context of the OpenMP master thread to find the shared variable. TotalView uses the OpenMP master thread’s context when displaying the shared variable in a Variable Window.
You can also view OpenMP shared variables in the Stack Frame Pane by selecting either of the following:
*
*

Rogue Wave Software, Inc.
Voice: (303) 473-9118
rwonlinedocs@roguewave.com