gpuDevice suddenly stopped working

60 views (last 30 days)
Hi there,
using MATLAB R2020a on Arch Linux, GPU-calls like 'gpuArray' used to work fine even until yesterday. I have no idea what happened, but since today I get
>> gpuDevice
Error using gpuDevice (line 26)
Unable to find a supported GPU device. For more information on GPU support, see GPU Support by Release.
with no chance of GPU computing. Clearly, the GPU is supported, so that cannot be the problem. I haven't found any other clue to what's wrong. Matlab does recognize the GPU though and plotting works as well
>> opengl info
Version: '4.6.0 NVIDIA 455.28'
Vendor: 'NVIDIA Corporation'
Renderer: 'GeForce GTX 1050/PCIe/SSE2'
MaxTextureSize: 32768
Visual: 'Visual 0x27, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleration, Double buffer, Antialias 8 samples)'
Software: 'false'
HardwareSupportLevel: 'full'
SupportsGraphicsSmoothing: 1
SupportsDepthPeelTransparency: 1
SupportsAlignVertexCenters: 1
Extensions: {387×1 cell}
MaxFrameBufferSize: 32768
Unfortunatly the programs I have do not work without GPU now. I really need this fixed - any ideas on whats going on?
I have tried upgrading to R2020b, but same results. Nvidia drivers are up-to-date and nvidia-smi has a MATLAB process registered and shows CUDA Version: 11.1.
Any suggestions are very much welcome!

Accepted Answer

Andrea Picciau
Andrea Picciau on 20 Oct 2020
Hello there!
I would check the following:
  1. Make sure that the environment variable CUDA_VISIBLE_DEVICES is not set. You can do this by running the following command in MATLAB: getenv('CUDA_VISIBLE_DEVICES')
  2. Run NVIDIA's tool nvidia-smi and make sure your card is enabled for compute. For example, check the Compute Mode. The tool's documentation will tell you more about this setting.
  3. Consider backdating the drivers by a release to see if that helps.
  4. Try running a CUDA sample and check if that works.
  1 Comment
graesslb on 23 Oct 2020
Hello Andrea, thanks for your suggestions.
The tip with the samples put me on the right track and its the kernel not the driver that has to be downgraded. Actually, now there is even a note on that the nvidia drivers are incompatible with kernel >=5.9. I have now changed to linux-lts (and nvidia-lts) which finally solves the problem.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by