TotalView is a multiprocess debugger for applications written in C, C++, FORTRAN 77, Fortran 90, and PGI HPF. It supports multiple parallel programming paradigms including MPI, PVM and OpenMP.
To use totalview, first load the totalview module (module load totalview). For both serial code and parallel code, compile your code with the -g, option.
module load intel ompi/intel totalview mpif90 -g my.f90 mpirun -np 4 -tv ./a.out or mpirun -np 4 -tv ./a.out -a < input > output
After the GUI appears, click the "Go" button. Next select "Do not ask this question again" and click "No" on the newly appeared small window. Then click yes in the following one. This procedure will lead you to the code contents. For debugging serial and OpenMP jobs, see the procedures described below for the Lab machines.
Lab Linux machines
One can use totalview for debugging serial and OpenMO jobs. First load the totalview module and compile your code with the -g, option.
For debugging a serial job:
module load intel totalview icpc -g my.cpp totalview ./a.out -a < input > output
For debugging parallel OpenMP jobs:
module load intel totalview icpc -g -openmp my.cpp export OMP_NUM_THREADS=2 totalview ./a.out or totalview ./a.out -a < input > output