Open astha0899 opened 5 years ago
I'm failing at the same place but nvcc isn't giving an error message:
vl_compilenn: NVCC CC: "E:\projects\DataProcessing\cuda\bin\nvcc" -c -o "E:\projects\DataProcessing\matconvnet-1.0-beta25\matlab\mex.build\bits\data.obj" "E:\projects\DataProcessing\matconvnet-1.0-beta25\matlab\src\bits\data.cu" -DENABLE_GPU -DENABLE_DOUBLE -O0 -DNDEBUG -D_FORCE_INLINES --std=c++11 -I"E:\Program Files\MATLAB\R2018a\extern\include" -I"E:\Program Files\MATLAB\R2018a\toolbox\distcomp\gpu\extern\include" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --compiler-options=/MD --compiler-bindir="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\bin" Error using vl_compilenn>nvcc_compile (line 615) Command "E:\projects\DataProcessing\cuda\bin\nvcc" -c -o "E:\projects\DataProcessing\matconvnet-1.0-beta25\matlab\mex.build\bits\data.obj" "E:\projects\DataProcessing\matconvnet-1.0-beta25\matlab\src\bits\data.cu" -DENABLE_GPU -DENABLE_DOUBLE -O0 -DNDEBUG -D_FORCE_INLINES --std=c++11 -I"E:\Program Files\MATLAB\R2018a\extern\include" -I"E:\Program Files\MATLAB\R2018a\toolbox\distcomp\gpu\extern\include" -gencode=arch=compute_75,code=\"sm_75,compute_75\" --compiler-options=/MD --compiler-bindir="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\bin" failed.
Error in vl_compilenn (line 487) nvcc_compile(opts, srcs{i}, objfile, flags) ;
Windows 10, CUDA v10.1.168, VS 2017, MATLAB 2018a, matconvnet-1.0-beta25
OK, so I got it working.
I used the modified script https://github.com/vlfeat/matconvnet/issues/1200
I had to change the -O options between the msvc++ compiler and the mex one:
% BASE: Base flags passed to
mexand
nvcc` always.
flags.base = {} ;
if opts.enableGpu, flags.base{end+1} = '-DENABLE_GPU' ; end
if opts.enableDouble, flags.base{end+1} = '-DENABLE_DOUBLE' ; end
if opts.enableCudnn
flags.base{end+1} = '-DENABLE_CUDNN' ;
flags.base{end+1} = ['-I"' opts.cudnnIncludeDir '"'] ;
end
if opts.verbose > 1, flags.base{end+1} = '-v' ; end
if opts.debug
flags.base{end+1} = '-g' ;
flags.base{end+1} = '-DDEBUG' ;
else
flags.base{end+1} = '-DNDEBUG' ;
end
% MEX: Additional flags passed to mex
for compiling C++
% code. CXX and CXXOPTIOM are passed directly to the encapsualted compiler.
if verLessThan('matlab','9,4')
flags.mex = {'-largeArrayDims -O'} ;
else
flags.mex = {''};
end
`
And finally I had to sort out an issue with --compiler-bindir passing the wrong folder for the vc++ compiler. On my system it should be C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64, not sure where the script was getting the idea that it should be "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\bin" but that was the problem.
I hacked it with adding the path to the environment variables (which had issues with regards to properly updating them) and commenting out the line in the script but its probably easier just to hack the script and override it.
I've done vl_testnn with and without compiling cudnn. Without all is good, with, there are 61 errors. Not sure what's up with that.
Thank you a lot!! I was trying to figure out the problem for hours, and it was the same: the path was "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\bin". I just copied the bin folder to this path and it worked!
Can anybody tell me how to hack the script to change the path,not able to figure it out.
I’m working on Windows 10, with CUDA Toolkit 8.0,Visual Studio 2015 and MATLAB R2017b, matconvnet-1.0-beta25. My gpuDevice details are attached below. I’m trying to install MatConvNet and continuously keep receiving the following error.