debugging remotely on MIC

debugging remotely on MIC


I am trying to run gdb on the mic and i get the following error:

HYDU_create_process (./utils/launch/launch.c:111): execvp error on file /tmp/gdb (No such file or directory)

but i did copy the gdb on mic using--> scp  /usr/linux-k1om-4.7/linux-k1om/usr/bin/gdb mic0:/tmp"

also i followed the steps on, in one section it mentions about debugging remotely and uses $ scp <composer_xe_root>/debugger/gdb/target/mic/bin/gdbserver mic0:/tmp

but i tried to find a directory /debugger/gdb/, my computer but it seems there is no such directory,

(I can successfully run gdb on xeon processor,)

thank you for the help in advance


8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

That's a MIC native debugger.  If you copy it over to mic0:/bin it will run a native application in a shell on mic.

The gdbserver would come in the (optional) debugger installation with the Intel Fortran or C++ compiler

hello Tim,

i do have a gdbserver but the directory is different from what is mentioned in the link(for MIC debugging). So when i provide the gdb server directory i still cannot use gdb remotely on MIC.

Yeah you are right, i can debug native application on MIC, the problem i get is when i try to use gdb remotely

hello , i changed my approach and switched to idb_debugger which is running fine through remote debugging,

but i have another issue: I am trying to run two programs simultaneously one on MIC and one on Xeon, it involves handshake between the two.

the issue i face is : I need to run both the exes simultaneously for program to work. I need to debug the MIC program while the program is running.

this is the command i am using currently:

 mpirun -host mic0 -n 1  ~/hello.mic: -host localhost -n 1 ./hello.xeon, how do i add a debug option in this command,

Hi Vikrant,

Consulting with some MPI experts here, they suggest two methods for debugging. The first is to set, using -genv, the I_MPI_DEBUG variable. See section, "Environmental Variables", in the Intel(r) MPI Library for Linux* OS Reference Manual. This gives you debug information related to the MPI Library.

     mpirun –genv I_MPI_DEBUG 3 -host mic0 -n 1  ~/hello.mic: -host localhost -n 1 ./hello.xeon

Another suggestion is to use the -v option which gives you debug information about the MPI process manager. See section in the same document.



Try adding -gdb to your mpirun command.

mpirun -gdb -host mic0 -n 1 ./hello.mic: -host localhost -n 1 ./hello.xeon

mpigdb: np = 2
mpigdb: attaching to 185758 ./hello.xeon localhost
mpigdb: attaching to 37159 ./hello.mic mic0
[0,1] (mpigdb)

hi Taylor thanks for the debug option, I tried it but i get some library issues,  

hi Gregg i did put -gdb and heres what i got:

mpirun -gdb -host mic0 -n 1 ~/hello.mic : -host localhost -n 1 ./hello.xeon
mpigdb: np = 2
mpigdb: attaching to 4397 /root/hello.mic mic0
mpigdb: hangup detected: while read from [0]
mpigdb: attaching to 10995 ./hello.xeon localhost
[0,1] (mpigdb) 


now i tried running it like how i debug in gdb by putting break point

"(mpigdb) break main" but the program just stood there does nothing

Hi Vikrant,

I assume you're running the Intel® MPI Library here?  Do you know what version?

Using the -gdb option should be what enables the GNU debugger with Intel MPI.  Can you tell me if your original mpirun job (without -gdb) finishes successfully?

Alternatively, you can attach to a running process via the "-gdba <pid>" option, like this:

$ mpirun -gdba <pid>

Perhaps you can start the job first, then attach to the rank you want to debug this way.


Gergana Slavova
Technical Consulting Engineer
Intel® Cluster Tools

Leave a Comment

Please sign in to add a comment. Not a member? Join today