Cannot make the caffe-0.999
tomoc opened this issue · 9 comments
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.
Hi tomoc,
try with another version of CUDA, for example the 5.5 version.
@ivanDonadello
I tryed it. but I got same error...
I have no idea.Please help.
Thanks.
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
@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?
no CUDA-capable device is detected
You may need a nvidia video card or run it in CPU_ONLY mode.
@nhlijiaming
Because I don't have GPU,I have already run it in CPU_ONLY mode.
I have no idea.
@nhlijiaming How can i ensure that caffe-0.999 runs in CPU mode?
@nhlijiaming I also want to run caffe 0.999 in CPU mode, how can I do this?Thanks !
@Aky97567 @tingtinglu
Add CPU_ONLY := 1
in your Makefile.config, hopefully it will help.