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

Error when compiling the parellel branch #1835

Closed
perfect1 opened this issue Feb 5, 2015 · 7 comments
Closed

Error when compiling the parellel branch #1835

perfect1 opened this issue Feb 5, 2015 · 7 comments

Comments

@perfect1
Copy link

perfect1 commented Feb 5, 2015

I'm getting an error when attempting to compile the Parallel branch.
I'm running ubuntu 14.04 x86_64. I'm able to compile the master branch fine, I only have this issue when trying to compile the parallel branch. I've got cudnn enabled, but everything else is pretty standard.

make all
All appears fine until:

/usr/local/cuda/bin/nvcc -ccbin=g++ -Xcompiler -fPIC -DNDEBUG -O2 -DUSE_CUDNN -I/usr/include/python2.7 -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/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  -c src/caffe/parallel.cu -o .build_release/src/caffe/parallel.cuo 2> .build_release/src/caffe/parallel.cuo.warnings.txt \
        || (cat .build_release/src/caffe/parallel.cuo.warnings.txt; exit 1)
src/caffe/parallel.cu(14): error: name followed by "::" must be a class or namespace name
          detected during instantiation of "void caffe::sync_master_kernel(Dtype *, Dtype **, size_t *, int, int, const cudaStream_t &, size_t) [with Dtype=float]" 
(30): here

src/caffe/parallel.cu(48): error: name followed by "::" must be a class or namespace name
          detected during instantiation of "void caffe::sync_worker_kernel(Dtype *, Dtype *, Dtype **, size_t *, Dtype **, uint8_t *, int, int, const cudaStream_t &, size_t) [with Dtype=float]" 
(72): here

2 errors detected in the compilation of "/tmp/tmpxft_00005afb_00000000-12_parallel.compute_35.cpp1.ii".
make: *** [.build_release/src/caffe/parallel.cuo] Error 1

What am I missing?

@melgor
Copy link

melgor commented Feb 5, 2015

I have that problem too with parallel branch. I resolve it by changing boost library to 1.57.
Using other version of boost cause similar problem of different from the presented.

@perfect1
Copy link
Author

perfect1 commented Feb 5, 2015

Hmm. That didn't work for me. Did you upgrade any other libraries?
What version is your nvcc?
/usr/local/cuda/bin/nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2014 NVIDIA Corporation
Built on Wed_Aug_27_10:36:36_CDT_2014
Cuda compilation tools, release 6.5, V6.5.16

@melgor
Copy link

melgor commented Feb 6, 2015

I have got the same version.
Right, I now remember what I done with that error. I change the source code of src/caffe/parallel.cu
In line 14 and 48 there is "IBChannel::FRAMES", and that variable cause problem. I do not why, I can not get that static value from IBChannel class.
So, I replace that two value by value of FRAMES variable, which is defined in parallel,h
static const int FRAMES = 1024;

After that change I could compile it, but there were errors in runtest. I have not tried to run parallel learning so far too.

@perfect1
Copy link
Author

perfect1 commented Feb 6, 2015

That worked for me, Thanks a lot!
I changed line 14 and 48 to

int q = (batch_start + b) & (1023);

I also got an errors on make runtest,

In file included from src/caffe/test/test_internal_thread.cpp:2:0:
src/caffe/test/test_internal_thread.cpp: In member function ‘virtual void caffe::InternalThreadTest_TestStartAndExit_Test::TestBody()’:
src/caffe/test/test_internal_thread.cpp:18:22: error: ‘class caffe::InternalThread’ has no member named ‘WaitForInternalThreadToExit’
   EXPECT_TRUE(thread.WaitForInternalThreadToExit());
                      ^
./src/gtest/gtest.h:7859:34: note: in definition of macro ‘GTEST_TEST_BOOLEAN_’
       ::testing::AssertionResult(expression)) \
                                  ^
src/caffe/test/test_internal_thread.cpp:18:3: note: in expansion of macro ‘EXPECT_TRUE’
   EXPECT_TRUE(thread.WaitForInternalThreadToExit());
   ^
make: *** [.build_release/src/caffe/test/test_internal_thread.o] Error 1

I'm also getting errors with gpus.bin. But I believe it's probably my configuration.
Don't close this yet, I'll try again tomorrow. I need a break for now. :)

@perfect1
Copy link
Author

I'm not having any luck. Is there any form of documentation hiding anywhere?(for parallel)

@melgor
Copy link

melgor commented Feb 10, 2015

I have no luck too. I asked the creator of parallel version here:
#1629

He said, that GPU parallel example may be broken.

@shelhamer
Copy link
Member

Please comment on the parallel branch on the parallel pull request #1148 to keep the discussion focused.

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

3 participants