When you’re debugging a parallel program that is running many instances of the same executable, you usually need to view or update the value of a variable in all of the processes or threads at once.
Before displaying a variable’s value in all threads or processes, you must display an instance of the variable in a Variable Window. After TotalView displays this window, use one of the following commands:
After using one of these commands, the Variable Window switches to an array-like display of information, and displays the value of the variable in each process or thread.
Figure 220 shows a simple, scalar variable in each of the processes in an OpenMP program.
When looking for a matching stack frame, TotalView matches frames starting from the top
frame, and considers calls from different memory or stack locations to be different calls. For example, the following definition of
recurse() contains two additional calls to
recurse(). Each of these calls generates a nonmatching
call frame.
If the variables are at different addresses in the different processes or threads, the field to the left of the
Address field displays
Multiple, and the unique addresses appear with each data item.
TotalView also lets you Show Across arrays and structures. When you Show Across an array, TotalView displays each element in the array across all processes. You can use a slice to select elements to be displayed in an “across” display. The following figure shows the result of applying a
Show Across > Processes command to an array of structures.