matlab can't find nvcc problem

903 views
Skip to first unread message

Pei Liu

unread,
Mar 13, 2019, 5:49:35 AM3/13/19
to MatConvNet: CNNs for MATLAB
Hello all, the problem can be described as:
---------------------------------------------
Attention: Setting the 'MW_NVCC_PATH' environment
variable to '/usr/local/cuda-10.1/bin/nvcc'
> In vl_compilenn>activate_nvcc (line 752)
  In vl_compilenn (line 296)
attention: NVCC not found in the command line path or the
one found does not matches
'/usr/local/cuda-10.1/bin/nvcc'.
> In vl_compilenn>activate_nvcc (line 761)
  In vl_compilenn (line 296)
Location of NVCC (/usr/local/cuda-10.1/bin) added to your command search PATH.
nvcc fatal   : '-DNDEBUG': expected a number
Error to use vl_compilenn>nvcc_compile (line 615)
Command "/usr/local/cuda-10.1/bin/nvcc" -c -o
"/home/u/volpi/matconvnet-1.0-beta25/matlab/mex/.build/bits/data.o"
"/home/u/volpi/matconvnet-1.0-beta25/matlab/src/bits/data.cu"
-DENABLE_GPU -DENABLE_DOUBLE -O -DNDEBUG
-D_FORCE_INLINES --std=c++11
-I"/usr/local/MATLAB/R2018b/extern/include"
-I"/usr/local/MATLAB/R2018b/toolbox/distcomp/gpu/extern/include"
-gencode=arch=compute_50,code=\"sm_50,compute_50\"
--compiler-options=-fPIC
--compiler-options=-mssse3,-ffast-math  failed.

Error vl_compilenn (line 487)
      nvcc_compile(opts, srcs{i}, objfile, flags) ;
-----------------------------------------------------------------------------------------
my OS is Ubuntu 18.04.1
matlab version is: MATLAB 2018b

who can give me a hand?
Kind regards,
Pei

Pei Liu

unread,
Mar 13, 2019, 5:52:30 AM3/13/19
to MatConvNet: CNNs for MATLAB
Above error generated by command:
vl_compilenn('enableGpu',true,...
'cudaRoot','/usr/local/cuda-10.1',...
'cudaMethod','nvcc')


by the way, CUDA seems installed correct by input:
u@u-u:~$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:17_PST_2019
Cuda compilation tools, release 10.1, V10.1.105
correct by input nvcc -V, outputs are:


在 2019年3月13日星期三 UTC上午9:49:35,Pei Liu写道:

Shi Yan

unread,
May 17, 2019, 6:44:10 PM5/17/19
to MatConvNet: CNNs for MATLAB
the real problem here is the -O flag, it needs a number, change it to -O0 resolve the issue.

Shi Yan

unread,
May 17, 2019, 6:52:37 PM5/17/19
to MatConvNet: CNNs for MATLAB

Umair Mukati

unread,
May 18, 2019, 2:44:04 PM5/18/19
to MatConvNet: CNNs for MATLAB
Dear Shiyan, 

Thank you for your help. I was getting the same error earlier. Now, I am stuck at different point. I am not able to understand the source of this problem. For your reference, I am attaching a screenshot of this error.

Best regards,
Capture.PNG
Reply all
Reply to author
Forward
0 new messages