Enabling OpenMP Debugging
The OpenMP specification requires that the OMP_DEBUG environment variable be set to "enabled" before launching an OpenMP application to enable OMPD support in the OpenMP runtime library.
NOTE: For MPI Applications: MPI applications require that the environment variable OMP_DEBUG to be set before launching the application for debugging in TotalView. Setting an environment variable in an MPI application varies by MPI implementation and resource manager (for example, SLURM, Flux, Open MPI, or MPICH). For SLURM, for instance, the srun command supports an --export option, so enable OMPD support like this:
srun --export=OMP_DEBUG=enabled a.out
Enable OpenMP debugging for non-MPI programs:
For non-MPI programs launched by TotalView, you can enable OpenMP debugging and stack filtering using either the shell or the TotalView UI, CLI, or -env option.
In the UI, check the menu option Debug > Enable OpenMP Debugging.
In the shell before launching TotalView:
Set the environment variable OMP_DEBUG, for example, in csh:
setenv OMP_DEBUG enabled
When launching TotalView, using the -env option:
totalview -env OMP_DEBUG=enabled <your_program>
In the CLI from within TotalView:
Use the boolean state variable TV::openmp_debug_enabled:
dset TV::openmp_debug_enabled true