cxxnet icon indicating copy to clipboard operation
cxxnet copied to clipboard

Compile error with USE_DIST_PS=1

Open ffmpbgrnn opened this issue 9 years ago • 5 comments

Hi, I'm using the latest version of cxxnet with all other components in the latest version. When I disable PS with USE_DIST_PS=0, everything works fine. But when I use USE_DIST_PS=1, it can't compile with the following error:

nvcc -c -o layer_gpu.o --use_fast_math -g -O3 -ccbin g++  --std=c++11 -Xcompiler "-DMSHADOW_FORCE_STREAM -Wall -g -O3 -I./mshadow/ -I./dmlc-core/include -fPIC -msse3 -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -I/home/archy/usr/local/cuda-6.5/include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -I/home/archy/archy/cxxnet/rabit/include -DMSHADOW_RABIT_PS=1 -DMSHADOW_DIST_PS=1 -std=c++11 -I/home/archy/archy/cxxnet/ps-lite/src -I/home/archy/archy/cxxnet/ps-lite/third_party/include -DCXXNET_USE_OPENCV=1 -DCXXNET_USE_OPENCV_DECODER=1 -fopenmp -I/home/archy/cudnn-6.5-linux-x64-v2/ -DCXXNET_USE_CUDNN=1 -L/home/archy/lib" src/layer/layer_impl.cu
/home/archy/include/c++/4.9.2/bits/alloc_traits.h(248): error: expected a ">"
          detected during instantiation of type "std::allocator_traits<_Alloc>::__has_construct<_Tp, _Args...>"
(251): here

/home/archy/include/c++/4.9.2/type_traits(130): error: not a class or struct name
          detected during:
            instantiation of class "std::__and_<_B1> [with _B1=<error-type>]"
(1957): here
            instantiation of type "std::_Require<<error-type>>"
/home/archy/include/c++/4.9.2/bits/alloc_traits.h(251): here

/home/archy/include/c++/4.9.2/type_traits(1957): error: class "std::__and_<<error-type>>" has no member "value"
          detected during instantiation of type "std::_Require<<error-type>>"
/home/archy/include/c++/4.9.2/bits/alloc_traits.h(251): here

/home/archy/include/c++/4.9.2/type_traits(1957): error: class "std::enable_if<<error-constant>, void>" has no member "type"
          detected during instantiation of type "std::_Require<<error-type>>"
/home/archy/include/c++/4.9.2/bits/alloc_traits.h(251): here

/home/archy/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/ia32intrin.h(246): error: identifier "__builtin_ia32_readeflags_u64" is undefined

/home/archy/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/ia32intrin.h(254): error: identifier "__builtin_ia32_writeeflags_u64" is undefined

/home/archy/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/wmmintrin.h(46): error: identifier "__builtin_ia32_aesdec128" is undefined

/home/archy/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/wmmintrin.h(54): error: identifier "__builtin_ia32_aesdeclast128" is undefined

/home/archy/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/wmmintrin.h(63): error: identifier "__builtin_ia32_aesenc128" is undefined


I think it might be that nvcc doesn't support C++11 well. I am using Centos5.6 with g++ version 4.9.2 and cuda version 6.5. Thank you!

ffmpbgrnn avatar May 10 '15 06:05 ffmpbgrnn

Hi, I solved this by compiling with g++4.8.2, can you guys add a compiler requirement in the guide? Furthermore, ps-lite use glog(ps-lite/src/base/resource_usage.h:L3) which is now conflict with dmlc/logging, and I don't know whether I should report this issue to ps-lite as the conflict is happened when combines components together. The current master branch didn't even pass compiling (with ps-lite). And in tools directory, im2rec can't compile neither. Thank you!

ffmpbgrnn avatar May 12 '15 00:05 ffmpbgrnn

Same on Ubuntu 15.04, I had to use gcc and g++ 4.8.4 to avoid this error.

viktor-ferenczi avatar May 28 '15 21:05 viktor-ferenczi

hi Linchao,

thanks for the comment. cuda version 6.5 has problem with gcc 4.9 when using c++11. but it should be fixed in cuda 7.0.

i fixed the logging.h problem in ps-lite, please have pull.

best mu

mli avatar May 29 '15 06:05 mli

i made a patch in a hurry, will do more tests tomorrow.

On Fri, Jun 19, 2015 at 1:17 AM, Zhongwen Xu [email protected] wrote:

@mli https://github.com/mli The bug still exists.

Could you please modify DEPS_PATH as the same way of CORE_PTH in https://github.com/dmlc/ps-lite/blob/master/Makefile#L17 ?

— Reply to this email directly or view it on GitHub https://github.com/dmlc/cxxnet/issues/134#issuecomment-113372400.

mli avatar Jun 19 '15 05:06 mli

Should be fixed currently. But it has some minor problems on glog as I mentioned in dmlc-core.

zhongwen avatar Jun 20 '15 01:06 zhongwen