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

Failed to build Cafee #4

Closed
minhtriet opened this issue Oct 4, 2016 · 8 comments
Closed

Failed to build Cafee #4

minhtriet opened this issue Oct 4, 2016 · 8 comments

Comments

@minhtriet
Copy link

minhtriet commented Oct 4, 2016

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
Copy link

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
Copy link
Author

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
Copy link

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
Copy link
Author

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
Copy link

farshidfarhat commented Oct 16, 2016

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::Forward_gpu(const std::vectorcaffe::Blob<Dtype_>&, const std::vectorcaffe::Blob<Dtype_>&)’
src/caffe/layers/softmax_loss_vec_layer.cpp:237:6: error: ‘virtual void caffe::SoftmaxWithLossVecLayer::Forward_gpu(const std::vectorcaffe::Blob<Dtype_>&, const std::vectorcaffe::Blob<Dtype_>&)’ previously declared here
src/caffe/layers/softmax_loss_vec_layer.cpp:254:1: error: redefinition of ‘void caffe::SoftmaxWithLossVecLayer::Backward_gpu(const std::vectorcaffe::Blob<Dtype_>&, const std::vector&, const std::vectorcaffe::Blob<Dtype_>&)’
src/caffe/layers/softmax_loss_vec_layer.cpp:245:6: error: ‘virtual void caffe::SoftmaxWithLossVecLayer::Backward_gpu(const std::vectorcaffe::Blob<Dtype_>&, const std::vector&, const std::vectorcaffe::Blob<Dtype_>&)’ previously declared here
make: *** [.build_release/src/caffe/layers/softmax_loss_vec_layer.o] Error 1

@farshidfarhat
Copy link

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

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

@minhtriet
Copy link
Author

minhtriet commented Oct 17, 2016

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

@eldar
Copy link
Owner

eldar commented Oct 18, 2016

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

@eldar eldar closed this as completed Oct 18, 2016
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

4 participants