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

Cannot make the caffe-0.999 #62

Open
tomoc opened this issue Oct 23, 2015 · 9 comments
Open

Cannot make the caffe-0.999 #62

tomoc opened this issue Oct 23, 2015 · 9 comments

Comments

@tomoc
Copy link

tomoc commented Oct 23, 2015

Hi.
I can't installed caffe-0.999.
When I run make, I get the below error.

make: /usr/local/rcnn/R2012a/bin/mexext: Command was not found
/usr/local/cuda-7.0/bin/nvcc -ccbin=/usr/bin/g++ -Xcompiler -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -Ibuild/src -I./src -I./include -I/usr/local/cuda-7.0/include -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 -c src/caffe/util/math_functions.cu -o build/src/caffe/util/math_functions.cuo
src/caffe/util/math_functions.cu(140): error: calling a host function("std::signbit ") from a global function("caffe::sgnbit_kernel ") is not allowed

src/caffe/util/math_functions.cu(140): error: calling a host function("std::signbit ") from a global function("caffe::sgnbit_kernel ") is not allowed

2 errors detected in the compilation of "/tmp/tmpxft_00002753_00000000-16_math_functions.compute_50.cpp1.ii".
make: *** [build/src/caffe/util/math_functions.cuo] Error 2

I use ubuntu 14.04.
Unable to track what is the problem. Please help.

Thanks.

@ivanDonadello
Copy link

Hi tomoc,

try with another version of CUDA, for example the 5.5 version.

@tomoc
Copy link
Author

tomoc commented Jan 7, 2016

@ivanDonadello
I tryed it. but I got same error...
I have no idea.Please help.

Thanks.

@nhlijiaming
Copy link

Hi tomoc,

You can fix this error by the following steps:
1.comment line 224 in ./include/caffe/util/math_functions.hpp:

//using std::signbit;

2.make a minor change in the next line:

DEFINE_CAFFE_CPU_UNARY_FUNC(sgnbit, y[i] = signbit(x[i]));

to

DEFINE_CAFFE_CPU_UNARY_FUNC(sgnbit, y[i] = std::signbit(x[i]));

3.all done. make it now make clean&&make all -j8

@tomoc
Copy link
Author

tomoc commented Jan 12, 2016

@nhlijiaming
Thanks!
I have successfully run the "make all" and "make test"!
But, when I run "make runtest", it outputs error like below.

[ RUN ] HDF5DataLayerTest/1.TestRead
F0112 14:52:07.700438 28409 syncedmem.cpp:47] Check failed: error == cudaSuccess (38 vs. 0) no CUDA-capable device is detected
*** Check failure stack trace: ***
@ 0x2b04dfbc8daa (unknown)
@ 0x2b04dfbc8ce4 (unknown)
@ 0x2b04dfbc86e6 (unknown)
@ 0x2b04dfbcb687 (unknown)
@ 0x5e4c97 caffe::SyncedMemory::mutable_gpu_data()
@ 0x577271 caffe::Blob<>::mutable_gpu_data()
@ 0x5f1033 caffe::HDF5DataLayer<>::Forward_gpu()
@ 0x4b8757 caffe::HDF5DataLayerTest_TestRead_Test<>::TestBody()
@ 0x551bda testing::internal::HandleExceptionsInMethodIfSupported<>()
@ 0x546de9 testing::Test::Run()
@ 0x546ec7 testing::TestInfo::Run()
@ 0x547005 testing::TestCase::Run()
@ 0x54727d testing::internal::UnitTestImpl::RunAllTests()
@ 0x55175a testing::internal::HandleExceptionsInMethodIfSupported<>()
@ 0x546641 testing::UnitTest::Run()
@ 0x412b1d main
@ 0x2b04e1f89ec5 (unknown)
@ 0x417d5e (unknown)
@ (nil) (unknown)
make: *** [runtest] Aborted (core dumped)

I tried to error handling,But it outputs same error..
Do you have any solutions?

@nhlijiaming
Copy link

no CUDA-capable device is detected
You may need a nvidia video card or run it in CPU_ONLY mode.

@tomoc
Copy link
Author

tomoc commented Jan 13, 2016

@nhlijiaming
Because I don't have GPU,I have already run it in CPU_ONLY mode.
I have no idea.

@Aky97567
Copy link

Aky97567 commented Jul 3, 2016

@nhlijiaming How can i ensure that caffe-0.999 runs in CPU mode?

@tingtinglu
Copy link

@nhlijiaming I also want to run caffe 0.999 in CPU mode, how can I do this?Thanks !

@d-li14
Copy link

d-li14 commented Sep 2, 2017

@Aky97567 @tingtinglu
Add CPU_ONLY := 1 in your Makefile.config, hopefully it will help.

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

6 participants