{"id":153,"date":"2013-04-22T13:40:50","date_gmt":"2013-04-22T13:40:50","guid":{"rendered":"http:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/?page_id=153"},"modified":"2013-07-05T10:05:34","modified_gmt":"2013-07-05T10:05:34","slug":"idb","status":"publish","type":"page","link":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/idb\/","title":{"rendered":"idb &#038; idbc (Intel Debugger)"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>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&#8217;s variables. Using the debugger it is also possible to step through execution of the program line by line.<\/p>\n<p>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.<\/p>\n<ul>\n<li>idb &#8211; GUI version of the debugger<\/li>\n<li>idbc &#8211; Command line version of the debugger<\/li>\n<\/ul>\n<h2>Restrictions on use<\/h2>\n<p>See restrictions on the <a href=\"\/csf-apps\/software\/applications\/compilersintel\">Intel Compilers page<\/a>.<\/p>\n<p>Debugging sessions should use the interactive queue, do not run the debugger on the login node. <\/p>\n<h2>Set up procedure<\/h2>\n<p>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:<\/p>\n<p>To debug C\/C++ code choose <strong>one<\/strong> of:<\/p>\n<pre>\r\nmodule load compilers\/intel\/c\/12.0.5\r\n\r\nmodule load compilers\/intel\/c\/11.1.075\r\n<\/pre>\n<p>To debug fortran code choose <strong>one<\/strong> of:<\/p>\n<pre>\r\nmodule load compilers\/intel\/fortran\/12.0.5\r\n\r\nmodule load compilers\/intel\/fortran\/11.1.064\r\n<\/pre>\n<p>Before using the Intel debugger a program must be compiled with the appropriate flag, e.g. <code>-g<\/code> for the Intel and GNU compilers. Note: the <code>-g<\/code> flag may change the default level of optimisation, check the compiler documentation for further information, but a simple example would be:<\/p>\n<pre>\r\nicc -g -o my_program myprogram.c\r\n<\/pre>\n<p>The GUI version requires X Windows, e.g. use the <code>-X<\/code> flag with <code>ssh<\/code> when logging in, plus an X server if using the Microsoft Windows operating system locally. See the <a href=\"\/csf2\/getting-started-on-the-csf\/using-the-csf-from-ms-windows\">instructions for Windows users<\/a> for more details.<\/p>\n<h2>Running the application<\/h2>\n<p>Debugging is an interactive process and should use the interactive queue, using the SGE command <a href=\"\/csf2\/csf-user-documentation\/sge-interactive-jobs-qrsh\/\">qrsh<\/a>. For example, to run the debugger in the <emcurrent directory<\/em> (where <code>my_program<\/code> is located) use:<\/p>\n<p>GUI version:<\/p>\n<pre>\r\nqrsh -cwd -V -l inter -l twoday idb .\/my_program\r\n<\/pre>\n<p>command-line version<\/p>\n<pre>\r\nqrsh -cwd -V -l inter -l twoday idbc .\/my_program\r\n<\/pre>\n<p>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:<\/p>\n<pre>\r\nqrsh -cwd -V -l inter -l twoday idbc .\/my_program\r\nIntel(R) Debugger for applications running on Intel(R) 64, Version 12.0, Build [76.252.2]\r\n------------------ \r\nobject file name: .\/my_program \r\nReading symbols from \/users01\/mxyzabc2\/dev\/src\/my_program...done.\r\n(idb)\r\n<\/pre>\n<p><code>(idb)<\/code> is the debugger prompt at which you can enter commands. For example:<\/p>\n<ul>\n<li>To run your code enter <code>r <em>optional-args<\/em><\/code> where <em>optional-args<\/em> are any command-line args you would normally give to my_program when you run it.<\/li>\n<li>To quit the debugger enter <code>q<\/code> which will return control to the log in node.<\/li>\n<\/ul>\n<h2>Further info<\/h2>\n<p>Documentation can be found on the CSF:<\/p>\n<ul>\n<li>Version 12.0.5: <code>$INTELROOT\/Documentation\/en_US\/debugger\/<\/code><\/li>\n<li>Version 11.1.075: <code>$INTELROOT\/Documentation\/en_US\/idb\/<\/code><\/li>\n<li>Version 11.1.064: <code>$INTELROOT\/Documentation\/en_US\/idb\/<\/code><\/li>\n<\/ul>\n<p>On the CSF the <code>firefox<\/code> application can be used to view the html files, and <a href=\"\/csf-apps\/software\/applications\/evince\">evince<\/a> can be used to view the pdf files.<\/p>\n<h2>Updates<\/h2>\n<p>None.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;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.. <a href=\"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/software\/applications\/idb\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":31,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-153","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/comments?post=153"}],"version-history":[{"count":8,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/153\/revisions"}],"predecessor-version":[{"id":829,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/153\/revisions\/829"}],"up":[{"embeddable":true,"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/pages\/31"}],"wp:attachment":[{"href":"https:\/\/ri.itservices.manchester.ac.uk\/csf-apps\/wp-json\/wp\/v2\/media?parent=153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}