1
votes

I have a CentOS 6.0 x64 server with 2 Geforce 480GTX cards equipped and I am using it to debug my cuda programs. Today I tried to use cuda-gdb on my notebook to remote debug my program. So I tried like this:

  1. I opened my bash shell and use ssh to connect to the server, then enter the directory where the program resides.

  2. I start the cuda-gdbserver by typing this: cuda-gdbserver :9999 ./a.out

  3. After that I got this on the bash:

    Process ./a.out created; pid = 4356

    Listening on port 9999

    It seems the cuda-gdbserver works well.

  4. So I opened a new bash shell, and decide to debug the program using cuda-gdb. First I opened the cuda-gdb, now the shell is like this: (cuda-gdb)

  5. Then I tried to connect the remote server: target remote 192.168.2.105:9999

    where 192.168.2.105 is my server's ip address

  6. But, however, to my disappointment, I got error information from shell, which says: 192.168.2.105:9999: No route to host.

What's wrong? I googled for some time, someone told me that I should stop the iptables service on the server, so I did as they said(service iptables stop), but it still doesn't work. By the way, I have also tried the target extended-remote command in cuda-gdb, no good.

In addition, both the server and my notebook(running ubuntu 12.10 x64) installed the same subversion of cuda toolkit 5.5, and I can debug locally on my server well.

So, is there anybody know what I need to do? It really puzzled me for a long time(Actually I encountered this problem long long ago). I'd like to thank anybody answering my question in advance!

2

2 Answers

1
votes

Can you ping/ssh the remote host?

In our testing, we noticed that the CentOS and Fedora have a firewall enabled by default. Please consult your OS documentation on how to open the ports.

0
votes

It could be that cuda-gdbserver only listens on the loopback interface by default.

Try cuda-gdbserver 0.0.0.0:9999 ./a.out