GPU and SSH

I just got a new machine with an NVIDIA Quadro 4000 GPU and thought I would give GPU processing a try. I have installed Arch Linux with the proprietary NVIDIA drivers and CUDA packages and MATLAB R2011a. If I locally log into the machine and run
gpuDevice
everything looks good. I then tried to remotely log into the machine. I can log remotely with ssh -X, but I cannot get MATLAB to accept keyboard input. If I log in ssh -Y I can get the keyboard to work. In both cases
gpuDevice
fails with:
??? Error using ==> feval
No device supporting CUDA was found.
Error in ==> /usr/local/matlab/R2011a/toolbox/distcomp/gpu/+parallel/+internal/+gpu/currentDeviceIndex.p>currentDeviceIndex at 7
Error in ==> /usr/local/matlab/R2011a/toolbox/distcomp/gpu/+parallel/+internal/+gpu/deviceProperties.p>deviceProperties at 8
Error in ==> GPUDevice.GPUDevice>GPUDevice.current at 34
[props, E] = parallel.internal.gpu.deviceProperties();
Error in ==> gpuDevice at 18
dev = parallel.gpu.GPUDevice.current();
Given that it doesn't work, I see that maybe I need a Tesla and not a Quadro GPU. Anyone know if I bought the wrong GPU or if it is something else.
EDIT Based on Thomas's answer I can now report that
gpuDevice
works if ssh into the machine and then launch MATLAB as root.

 采纳的回答

Daniel Shub
Daniel Shub 2012-5-15
COMPUTE=:0
Such an easy answer. Apparently you need to set the COMPUTE environment variable.

更多回答(1 个)

Thomas
Thomas 2012-5-15
Quadro 4000 has a compute capability of 2.0 which is more than enough for MATLAB.
Your CUDA drivers do not seem to have loaded correctly.
Can you run the following command in terminal when you ssh -X into the remote machine..
deviceQuery (this gives the status of the device)
If this fails , your CUDA installation was not correct or the drivers are not loading, since it works when you log on locally..
nvidia-smi -a

4 个评论

Although not a solution, it has provided insight ...
Both deviceQuery and nvidia-smi -a fail if I run them as a regular user, but if I run them as root, it looks good. If I launch MATLAB over ssh as root then gpuDevice works. So it looks like the GPU is fine, and CUDA and the drivers are close to installed correctly and it is a permission issue.
Thomas
Thomas 2012-5-15
Yes most definitely a permission issues.. make sure your ~/.nvidia-settings-rc. is avilable for your user (who is non root) and you can also place the
nvidia-settings --load-config-only
command in the ~/.xinitrc file so that your settings are applied automatically when you log in to X
Thomas
Thomas 2012-5-15
what flavor of linux are you on? the above file references are for Ubuntu..
I found a solution, but thanks for this. I was trying not to run X on the new machine, so I didn't run nvidia-settings and I don't have a nvidia-settings-rc. My guess is if I did, that that would have set the COMPUTE environment variable.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Get Started with GPU Coder 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by