I’m trying to use cuda profiler on linux. Since I can only ssh to the machine equipped with CUDA, there is no X window support. When I type in the shell I get the following error:
./cudaprof &
[1] 23520
~/cuda_sdk/CudaVisualProfiler/bin$ cudaprof: cannot connect to X server
However, I cannot find any documentation about how to use the profiler solely with the shell. Can anyone help me out?
You can probably use some kind of SSH tunnel to run the GUI part of the profiler on your local X11 installation.
However, may I recommend you install the extremely nice remote desktop software NX /Nomachine server on the remote machine and NX into the server?
It’s extremely fast and convenient. IMO it’s actually nicer and faster to NX in and run multiple bash sessions in the remote window, than to text-only SSH in.
Could you describe in greater detail how you accomplished this? I too need to run the profiler, but my kernel takes longer than the watchdog timer (due to one of my CUDA cards being connected to my monitors) and it errors out.
I get around this by running it in a text terminal (CTRL + ALT + F1), where it runs fine. I’ve tried setting
But the file generated was quite small, and I could not open it in the Visual Profiler. I also tried generating a .csv file but this too did not open correctly. It said that there was an invalid argument for one of the columns.
Is there a sample configuration file that I may need to copy from but set it up for my particular run?
I’ve also tried running the profiler on the example programs that come with the SDK but they would error out (I’m assuming due to the need for an ENTER to exit the program).
There are two ways to do profiling in CUDA. One way is to run “cudaprof”, the Visual Profiler. This requires X window. You can use X forwarding in ssh, or VNC/NX/Remote Desktop to run cudaprof remotely.
The second way is to set CUDA_PROFILE=1 in the environment variable. This doesn’t require X, but the profiling capability is quite limited. The output file is a text file, and cannot be read by the Visual Profiler. Here is a simple introduction:
I have a problem profiling my CUDA program from the command line. I am unable to generate the CUDA_PROFILE_LOG file. However when i profile cuda programs that come with SDK, then it works completely fine.
I guess there’s some problem with my program in CUDA.