The CSF2 has been replaced by the CSF3 - please use that system! This documentation may be out of date. Please read the CSF3 documentation instead. To display this old CSF2 page click here. |
idb & idbc (Intel Debugger)
Overview
Typically a debugger is used to execute a program and pause under certain conditions (e.g. at specific line numbers) to examine the state of the program, e.g. to look at values associated with the program’s variables. Using the debugger it is also possible to step through execution of the program line by line.
The Intel debugger is supplied with the Intel ifort and icc compilers, and can be used with either Intel and GNU compilers. GUI and command line interfaces are available, see the idb documentation for more details.
- idb – GUI version of the debugger
- idbc – Command line version of the debugger
Restrictions on use
See restrictions on the Intel Compilers page.
Debugging sessions should use the interactive queue, do not run the debugger on the login node.
Set up procedure
The GUI and command-line debuggers (idb and idbc) are available as part of the compiler suites so simply load the required compiler module to set up the debugger for that compiler:
To debug C/C++ code choose one of:
module load compilers/intel/c/12.0.5 module load compilers/intel/c/11.1.075
To debug fortran code choose one of:
module load compilers/intel/fortran/12.0.5 module load compilers/intel/fortran/11.1.064
Before using the Intel debugger a program must be compiled with the appropriate flag, e.g. -g
for the Intel and GNU compilers. Note: the -g
flag may change the default level of optimisation, check the compiler documentation for further information, but a simple example would be:
icc -g -o my_program myprogram.c
The GUI version requires X Windows, e.g. use the -X
flag with ssh
when logging in, plus an X server if using the Microsoft Windows operating system locally. See the instructions for Windows users for more details.
Running the application
Debugging is an interactive process and should use the interactive queue, using the SGE command qrsh. For example, to run the debugger in the my_program
is located) use:
GUI version:
qrsh -cwd -V -l inter -l twoday idb ./my_program
command-line version
qrsh -cwd -V -l inter -l twoday idbc ./my_program
and wait to connect to a remote node on which the debugger will start. You should see something like the following for the command-line debugger:
qrsh -cwd -V -l inter -l twoday idbc ./my_program Intel(R) Debugger for applications running on Intel(R) 64, Version 12.0, Build [76.252.2] ------------------ object file name: ./my_program Reading symbols from /users01/mxyzabc2/dev/src/my_program...done. (idb)
(idb)
is the debugger prompt at which you can enter commands. For example:
- To run your code enter
r optional-args
where optional-args are any command-line args you would normally give to my_program when you run it. - To quit the debugger enter
q
which will return control to the log in node.
Further info
Documentation can be found on the CSF:
- Version 12.0.5:
$INTELROOT/Documentation/en_US/debugger/
- Version 11.1.075:
$INTELROOT/Documentation/en_US/idb/
- Version 11.1.064:
$INTELROOT/Documentation/en_US/idb/
On the CSF the firefox
application can be used to view the html files, and evince can be used to view the pdf files.
Updates
None.