Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cuda 8.0 | cudnn 6.0 | nnconv_cudnn.cu: error: too few arguments in function call #937

Open
xwguo opened this issue Mar 30, 2017 · 11 comments

Comments

@xwguo
Copy link

xwguo commented Mar 30, 2017

I am using ubuntu 16.04, matlab 2017a, cudnn 6.0, GTX 1070, cuda 8.0, g++/gcc 5.4.

I could do the vl_compilenn and vl_compilenn with gpu but without cudnn support.
The only error I got is from vl_compilenn with cudnn enable, as shown in below.

Besides, I could compile for all three ways with cudnn-rc4, but when it comes to vl_testnn, there would be lots of missing symbols.

error message with vl_compilenn enable cudnn-6:

/home/emily/Documents/FYP/fayao_3_30/libs/matconvnet-1.0-beta24/matlab/src/bits/impl/nnconv_cudnn.cu(137): error: too few arguments in function call

/home/emily/Documents/FYP/fayao_3_30/libs/matconvnet-1.0-beta24/matlab/src/bits/impl/nnconv_cudnn.cu(356): error: too few arguments in function call

2 errors detected in the compilation of "/tmp/tmpxft_000076fb_00000000-7_nnconv_cudnn.cpp1.ii".
Error using vl_compilenn>nvcc_compile (line 540)
Command "/usr/local/cuda-8.0/bin/nvcc" -c
"/home/emily/Documents/FYP/fayao_3_30/libs/matconvnet-1.0-beta24/matlab/src/bits/impl/nnconv_cudnn.cu"
-DNDEBUG -DENABLE_GPU -DENABLE_CUDNN -I"/usr/local/cuda-8.0/cudnn-6/include" -DENABLE_DOUBLE
-gencode=arch=compute_61,code="sm_61,compute_61" -I"/home/emily/Documents/FYP/R2017a/extern/include"
-I"/home/emily/Documents/FYP/R2017a/toolbox/distcomp/gpu/extern/include" -Xcompiler
-mssse3,-ftree-vect-loop-version,-ffast-math,-funroll-all-loops
-gencode=arch=compute_61,code="sm_61,compute_61" -O3 -Xcompiler -fPIC -D_FORCE_INLINES -o
"/home/emily/Documents/FYP/fayao_3_30/libs/matconvnet-1.0-beta24/matlab/mex/.build/bits/impl/nnconv_cudnn.o"
failed.

Error in vl_compilenn (line 485)
nvcc_compile(opts, srcs{i}, objfile, flags.nvcc)

error message with cudnn-rc4 while doing vl_testnn:

Error occurred in nnbilinearsampler[dataType=single,device=cpu]/check_der_x(ih=value1,iw=value1,oh=value1,ow=value1,multiple_grids=value1) and it did not run to completion.
---------
Error ID:
---------
'MATLAB:mex:ErrInvalidMEXFile'
--------------
Error Details:
--------------
Invalid MEX-fileError occurred in nnbilinearsampler[dataType=single,device=cpu]/check_der_x(ih=value1,iw=value1,oh=value1,ow=value1,multiple_grids=value1) and it did not run to completion.

---------
Error ID:
---------
'MATLAB:mex:ErrInvalidMEXFile'

--------------
Error Details:
--------------
Invalid MEX-file
'/home/emily/Documents/FYP/fayao_3_30/libs/matconvnet-1.0-beta24/matlab/mex/vl_nnbilinearsampler.mexa64':
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm' required by
'/home/emily/Documents/FYP/fayao_3_30/libs/matconvnet-1.0-beta24/matlab/mex/vl_nnbilinearsampler.mexa64':
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm' required by blabalbla a whole bunch of them...
@xwguo
Copy link
Author

xwguo commented Mar 30, 2017

Anyone has any idea how to fix this? Or which version should I switch to?
I would really appreciate your help!

@lenck
Copy link
Contributor

lenck commented Mar 30, 2017 via email

@xwguo
Copy link
Author

xwguo commented Mar 30, 2017

@lenck Thanks a lot for your prompt reply. It compiles with 5.1!
However, when trying vl_testnn, I am still getting those missing symbol error. How can I solve this?

I did add export LD_LIBRARY_PATH="/usr/local/cuda-8.0/cudnn-5.1/lib64:$LD_LIBRARY_PATH" to .bashrc and follow all other instructions on the installing page...

echo $LD_LIBRARY_PATH^ shows
/usr/local/cuda-8.0/cudnn-5.1/lib64:/usr/local/cuda-8.0/lib64:^

Error occurred in nnbilinearsampler[dataType=single,device=cpu]/check_der_x(ih=value1,iw=value1,oh=value1,ow=value1,multiple_grids=value1) and it did not run to completion.
---------
Error ID:
---------
'MATLAB:mex:ErrInvalidMEXFile'
--------------
Error Details:
--------------
Invalid MEX-file
'/home/emily/Documents/FYP/fayao_3_30/libs/matconvnet-1.0-beta24/matlab/mex/vl_nnbilinearsampler.mexa64':
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm' required by
'/home/emily/Documents/FYP/fayao_3_30/libs/matconvnet-1.0-beta24/matlab/mex/vl_nnbilinearsampler.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm' required by
'/home/emily/Documents/FYP/fayao_3_30/libs/matconvnet-1.0-beta24/matlab/mex/vl_nnbilinearsampler.mexa64'
Missing symbol 'ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4' required by
'/home/emily/Documents/FYP/fayao_3_30/libs/matconvnet-1.0-beta24/matlab/mex/vl_nnbilinearsampler.mexa64'
Missing symbol '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm' required by
'/home/emily/Documents/FYP/fayao_3_30/libs/matconvnet-1.0-beta24/matlab/mex/vl_nnbilinearsampler.mexa64'
Missing symbol 'GOMP_critical_end' required by
'/home/emily/Documents/FYP/R2017a/bin/glnxa64/libcusolver.so.8.0->/home/emily/Documents/FYP/R2017a/bin/glnxa64/libmwgpucompiler.so->/home/emily/Documents/FYP/R2017a/bin/glnxa64/libmwgpu.so->/home/emily/Documents/FYP/fayao_3_30/libs/matconvnet-1.0-beta24/matlab/mex/vl_nnbilinearsampler.mexa64'
..........

Thanks a lot!!!

@unvisualism
Copy link

I ran across the same problem, also with using ubuntu 16.04, matlab 2017a, cudnn 6.0, GTX 1070, cuda 8.0, g++/gcc 5.4.

I did try downgrading to cudnn 5.1 and g++/gxx 4.9, which didn't change anything.

I found a solution here: https://groups.google.com/forum/#!topic/caffe-users/aoJdbIxT_PE

The suggestion was to have the needed libraries preload:
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/usr/local/cuda-8.0/lib64/libcudart.so.8.0:/usr/local/cuda-8.0/lib64/libcublas.so.8.0:/usr/lib/x86_64-linux-gnu/libprotobuf.so.9

@daa233
Copy link

daa233 commented Apr 29, 2017

Thank @unvisualism ! I had the same problem with ubuntu 16.04, matlab 2017a, g++/gcc 5.4 and without GPU. I add the following content in ~/.bashrc and fixed the problem.

export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/usr/lib/x86_64-linux-gnu/libprotobuf.so.9

By the way, don't forget to execute source ~/.bashrc in the terminal to make the changes work immediately.

@ghost
Copy link

ghost commented Jun 19, 2017

Hi I wonder if cudnn 6.0 support have been implemented or not.

@hoangcuong2011
Copy link

Thanks @daa233. This works for me!

@lenck
Copy link
Contributor

lenck commented Aug 14, 2017

Hi, the cudnn v6.0 and v7.0 support will be in the next release which should be coming out in few days...

Sorry that it took so long. There were just few minor changes needed to fix it...

@v18saboo
Copy link

v18saboo commented Oct 8, 2017

Hi, I'm getting the same error on Windows. How can I preload those libraries on Windows?

@ghost
Copy link

ghost commented Oct 8, 2017 via email

@autocyz
Copy link

autocyz commented Jan 25, 2018

I have the same error on Ubuntu16.04, GCC5.5. I also try @daa233 's solution, but it doesn't work for me.
Fortunately, I handle it by executing these commands:

cd /usr/local/MATLAB2017/sys/os/glnxa64  #where I installed my matlab
sudo mv libstdc++.so.6.0.20 libstdc++.so.6.0.20_bak
sudo mv libstdc++.so.6 libstdc++.so.6_bak
sudo ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.24 ./
sudo ln -sf ./libstdc++.so.6.0.24 ./libstdc++.so.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants