eldar / deepcut

Multi Person Pose Estimation
222 stars 83 forks source link

Failed to build Cafee #4

Closed minhtriet closed 8 years ago

minhtriet commented 8 years ago

I ran make -j8 all matcafee and received error src/caffe/layers/softmax_loss_vec_layer.cpp:254:10: error: redefinition of ‘void caffe::SoftmaxWithLossVecLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&)’. Googling does not give any result. Please note that due to my limited GPU, I had to build using only CPU.

Any help is much appreciated.

mrcharlie90 commented 8 years ago

I have built caffe with CPU too and gave me no problems. Have you tried to re-install Caffe with CUDNN? What GPU do you have? I saw the same error in the past, but I don't remember how I solved it. Did you check bash_profile/bashrc paths? I think there's something wrong there. Another thing, try to compile by setting CUSTOM_CXX := clang++ -std=c++11 into your Makefile.config file.

minhtriet commented 8 years ago

Thanks for your answer.

I checked the bashrc, in fact I have another application that used Caffe, and I make Caffe on that app successfully, using the same Makefile.config that I used to make Caffe in this application.

Enabling GPU build gives me out of memory error, and using CPU build gives me the redefinition error.

I am using Ubuntu 14.04, Graphic card: GeForce GTX 980.

mrcharlie90 commented 8 years ago

Why are you installing another copy of caffe with the same configuration? I installed it only once on my machine and I used that for all my applications. Probably this is the problem. Have you tried with the -std=c++11 in the Makeconfig.file?

minhtriet commented 8 years ago

Seems like Deepcut required Caffe to be placed exactly in external/caffe, how did you config it to point to your Caffe installation? I did try with the -std+c+11 in the Makeconfig.file

farshidfarhat commented 8 years ago

I have the same issue. Actually I have successfully installed the main version of BVLC/Caffe with make all pycaffe matcaffe. But the current necessary version (external/caffe) gives me the following error. I set:

CXXFLAGS += -std=c++11 CPU_ONLY := 1 BLAS := mkl

The error log is: CXX src/caffe/layers/softmax_loss_vec_layer.cpp src/caffe/layers/softmax_loss_vec_layer.cpp:254:1: error: redefinition of ‘void caffe::SoftmaxWithLossVecLayer::Forwardgpu(const std::vectorcaffe::Blob<Dtype>&, const std::vectorcaffe::Blob&)’ src/caffe/layers/softmax_loss_vec_layer.cpp:237:6: error: ‘virtual void caffe::SoftmaxWithLossVecLayer::Forwardgpu(const std::vectorcaffe::Blob<Dtype>&, const std::vectorcaffe::Blob&)’ previously declared here src/caffe/layers/softmax_loss_vec_layer.cpp:254:1: error: redefinition of ‘void caffe::SoftmaxWithLossVecLayer::Backwardgpu(const std::vectorcaffe::Blob<Dtype>&, const std::vector&, const std::vectorcaffe::Blob&)’ src/caffe/layers/softmax_loss_vec_layer.cpp:245:6: error: ‘virtual void caffe::SoftmaxWithLossVecLayer::Backwardgpu(const std::vectorcaffe::Blob<Dtype>&, const std::vector&, const std::vectorcaffe::Blob&)’ previously declared here make: *\ [.build_release/src/caffe/layers/softmax_loss_vec_layer.o] Error 1

farshidfarhat commented 8 years ago

When I comment the following part of src/caffe/layers/softmax_loss_vec_layer.cpp, there is no error :-)

/* template void SoftmaxWithLossVecLayer::Forwardgpu(const vector<Blob>& bottom, const vector<Blob_>& top) { //LOG(FATAL) << "Cannot use GPU in CPU-only Caffe: check mode."; Forward_cpu(bottom, top); }

template void SoftmaxWithLossVecLayer::Backwardgpu(const vector<Blob>& top, const vector& propagatedown, const vector<Blob>& bottom) { //LOG(FATAL) << "Cannot use GPU in CPU-only Caffe: check mode."; Backward_cpu(top, propagate_down, bottom); } */

minhtriet commented 8 years ago

And it leads to your issue, somehow... Namely, it is the error in syncedmem.cpp.

eldar commented 8 years ago

Hey, I updated the deepcut-cnn repo with the fix CPU-only build, and tested it. So closing this one.