Skip to content
Snippets Groups Projects
Commit c121c200 authored by Jan Siwiec's avatar Jan Siwiec
Browse files

Update total-view.md

parent 62ce55dc
No related branches found
No related tags found
4 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section
...@@ -4,7 +4,7 @@ TotalView is a GUI-based source code multi-process, multi-thread debugger. ...@@ -4,7 +4,7 @@ TotalView is a GUI-based source code multi-process, multi-thread debugger.
## License and Limitations for Cluster Users ## License and Limitations for Cluster Users
On the cluster users can debug OpenMP or MPI code that runs up to 64 parallel processes. These limitation means that: On the cluster, users can debug OpenMP or MPI code that runs up to 64 parallel processes. This limitation means that:
```console ```console
1 user can debug up 64 processes, or 1 user can debug up 64 processes, or
...@@ -56,9 +56,9 @@ Compile the code: ...@@ -56,9 +56,9 @@ Compile the code:
Before debugging, you need to compile your code with theses flags: Before debugging, you need to compile your code with theses flags:
!!! note !!! note
**-g** : Generates extra debugging information usable by GDB. -g3 includes even more debugging information. This option is available for GNU and INTEL C/C++ and Fortran compilers. **-g** Generates extra debugging information usable by GDB. -g3 includes additional debugging information. This option is available for GNU, Intel C/C++, and Fortran compilers.
**-O0** : Suppress all optimizations. **-O0** Suppresses all optimizations.
## Starting a Job With TotalView ## Starting a Job With TotalView
...@@ -68,9 +68,9 @@ Be sure to log in with an X window forwarding enabled. This could mean using the ...@@ -68,9 +68,9 @@ Be sure to log in with an X window forwarding enabled. This could mean using the
ssh -X username@salomon.it4i.cz ssh -X username@salomon.it4i.cz
``` ```
Other options is to access login node using VNC. See the detailed information on how to use graphic user interface on Anselm. Another option is to access the login node using VNC. See the detailed information on how to use the GUI on Anselm.
From the login node an interactive session with X windows forwarding (-X option) can be started by following command (for Anselm use 16 threads): From the login node an interactive session with X windows forwarding (-X option) can be started by the following command (for Anselm use 16 threads):
```console ```console
$ qsub -I -X -A NONE-0-0 -q qexp -lselect=1:ncpus=24:mpiprocs=24,walltime=01:00:00 $ qsub -I -X -A NONE-0-0 -q qexp -lselect=1:ncpus=24:mpiprocs=24,walltime=01:00:00
...@@ -80,7 +80,7 @@ Then launch the debugger with the totalview command followed by the name of the ...@@ -80,7 +80,7 @@ Then launch the debugger with the totalview command followed by the name of the
### Debugging a Serial Code ### Debugging a Serial Code
To debug a serial code use: To debug a serial code, use:
```console ```console
totalview test_debug totalview test_debug
...@@ -88,10 +88,10 @@ totalview test_debug ...@@ -88,10 +88,10 @@ totalview test_debug
### Debugging a Parallel Code - Option 1 ### Debugging a Parallel Code - Option 1
To debug a parallel code compiled with **OpenMPI** you need to setup your TotalView environment: To debug a parallel code compiled with **OpenMPI**, you need to setup your TotalView environment:
!!! hint !!! hint
To be able to run parallel debugging procedure from the command line without stopping the debugger in the mpiexec source code you have to add the following function to your **~/.tvdrc** file. To be able to run a parallel debugging procedure from the command line without stopping the debugger in the mpiexec source code, you have to add the following function to your **~/.tvdrc** file.
```console ```console
proc mpi_auto_run_starter {loaded_id} { proc mpi_auto_run_starter {loaded_id} {
...@@ -121,7 +121,7 @@ $ /apps/all/OpenMPI/1.10.1-GNU-4.9.3-2.25/etc/openmpi-totalview.tcl #Salomon ...@@ -121,7 +121,7 @@ $ /apps/all/OpenMPI/1.10.1-GNU-4.9.3-2.25/etc/openmpi-totalview.tcl #Salomon
$ /apps/mpi/openmpi/intel/1.6.5/etc/openmpi-totalview.tcl #Anselm $ /apps/mpi/openmpi/intel/1.6.5/etc/openmpi-totalview.tcl #Anselm
``` ```
You can also add only following line to you ~/.tvdrc file instead of You can also add only following line to your ~/.tvdrc file instead of
the entire function: the entire function:
```console ```console
...@@ -138,19 +138,19 @@ Now you can run the parallel debugger using: ...@@ -138,19 +138,19 @@ Now you can run the parallel debugger using:
$ mpirun -tv -n 5 ./test_debug $ mpirun -tv -n 5 ./test_debug
``` ```
When following dialog appears click on "Yes" When the following dialog appears, click on "Yes"
![](../../img/totalview1.png) ![](../../img/totalview1.png)
At this point the main TotalView GUI window will appear and you can insert the breakpoints and start debugging: At this point, the main TotalView GUI window will appear and you can insert the breakpoints and start debugging:
![](../../img/totalview2.png) ![](../../img/totalview2.png)
### Debugging a Parallel Code - Option 2 ### Debugging a Parallel Code - Option 2
Other option to start new parallel debugging session from a command line is to let TotalView to execute mpirun by itself. In this case user has to specify a MPI implementation used to compile the source code. Another option to start a new parallel debugging session from a command line is to let TotalView to execute mpirun by itself. In this case, the user has to specify an MPI implementation used to compile the source code.
The following example shows how to start debugging session with Intel MPI: The following example shows how to start a debugging session with the Intel MPI:
```console ```console
$ ml intel $ ml intel
...@@ -158,13 +158,13 @@ $ ml TotalView/8.15.4-6-linux-x86-64 ...@@ -158,13 +158,13 @@ $ ml TotalView/8.15.4-6-linux-x86-64
$ totalview -mpi "Intel MPI-Hydra" -np 8 ./hello_debug_impi $ totalview -mpi "Intel MPI-Hydra" -np 8 ./hello_debug_impi
``` ```
After running previous command you will see the same window as shown in the screenshot above. After running the previous command, you will see the same window as shown in the screenshot above.
More information regarding the command line parameters of the TotalView can be found TotalView Reference Guide, Chapter 7: TotalView Command Syntax. More information regarding the command line parameters of the TotalView can be foundin the TotalView Reference Guide, Chapter 7: TotalView Command Syntax.
## Documentation ## Documentation
[1] The [TotalView documentation][d] web page is a good resource for learning more about some of the advanced TotalView features. [1] The [TotalView documentation][d] web page is a good source for learning more about some of the advanced TotalView features.
[a]: https://extranet.it4i.cz/rsweb/salomon/license/Totalview [a]: https://extranet.it4i.cz/rsweb/salomon/license/Totalview
[b]: https://extranet.it4i.cz/rsweb/anselm/license/Totalview [b]: https://extranet.it4i.cz/rsweb/anselm/license/Totalview
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment