Cross-process and cross-thread comparison
The Cross-Process Comparison View (CPC) and Cross-Thread Comparison View (CTC) can be used to analyze expressions calculated on each of the processes in the current process group. Each window displays information in three ways: raw comparison, statistically, and graphically.
This is a more detailed view than the sparklines that are automatically drawn against a variable in the Evaluate window, Locals tab, and Current Line(s) tab for multi-process sessions.
To compare values across processes or threads, right-click on a variable in the Source Code viewer, Locals tab, Current Line(s) tab, or Evaluate window, then choose either View Across Processes (CPC) or View Across Threads (CTC). You can also open the CPC or CTC directly from the View menu. Alternatively, clicking on a sparkline will bring up the CPC if focus is on process groups, and the CTC otherwise.

Processes and threads are grouped by expression value when using the raw comparison. The precision of this grouping can be specified (for floating point values) by using the Limit comparison to fields.
If you are comparing across processes, you can turn each of these groupings of processes into a process group by clicking Create Groups. This creates several process groups, one for each line in the panel. Using this capability, large process groups can be managed with simple expressions to create groups. These expressions are any valid expression in the current language (that is, C/C++/Fortran).
For threaded applications, when using the CTC, if
OpenMP thread IDs can be identified, a third column will display the
corresponding OpenMP thread IDs for each thread that has each value. The
value displayed in this third column for any non-OpenMP threads that are
running depends on your compiler, but is typically -1
or 0
. OpenMP
thread IDs are available when using Intel and NVIDIA HPC compilers.
However, if these have been removed by compiler optimizations,
recompile using``-O0``.
OpenMP thread IDs can
only be obtained from GCC compiled programs if the compiler itself was compiled with TLS enabled.
Packaged GCC installs on some supported Linux distributions might not be compiled with TLS enabled.
The display of OpenMP thread IDs is not currently supported when using the Cray compiler.
You can enter a second boolean expression in the Only show if field to
control which values are displayed. Only values for which the boolean
expression evaluates to true
/ .TRUE.
are displayed in the results
table. The special metavariable $value
in the expression is replaced
by the actual value. Click See Examples to view examples.
Select Align stack frames to ensure that the stack frame of the same depth in every thread (using the CTC) is examined when comparing the variable value. When using the CPC, Align stack frames ensures that the same thread number is also selected when examining variable values. This is very helpful for most programs, but you might want to disable it if different processes or threads run entirely different programs.
The Use as MPI Rank button is described in Assign MPI ranks.
You can create a group for the ranks corresponding to each unique value by clicking Create Groups.
The Export button enables you to export the list of values and corresponding ranks as a comma-separated values (CSV) file.
The Full Window button hides the settings at the top of the window so that the list of values occupies the full window. This enables you to make full use of your screen space. Click Full Window again to display the settings.
The Statistics panel shows Maximum, Minimum, Variance, and other statistics for numerical values.