Before debugging, you need to compile your code with theses flags:
Before debugging, you need to compile your code with theses flags:
!!! Note "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 even more debugging information. This option is available for GNU and INTEL C/C++ and Fortran compilers.
-**-O0** : Suppress all optimizations.
**-O0** : Suppress all optimizations.
## Starting a Job with TotalView
## Starting a Job with TotalView
...
@@ -92,7 +91,7 @@ To debug a serial code use:
...
@@ -92,7 +91,7 @@ To debug a serial code use:
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:
!!! Note "Note"
!!! Note
**Please note:** 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:
**Please note:** 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:
```bash
```bash
...
@@ -121,7 +120,7 @@ The source code of this function can be also found in
...
@@ -121,7 +120,7 @@ The source code of this function can be also found in