daijifeng001 / MNC

Instance-aware Semantic Segmentation via Multi-task Network Cascades
Other
489 stars 182 forks source link

caffe-MNC compile error with cuda 8 and both cudnn 5.1.10 and 6.0.21 #61

Closed javierjsa closed 7 years ago

javierjsa commented 7 years ago

Hi,

I'm trying to build MNC and I'm getting an error when compiling caffe-mnc. I've tried with Ubuntu 16.04, cuda 8 and both cudnn 5.1.10 and 6.0.21 inside docker containers (these are the base docker files) I created just for that purpose. I am of course running them with nvidia-docker.

As far as i understand, the error is the same for both versions:

This is the log when building with cudnn 5.1.10:

PROTOC src/caffe/proto/caffe.proto CXX .build_release/src/caffe/proto/caffe.pb.cc CXX src/caffe/common.cpp In file included from ./include/caffe/util/device_alternate.hpp:40:0, from ./include/caffe/common.hpp:19, from src/caffe/common.cpp:7: **./include/caffe/util/cudnn.hpp: In function 'void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)': ./include/caffe/util/cudnn.hpp:127:41: error: too few arguments to function 'cudnnStatus_**t cudnnSetPooling2dDescriptor(cudnnPoolingDescriptor_t, cudnnPoolingMode_t, cudnnNanPropagation_t, int, int, int, int, int, int)' pad_h, pad_w, stride_h, stride_w)); ^ ./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK' cudnnStatus_t status = condition; \ ^ In file included from ./include/caffe/util/cudnn.hpp:5:0, from ./include/caffe/util/device_alternate.hpp:40, from ./include/caffe/common.hpp:19, from src/caffe/common.cpp:7: /usr/include/cudnn.h:803:27: note: declared here cudnnStatus_t CUDNNWINAPI cudnnSetPooling2dDescriptor( ^ Makefile:563: recipe for target '.build_release/src/caffe/common.o' failed make: *** [.build_release/src/caffe/common.o] Error 1

And this is the output with cudnn 6.0.21:

PROTOC src/caffe/proto/caffe.proto CXX .build_release/src/caffe/proto/caffe.pb.cc CXX src/caffe/common.cpp In file included from ./include/caffe/util/device_alternate.hpp:40:0, from ./include/caffe/common.hpp:19, from src/caffe/common.cpp:7: ./include/caffe/util/cudnn.hpp: In function 'const char* cudnnGetErrorString(cudnnStatus_t)': ./include/caffe/util/cudnn.hpp:21:10: warning: enumeration value 'CUDNN_STATUS_RUNTIME_PREREQUISITE_MISSING' not handled in switch [-Wswitch] switch (status) { ^ ./include/caffe/util/cudnn.hpp: In function 'void caffe::cudnn::setConvolutionDesc(cudnnConvolutionStruct**, cudnnTensorDescriptor_t, cudnnFilterDescriptor_t, int, int, int, int)': ./include/caffe/util/cudnn.hpp:108:70: error: too few arguments to function 'cudnnStatus_t cudnnSetConvolution2dDescriptor(cudnnConvolutionDescriptor_t, int, int, int, int, int, int, cudnnConvolutionMode_t, cudnnDataType_t)' pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION)); ^ ./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK' cudnnStatus_t status = condition; \ ^ In file included from ./include/caffe/util/cudnn.hpp:5:0, from ./include/caffe/util/device_alternate.hpp:40, from ./include/caffe/common.hpp:19, from src/caffe/common.cpp:7: /usr/include/cudnn.h:500:27: note: declared here cudnnStatus_t CUDNNWINAPI cudnnSetConvolution2dDescriptor( cudnnConvolutionDescriptor_t convDesc, ^ In file included from ./include/caffe/util/device_alternate.hpp:40:0, from ./include/caffe/common.hpp:19, from src/caffe/common.cpp:7: ./include/caffe/util/cudnn.hpp: In function 'void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int, int, int)': ./include/caffe/util/cudnn.hpp:127:41: error: too few arguments to function 'cudnnStatus_t cudnnSetPooling2dDescriptor(cudnnPoolingDescriptor_t, cudnnPoolingMode_t, cudnnNanPropagation_t, int, int, int, int, int, int)' pad_h, pad_w, stride_h, stride_w)); ^ ./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK' cudnnStatus_t status = condition; \ ^ In file included from ./include/caffe/util/cudnn.hpp:5:0, from ./include/caffe/util/device_alternate.hpp:40, from ./include/caffe/common.hpp:19, from src/caffe/common.cpp:7: /usr/include/cudnn.h:952:27: note: declared here cudnnStatus_t CUDNNWINAPI cudnnSetPooling2dDescriptor( ^ Makefile:563: recipe for target '.build_release/src/caffe/common.o' failed make: *** [.build_release/src/caffe/common.o] Error 1

Should I install an older version of cudnn?

Thank you

javierjsa commented 7 years ago

Hi,

I've managed to compile using ubuntu 14.04, cuda 7.5 and cudnn 4.0.8. Yet, demo.py crashes:

roi_warping_layer.cu:121] Check failed: error == cudaSuccess (8 vs. 0) invalid

Regards

javierjsa commented 7 years ago

Hi,

The demo finally worked on a different host (with a different, newer GPU). I still wish I knew what the problem on the first host is, but getting it to work is enough for me.

Regards