Running Jobs for TotalView Debugging

Submitting jobs

You can submit jobs two ways:

  • Start a job and TotalView together through LSF

  • Start TotalView and attach the LSF job

You must set the path to the TotalView binary in the $PATH environment variable on the submission host, and the $DISPLAY environment variable to console_name:0.0.

Compiling your program for debugging

Before using submitting your job in LSF for debugging in TotalView, compile your source code with the -g compiler option. This option generates the appropriate debugging information in the symbol table.

Any multiprocess programs that call fork(), vfork(), or execve() should be linked to the dbfork library.

Starting a job and TotalView together through LSF

The following syntax applies when starting a job and TotalView together through LSF:

bsub -a tvapplication [bsub_options] mpirun.lsf job [job_options] [-tvopt tv_options]


  • -a tvapplication specifies the application you want to run through LSF and debug in TotalView.

  • -tvopt tv_options specifies options to be passed to TotalView. Use any valid TotalView command option, except -a (LSF uses this option internally). See the TotalView Users Guide for information about TotalView command options and setting up parallel debugging sessions.

For example:

  • To submit a POE job and run TotalView:

    % bsub -a tvpoe -n 2 mpirun.lsf myjob -tvopt -no_ask_on_dlopen

    The method name tvpoe uses the special esub for debugging POE jobs with TotalView (LSF_SERVERDIR/esub.tvpoe). -no_ask_on_dlopen is a TotalView option that tells TotalView not to prompt about stopping processes that use the dlopen system call.

Running TotalView and submitting a job with LSF-PE integration

You can submit jobs with LSF-PE integration running TotalView. Below are some examples:

  • % bsub -a tvpoe -n 2 mpirun.lsf myjob -tvopt -no_ask_on_dlopen
  • % bsub -a tvpoe -n 2 poe myjob -tvopt -no_ask_on_dlopen
  • % bsub -network "" -n 2 totalview -no_ask_on_dlopen poe -a myjob

The above three bsub patterns are equivalent. For the latter two bsub examples above, the general patterns should be:

  • bsub -a tvpoe <other bsub options> poe <program> [program options] [poe options] [-tvopt [totalview options]]

    For example:

    bsub -a tvpoe -n 2 poe myjob myjob_arg1 -euilib ip -tvopt -no_ask_on_dlopen

  • bsub -network <network options> <other bsub options> <totalview command line>

    For example:

    bsub -network "mode=ip" -n 2 totalview -no_ask_on_dlopen poe -a myjob myjob_arg1 -euilib ip

Viewing source code while debugging

Use View > Lookup Function to view the source code of your application while debugging. Enter main in the Name field and click OK. TotalView finds the source code for the main() function and displays it in the Source Pane.