CUDA 10.1 not recognized (searching for CUDA 10.0 instead)
Show older comments
Hey Everyone,
I'm working on a fresh install of an Ubuntu 18.04 system. Everything was going well until I got MATLAB 2019a and was trying to compile GPU code.
Namely, when running
mexcuda mexGPUExample.cu
In MATLAB, it will tell me:
Warning: Version 10.0 of the CUDA toolkit could not be found. If installed, set MW_NVCC_PATH environment variable
to location of nvcc compiler.
> In mexcuda (line 166)
Error using mex
No supported compiler was found. For options, visit https://www.mathworks.com/support/compilers.
Error in mexcuda (line 166)
[varargout{1:nargout}] = mex(mexArguments{:});
So I found my CUDA 10.1 installation at the normal symbolic link place and updated the environment:
setenv('MW_NVCC_PATH','/usr/local/cuda/bin')
Then ran mexcuda again. Still the same error message. However, oddly enough, when I run d = gpuDevice() it works perfectly and shows:
>> d = gpuDevice
d =
CUDADevice with properties:
Name: 'GeForce GTX 1070'
Index: 1
ComputeCapability: '6.1'
SupportsDouble: 1
DriverVersion: 10.1000
ToolkitVersion: 10
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 8.5126e+09
AvailableMemory: 8.0890e+09
MultiprocessorCount: 15
ClockRateKHz: 1721000
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
CanMapHostMemory: 1
DeviceSupported: 1
DeviceSelected: 1
If I update my path variable and run nvcc --version it shows:
$ export PATH=/usr/local/cuda-10.1/bin
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Apr_24_19:10:27_PDT_2019
Cuda compilation tools, release 10.1, V10.1.168
Any ideas as to why CUDA is recognized, the GPU works, but MATLAB will not let CUDA 10.1 be CUDA 10.0?
Thanks!
1 Comment
Dustin Hayden
on 6 Aug 2019
Edited: Dustin Hayden
on 6 Aug 2019
Accepted Answer
More Answers (0)
Categories
Find more on Parallel and Cloud in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!