Reputation: 3460
I am working on OS X high sierra. On this machine I don't have Nvidia GPU, therefore I want to develop and run my codes on the remote Ubuntu. I connect to my home ubuntu desktop using ssh.
I've installed CUDA toolkit 9.2 on both machines. I followed this guide - created new cuda project with nsight (simple cuFFT from samples) and set up remote connection.
I was able to build and run my application without errors (Build was also performed on remote host). However, I also want to be able to debug the application. After building the app in debug mode (on the remote host) and running a debugger the following error pops up:
Error in services launch sequence
Error while launching command /Developer/NVIDIA/CUDA- 9.2/bin/cuda-gdb --interpreter mi2 --nx --cuda-use-lockfile=0
Error while launching command /Developer/NVIDIA/CUDA- 9.2/bin/cuda-gdb --interpreter mi2 --nx --cuda-use-lockfile=0
Cannot run program "/Developer/NVIDIA/CUDA-9.2/bin/cuda-gdb":
Unknown reason
Did anyone ever have that kind of error? How can I solve it? Try the earlier version of CUDA toolkit? Should the versions of CUDA toolkit be the same on the host and local machines?
UPDATE: I've been doing further search on this topic. In the getting started cuda gdb documentation it is said that I can execute the following:
$ sudo chgrp procmod /Developer/NVIDIA/CUDA-9.2/bin/cuda-binary-gdb
$ sudo chmod 2755 /Developer/NVIDIA/CUDA-9.2/bin/cuda-binary-gdb
$ sudo chmod 755 /Developer/NVIDIA/CUDA-9.2/bin/cuda-gdb
However, I was not able to find cuda-binary-gdb
or cuda-gdb
files in the above directory. DO I need to install them? They should have been installed with the CUDA toolkit.
EDIT 2. I found the problem source. As stated there, CUDA toolkit for mac does not include gbd anymore. I will have to install it from source. If I succeed, I will post an answer.
Upvotes: 0
Views: 684
Reputation: 3460
In agreement with this topic, I found out that there is no cuda-gdb feature included in the Cuda toolkit for MAC. I was trying to install it from source, as suggested in the topic above. I did not succeed - "make" step was executed with errors.
As far as I understood, in order to remotely debug the cuda code from MAC machine using NSight for Eclipse (or any other IDE), one has to run gdb debugger installed on MAC machine. Therefore, I was not able to debug using Nsight. In the debug configuration -> debugger tab I was prompted to choose local executable and there was no option to choose the remote one.
However, it is totally possible to debug the code in terminal using either local or remote debugger. Cuda-gdb is included in Linux version of CUDA-toolkit and I was able to debug my code in terminal by running cuda-gdb on the remote host.
Upvotes: 1