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

Errors when compiling caffe. #25

Open
AndresPMD opened this issue Nov 7, 2018 · 9 comments
Open

Errors when compiling caffe. #25

AndresPMD opened this issue Nov 7, 2018 · 9 comments

Comments

@AndresPMD
Copy link

Hello @tonghe90 ,
I have been experiencing a lot of errors, after a while these errors appear.
The following is the output of: make all -j 8

I have followed the steps outlined in: https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-Installation-Guide applied to your own modified caffe version.

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(11280): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(11289): error: argument of type "void *" is incompatible with parameter of type "long long *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512vlintrin.h(11300): error: argument of type "void *" is incompatible with parameter of type "long long *"

92 errors detected in the compilation of "/tmp/tmpxft_00001626_00000000-13_exp_layer.compute_52.cpp1.ii".
Makefile:594: recipe for target '.build_release/cuda/src/caffe/layers/exp_layer.o' failed
make: *** [.build_release/cuda/src/caffe/layers/exp_layer.o] Error 1

System specs:
gcc = 5.5
opencv = 3.3
python = 2.7
cudnn = 7.5
cuda = 8.0
O.S. = Ubuntu 16.04

Makefile.config

Makefile.config.txt

@tonghe90
Copy link
Owner

tonghe90 commented Nov 7, 2018

I think you can have a try to use CUDNN 6.0

@AndresPMD
Copy link
Author

@tonghe90 Well the problem appears with GPU and CPU, so I guess it is not the CUDNN version.

@tonghe90
Copy link
Owner

tonghe90 commented Nov 7, 2018

You can have a try of this Makefile.config:
https://drive.google.com/open?id=1bmgKnvD-hnzL6XhKzO3-vp5B3Y_yPmhl

@AndresPMD
Copy link
Author

Hello,
I already tried with your config file. The problem persist
CXX src/caffe/solvers/rmsprop_solver.cpp
CXX src/caffe/solvers/sgd_solver.cpp
CXX src/caffe/data_transformer.cpp
CXX src/caffe/layer_factory.cpp
NVCC src/caffe/util/math_functions.cu
NVCC src/caffe/util/im2col.cu
NVCC src/caffe/layers/cudnn_conv_layer.cu
NVCC src/caffe/layers/pooling_layer.cu
NVCC src/caffe/layers/prelu_layer.cu
NVCC src/caffe/layers/batch_norm_layer.cu
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9220): error: argument of type "const void *" is incompatible with parameter of type "const float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9231): error: argument of type "const void *" is incompatible with parameter of type "const float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9244): error: argument of type "const void *" is incompatible with parameter of type "const double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9255): error: argument of type "const void *" is incompatible with parameter of type "const double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9268): error: argument of type "const void *" is incompatible with parameter of type "const float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9279): error: argument of type "const void *" is incompatible with parameter of type "const float *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9292): error: argument of type "const void *" is incompatible with parameter of type "const double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9303): error: argument of type "const void *" is incompatible with parameter of type "const double *"

/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9316): error: argument of type "const void *" is incompatible with parameter of type "const int *"

This happens with these files:
prelu_layer.o
batch_norm_layer.o
math_functions.o
pooling_layer.o

It seems that is due to the data type that the function is using. Any other idea in mind?
Thanks in advance.

@tonghe90
Copy link
Owner

tonghe90 commented Nov 7, 2018

Can you lower grade your gcc version. I was using 4.8.4

@tonghe90
Copy link
Owner

tonghe90 commented Nov 7, 2018

This is all the link for building
linux-vdso.so.1 => (0x00007ffca0212000)
libcudart.so.8.0 => /usr/local/cuda-8.0/lib64/libcudart.so.8.0 (0x00007fc42275d000)
libcublas.so.8.0 => /usr/local/cuda-8.0/lib64/libcublas.so.8.0 (0x00007fc41fcc5000)
libcurand.so.8.0 => /usr/local/cuda-8.0/lib64/libcurand.so.8.0 (0x00007fc41bd4f000)
libglog.so.0 => /usr/lib/x86_64-linux-gnu/libglog.so.0 (0x00007fc41baf3000)
libgflags.so.2 => /usr/lib/x86_64-linux-gnu/libgflags.so.2 (0x00007fc41b8d3000)
libprotobuf.so.8 => /usr/lib/x86_64-linux-gnu/libprotobuf.so.8 (0x00007fc41b5d1000)
libboost_system.so.1.66.0 => /usr/local/lib/libboost_system.so.1.66.0 (0x00007fc41b3cc000)
libhdf5_hl.so.7 => /usr/lib/x86_64-linux-gnu/libhdf5_hl.so.7 (0x00007fc41b19c000)
libhdf5.so.7 => /usr/lib/x86_64-linux-gnu/libhdf5.so.7 (0x00007fc41ad00000)
libleveldb.so.1 => /usr/lib/x86_64-linux-gnu/libleveldb.so.1 (0x00007fc41aab2000)
liblmdb.so.0 => /usr/lib/x86_64-linux-gnu/liblmdb.so.0 (0x00007fc41a89e000)
libopencv_core.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4 (0x00007fc41a467000)
libopencv_highgui.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4 (0x00007fc41a21b000)
libopencv_imgproc.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.2.4 (0x00007fc419d8b000)
libboost_thread.so.1.66.0 => /usr/local/lib/libboost_thread.so.1.66.0 (0x00007fc419b69000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc419864000)
libcudnn.so.5 => /usr/local/lib/libcudnn.so.5 (0x00007fc415c59000)
libnccl.so.1 => /usr/local/lib/libnccl.so.1 (0x00007fc412588000)
libboost_python.so.1.66.0 => /usr/local/lib/libboost_python.so.1.66.0 (0x00007fc41233f000)
libpython2.7.so.1.0 => /usr/local/lib/libpython2.7.so.1.0 (0x00007fc411f1c000)
libcblas.so.3 => /usr/lib/libcblas.so.3 (0x00007fc411cfb000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc4119f4000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc4117de000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc4115c0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc4111f6000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fc410ff2000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fc410dea000)
libunwind.so.8 => /usr/lib/x86_64-linux-gnu/libunwind.so.8 (0x00007fc410bce000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fc4109b5000)
libsnappy.so.1 => /usr/lib/libsnappy.so.1 (0x00007fc4107ae000)
libGL.so.1 => /usr/lib/nvidia-375/libGL.so.1 (0x00007fc41051e000)
libtbb.so.2 => /usr/lib/libtbb.so.2 (0x00007fc4102ea000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007fc410094000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007fc40fe6e000)
libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007fc40fbfc000)
libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007fc40f9a4000)
libIlmImf.so.6 => /usr/lib/x86_64-linux-gnu/libIlmImf.so.6 (0x00007fc40f6f5000)
libHalf.so.6 => /usr/lib/x86_64-linux-gnu/libHalf.so.6 (0x00007fc40f4b2000)
libgtk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007fc40ee74000)
libgdk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 (0x00007fc40ebc1000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fc40e970000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fc40e667000)
libgtkglext-x11-1.0.so.0 => /usr/lib/libgtkglext-x11-1.0.so.0 (0x00007fc40e463000)
libgdkglext-x11-1.0.so.0 => /usr/lib/libgdkglext-x11-1.0.so.0 (0x00007fc40e1ff000)
libdc1394.so.22 => /usr/lib/x86_64-linux-gnu/libdc1394.so.22 (0x00007fc40df8a000)
libv4l1.so.0 => /usr/lib/x86_64-linux-gnu/libv4l1.so.0 (0x00007fc40dd84000)
libavcodec.so.54 => /usr/lib/x86_64-linux-gnu/libavcodec.so.54 (0x00007fc40d02f000)
libavformat.so.54 => /usr/lib/x86_64-linux-gnu/libavformat.so.54 (0x00007fc40cd0c000)
libavutil.so.52 => /usr/lib/x86_64-linux-gnu/libavutil.so.52 (0x00007fc40cae7000)
libswscale.so.2 => /usr/lib/x86_64-linux-gnu/libswscale.so.2 (0x00007fc40c8a0000)
/lib64/ld-linux-x86-64.so.2 (0x000055c899c11000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fc40c69c000)
libatlas.so.3 => /usr/lib/libatlas.so.3 (0x00007fc40c109000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007fc40bdee000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fc40bbcc000)
libGLX.so.0 => /usr/lib/nvidia-375/libGLX.so.0 (0x00007fc40b99b000)
libGLdispatch.so.0 => /usr/lib/nvidia-375/libGLdispatch.so.0 (0x00007fc40b6b2000)
libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007fc40b4a4000)
libIex.so.6 => /usr/lib/x86_64-linux-gnu/libIex.so.6 (0x00007fc40b285000)
libIlmThread.so.6 => /usr/lib/x86_64-linux-gnu/libIlmThread.so.6 (0x00007fc40b07f000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fc40ae7a000)
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fc40ac6d000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fc40a938000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fc40a731000)
libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007fc40a50f000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fc40a204000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fc409fe2000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fc409c6f000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007fc409a5a000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fc40980c000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fc4095d0000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fc4093c5000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fc4091c2000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fc408fb2000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fc408da8000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fc408b9d000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fc40899a000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fc408797000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fc408584000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fc40837c000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fc40813d000)
libGLU.so.1 => /usr/lib/x86_64-linux-gnu/libGLU.so.1 (0x00007fc407ecf000)
libXmu.so.6 => /usr/lib/x86_64-linux-gnu/libXmu.so.6 (0x00007fc407cb6000)
libpangox-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangox-1.0.so.0 (0x00007fc407a96000)
libraw1394.so.11 => /usr/lib/x86_64-linux-gnu/libraw1394.so.11 (0x00007fc407888000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007fc407671000)
libv4l2.so.0 => /usr/lib/x86_64-linux-gnu/libv4l2.so.0 (0x00007fc407462000)
libxvidcore.so.4 => /usr/lib/x86_64-linux-gnu/libxvidcore.so.4 (0x00007fc407124000)
libx264.so.142 => /usr/lib/x86_64-linux-gnu/libx264.so.142 (0x00007fc406d8e000)
libvpx.so.1 => /usr/lib/x86_64-linux-gnu/libvpx.so.1 (0x00007fc4069ae000)
libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007fc4064df000)
libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007fc4062b2000)
libtheoraenc.so.1 => /usr/lib/x86_64-linux-gnu/libtheoraenc.so.1 (0x00007fc406071000)
libtheoradec.so.1 => /usr/lib/x86_64-linux-gnu/libtheoradec.so.1 (0x00007fc405e58000)
libspeex.so.1 => /usr/lib/x86_64-linux-gnu/libspeex.so.1 (0x00007fc405c3f000)
libschroedinger-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libschroedinger-1.0.so.0 (0x00007fc40597a000)
libopus.so.0 => /usr/lib/x86_64-linux-gnu/libopus.so.0 (0x00007fc405732000)
libopenjpeg.so.2 => /usr/lib/x86_64-linux-gnu/libopenjpeg.so.2 (0x00007fc405510000)
libmp3lame.so.0 => /usr/lib/x86_64-linux-gnu/libmp3lame.so.0 (0x00007fc405282000)
libgsm.so.1 => /usr/lib/x86_64-linux-gnu/libgsm.so.1 (0x00007fc405074000)
libva.so.1 => /usr/lib/x86_64-linux-gnu/libva.so.1 (0x00007fc404e5e000)
librtmp.so.0 => /usr/lib/x86_64-linux-gnu/librtmp.so.0 (0x00007fc404c43000)
libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26 (0x00007fc404984000)
libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007fc404774000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007fc404537000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fc404294000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fc404074000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fc403dcc000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fc403bc9000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fc4039bf000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fc40379c000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fc403580000)
libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fc40332b000)
libthai.so.0 => /usr/lib/x86_64-linux-gnu/libthai.so.0 (0x00007fc403122000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fc402ef7000)
libXt.so.6 => /usr/lib/x86_64-linux-gnu/libXt.so.6 (0x00007fc402c91000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007fc402a7f000)
libv4lconvert.so.0 => /usr/lib/x86_64-linux-gnu/libv4lconvert.so.0 (0x00007fc402806000)
libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007fc4025fc000)
liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007fc40237a000)
libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11 (0x00007fc4020f9000)
libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fc401ee5000)
libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fc401ca3000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fc401a9e000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fc401898000)
libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fc401671000)
libdatrie.so.1 => /usr/lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007fc40146a000)
libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007fc401262000)
libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007fc401045000)
libcgmanager.so.0 => /lib/x86_64-linux-gnu/libcgmanager.so.0 (0x00007fc400e2a000)
libnih.so.1 => /lib/x86_64-linux-gnu/libnih.so.1 (0x00007fc400c12000)
libnih-dbus.so.1 => /lib/x86_64-linux-gnu/libnih-dbus.so.1 (0x00007fc400a07000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fc4007c2000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fc4005bc000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fc4003b7000)

@AndresPMD
Copy link
Author

@tonghe90
I lowered gcc to version 4.8 but the problem persists. The same data type errors on the same files. I have no idea or clue what could be wrong since there is no information about these errors.

@AndresPMD
Copy link
Author

Apparently this code only works with Cuda 8.0 and CUDNN 6.0. Maybe you should try to include this info as well.

@tonghe90
Copy link
Owner

@DreadPiratePsyopus I think this is easy to solve. You can transfer the custom c++ layer to any version caffe you use.

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

2 participants