Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse with Intel Fortran debugger

My problem is the following:

I want to use the idb intel debugger with eclipse to be able to go step by step through my code, much like idb -gui does. I already tried to implement a solution i found where i replace the direct call to idb -gdb with a script:

#!/bin/bash 
exec/usr/local/soft/intel/fc/10.0.025/bin/ifort/idb -gdb "$@" 

This actually works as it starts my program just until it comes to a command prompt. Now i get the following error:

Target request failed: {R,T}xThread terminated.

That is when i wasted about a whole day trying to solve this and decided to post on so. Anyone able to help me further with some intelligent advice? how did you integrate idb into eclipse?

cheers, David

like image 920
tarrasch Avatar asked Nov 30 '10 14:11

tarrasch


2 Answers

Not a specialist, but in case this helps, this thread mentions (even though it is for Intel Fortran 11.0):

I was thinking about your problem some more and I think I was not taking your problem statement as literally as you meant it maybe.
Are you saying the code you cannot see in the debugger resides in a MODULE definition file? If so, I would say the problem is due to general limitations of using gdb as a Fortran debugger. If you use the Intel debugger, you will be able to step into Intel Fortran generated code which is contained in a MODULE.

I see you are using version 11.0 of Intel Fortran. There are a couple of choices for you.

  • Intel Fortran 11.0 comes with a new standalone GUI version of IDB. You could use it if you don’t mind building in Eclipse, but debugging in another tool. You invoke the new gui version with the “idb” command assuming you initialized your environment for using the Intel debugger.
  • Intel Fortran 11.0 also provides the command line version of the debugger which you can invoke with the “idbc” command, again, assuming you have initialized your environment for using the Intel debugger.
  • A third alternative you could try is to modify your debug launch configuration in Photran so that it invokes idbc instead of gdb. This is not something that is officially supported by Intel, but when I try it with an example similar to what I think your situation is, it works o.k. Again, this is not supported by Intel so if you run into other problems in this configuration, there would be no help. If it works well enough for you though, it let’s you do everything within Eclipse/Photran.
    If you want to try it, initialize your environment to use the Intel debugger before you start Eclipse, start Eclipse, open your debug configuration and choose the debugger tab. Then in the “Debugger Options” area, “Main” tab, change “GDB debugger” from “gdb” to “idbc”.

That thread also mentions (in case it has any influence on your issue):

The idb GUI appears to run a backend called iidb, which emulates gdb well enough for the Eclipse IDE to get by.

iidb needs to load certain shared libraries.
I made this happen by adding /opt/intel/Compiler/11.1/038/idb/lib/intel64 to environment variable LD_LIBRARY_PATH prior to Eclipse startup.
Your path should match your specific ifort installation.

In your debug configuration, tab "Debugger," field "GDB debugger", replace gdb with iidb. If you want it to stop on startup, try replacing main with MAIN__.

like image 194
VonC Avatar answered Nov 08 '22 03:11

VonC


Nine years have passed since the most recent answer to this question. Currently, Intel has released oneAPI Toolkits as the next-generation software development tools, following and replacing the Intel Parallel Studio XE toolkits.

In this case, the Debugger should be gdb-oneapi as shown below:

$ module load debugger
$ module list

Currently Loaded Modules:
  1) lmod   2) debugger/2021.5.0

$ which gdb-oneapi 
/opt/intel/oneapi/debugger/2021.5.0/gdb/intel64/bin/gdb-oneapi
like image 27
Hongyi Zhao Avatar answered Nov 08 '22 02:11

Hongyi Zhao