Workarounds for Existing DWARF Debugging Problems
Set TotalView’s -compiler_vars option
Many compilers have problems when generating DWARF debug information for OpenMP programs, especially for variables inside OMP constructs. The debug information is either completely missing, inaccurate, or is generated with the "artificial" attribute, which is intended to alert the debugger that the variable does not exist in the source code. The compilers also generate debug information for compiler-generated variables; these are also marked artificial and often outnumber the source code variables.
By default, TotalView does not automatically display artificial variables, so the source-code variables are not displayed. As a workaround, set the TotalView -compiler_vars option to display artificial variables. Unfortunately, this also causes the debugger to display the compiler-generated variables too, which can make it more difficult to see the source code variables.
To persist the -compiler_vars option across TotalView sessions, set the TV::compiler_vars state variable to true in your tvdrc file located in the .totalview subdirectory in your home directory:
dset TV::compiler_vars -compiler_vars
For LLVM compilers, set the LD_LIBRARY_PATH environment variable
The libompd.so libraries in LLVM-Clang 17.0.6 and earlier, and in LLVM-Flang 17.0.1 and earlier, have an unnecessary dependency on libomp.so, causing TotalView to fail to load the library. Subsequent LLVM versions should address this problem.
The workaround is to set LD_LIBRARY_PATH to the directory path containing libomp.so in the LLVM installation before starting TotalView.