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.
1 Select the outlined routine in the Stack Trace Pane, or select the original routine stack frame in the OpenMP master thread.
2 Dive on the variable name, or select the View > Lookup Variable command. When prompted, enter the variable name.
CLI: A Variable Window is launched that displays the value of the OpenMP shared variable, as shown in Figure 95.
Figure 95: OpenMP Shared Variable 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 |