The Call Stack
For OpenMP, the Call Stack identifies parallel and task regions using the annotations "#pragma omp parallel” or "#pragma omp task", depending on whether the frame is associated with an implicit (parallel) or explicit (task) task.
For example, consider an OpenMP program with a single parallel region and multiple threads. When a breakpoint is hit and you focus on a thread in the Processes & Threads view, that thread’s backtrace displays in the Call Stack, as usual:
![](../TotalView/images/openMP_process-thread-view-CallStack-combined.png)
Observe the following:
![*](p4-bullet.jpg)
The Call Stack is filtered, identified by the orange filter icon (
![](../TotalView/images/icon-transform-stack.png)
).
![*](p4-bullet.jpg)
The parallel regions are identified with
#pragma, and the displayed value reflects the source code itself. (This is in contrast to some compiler’s practice of assigning outlined functions meaningless names). For example, note that
omp_task_entry is identified as a
#pragma omp task to make it clear that this is an explicit task.
NOTE: The pragma annotations are language-sensitive and show "#pragma" for C/C++ OMP code and "!$omp" for Fortran code.
![*](p4-bullet.jpg)
Selecting the
#pragma entry in the Call Stack automatically navigates to the location in the source code where
#pragma was declared:
![*](p4-bullet.jpg)
The stack backlink to the parent thread is identified by a link icon (
![](../TotalView/images/icon-link.png)
). In this example, the thread that has focus, or 1.7, was invoked by a parallel region in thread 1.3 in function
h, identified by the popup tip when you hover a cursor over its entry in the Call Stack:
Clicking this link focuses the source pane on its parent thread’s stack frame for function
h, which in turn updates the Call Stack for the backtrace for thread 1.3:
![](../TotalView/images/openMP_process-thread-view-CallStack-link2.png)
This parent/child stack linking continues through the backtrace until the initial thread 1.1, is reached.