Software Archive
Read-only legacy content
17061 Discussions

Remote debugging of native application on the Xeon Phi

Didier_N_
Beginner
377 Views

Hi, 

I am currently trying to debug a native Xeon Phi application using Intel Composer XE 2015 and eclipse. The Xeon Phi is installed on a remote server that I can ssh to through an intermediate server. 

I have managed to debug it using gdb-mic in console mode from my local computer. I can also run eclipse on the remote server by forwarding the X window to my local computer, and I managed to debug a native application. However, this solution is not really usable as the network limitations gives an extremely laggy debugging experience while forwarding the graphical interface and debugging the Phi.

Therefore, I would like to run eclipse on my local computer and connect it to the Xeon Phi installed on the remote server. I have however not managed to do so using these instructions (https://software.intel.com/en-us/articles/debugging-intel-xeon-phi-applications-on-linux-host#Configure Native Debugging), as the remote server is hidden behind the intermediary server and I was not able to connect to it using the RSE as explained in this guide. 

Another option would be to manually set up port forwarding from my local computer to the Xeon Phi, and manually start the application with gdbserver on the Xeon Phi listening to the forwarded port. Then, I could set up manual debugging with Eclipse on that port on my local computer, and start debugging. However, using gdb-mic, I run into this error :

Could not determine GDB version using command: /opt/intel/composer_xe_2015.3.187/debugger/gdb/intel64_mic/bin/gdb-mic --version
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

I have not found indications on how to solve this issue, and I am not very familiar with gdb on eclipse yet. 

Are there any solutions to this problem or another way to debug the native Xeon Phi application on an hidden remote server using Eclipse?

Thank you for your time

0 Kudos
1 Reply
Georg_Z_Intel
Employee
377 Views

Hello,

I cannot help you to remote connect to the coprocessor because I don't know your network. The solution with port forwarding you suggested is a good approach because you can figure out connection issues (e.g. due to firewalls, gateways, proxies, ...) when setting up the tunnel.

Basically once you established a tunnel to the coprocessor to connect to the GDBServer (you can define the port #s as you like), you can follow the steps for remote debugging. You'll connect then to the port and host name of the tunnel endpoint ("localhost" if tunnel ends at your development system).

The reason for the error you described is that compilervars.sh (end hence debuggervars.sh) was not sourced. Please do so before starting Eclipse. The sourced environment needs to be in the same environment Eclipse is started in.

Please let me know how this works out.

Best regards,

Georg Zitzlsberger

0 Kudos
Reply