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 in compiling math_function.cu #1

Open
ashishmishraiitm opened this issue Jan 7, 2019 · 1 comment
Open

Error in compiling math_function.cu #1

ashishmishraiitm opened this issue Jan 7, 2019 · 1 comment

Comments

@ashishmishraiitm
Copy link

ashishmishraiitm commented Jan 7, 2019

Issue summary

While compiling the code for ADaPTION, I am getting below errors in 'math_functions.cu'-

62 errors detected in the compilation of "/tmp/tmpxft_00009c1c_00000000-16_math_functions.compute_52.cpp1.ii".
make: *** [.build_release/cuda/src/caffe/util/math_functions.o] Error 1

Since I am able to successfully install caffe on my system I think the issue is with the code. Please Guide.

Please find below error logs-

NVCC src/caffe/util/math_functions.cu
src/caffe/util/math_functions.cu(42): error: "caffe_gpu_round_fp" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(50): error: "caffe_gpu_round_fp" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(58): error: caffe_gpu_gemm is not a template

src/caffe/util/math_functions.cu(58): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(59): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(74): error: caffe_gpu_gemm is not a template

src/caffe/util/math_functions.cu(74): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(75): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(90): error: caffe_gpu_gemv is not a template

src/caffe/util/math_functions.cu(90): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(100): error: caffe_gpu_gemv is not a template

src/caffe/util/math_functions.cu(100): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(110): error: caffe_gpu_axpy is not a template

src/caffe/util/math_functions.cu(116): error: caffe_gpu_axpy is not a template

src/caffe/util/math_functions.cu(123): error: identifier "CUDA_CHECK" is undefined

src/caffe/util/math_functions.cu(128): error: caffe_gpu_scal is not a template

src/caffe/util/math_functions.cu(133): error: caffe_gpu_scal is not a template

src/caffe/util/math_functions.cu(138): error: caffe_gpu_axpby is not a template

src/caffe/util/math_functions.cu(145): error: caffe_gpu_axpby is not a template

src/caffe/util/math_functions.cu(152): error: caffe_gpu_dot is not a template

src/caffe/util/math_functions.cu(158): error: caffe_gpu_dot is not a template

src/caffe/util/math_functions.cu(164): error: caffe_gpu_asum is not a templWhile compiling the code for ADaPTION, I am getting below errors in 'math_functions.cu'-

NVCC src/caffe/util/math_functions.cu
src/caffe/util/math_functions.cu(42): error: "caffe_gpu_round_fp" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(50): error: "caffe_gpu_round_fp" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(58): error: caffe_gpu_gemm is not a template

src/caffe/util/math_functions.cu(58): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(59): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(74): error: caffe_gpu_gemm is not a template

src/caffe/util/math_functions.cu(74): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(75): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(90): error: caffe_gpu_gemv is not a template

src/caffe/util/math_functions.cu(90): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(100): error: caffe_gpu_gemv is not a template

src/caffe/util/math_functions.cu(100): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(110): error: caffe_gpu_axpy is not a template

src/caffe/util/math_functions.cu(116): error: caffe_gpu_axpy is not a template

src/caffe/util/math_functions.cu(123): error: identifier "CUDA_CHECK" is undefined

src/caffe/util/math_functions.cu(128): error: caffe_gpu_scal is not a template

src/caffe/util/math_functions.cu(133): error: caffe_gpu_scal is not a template

src/caffe/util/math_functions.cu(138): error: caffe_gpu_axpby is not a template

src/caffe/util/math_functions.cu(145): error: caffe_gpu_axpby is not a template

src/caffe/util/math_functions.cu(152): error: caffe_gpu_dot is not a template

src/caffe/util/math_functions.cu(158): error: caffe_gpu_dot is not a template

src/caffe/util/math_functions.cu(164): error: caffe_gpu_asum is not a template

src/caffe/util/math_functions.cu(169): error: caffe_gpu_asum is not a template

src/caffe/util/math_functions.cu(174): error: caffe_gpu_scale is not a template

src/caffe/util/math_functions.cu(181): error: caffe_gpu_scale is not a template

src/caffe/util/math_functions.cu(217): error: "caffe_gpu_add_scalar" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(224): error: "caffe_gpu_add_scalar" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(239): error: caffe_gpu_add is not a template

src/caffe/util/math_functions.cu(247): error: caffe_gpu_add is not a template

src/caffe/util/math_functions.cu(263): error: caffe_gpu_sub is not a template

src/caffe/util/math_functions.cu(271): error: caffe_gpu_sub is not a template

src/caffe/util/math_functions.cu(287): error: caffe_gpu_mul is not a template

src/caffe/util/math_functions.cu(295): error: caffe_gpu_mul is not a template

src/caffe/util/math_functions.cu(311): error: caffe_gpu_div is not a template

src/caffe/util/math_functions.cu(319): error: caffe_gpu_div is not a template

src/caffe/util/math_functions.cu(334): error: caffe_gpu_abs is not a template

src/caffe/util/math_functions.cu(341): error: caffe_gpu_abs is not a template

src/caffe/util/math_functions.cu(356): error: caffe_gpu_exp is not a template

src/caffe/util/math_functions.cu(363): error: caffe_gpu_exp is not a template

src/caffe/util/math_functions.cu(377): error: caffe_gpu_log is not a template

src/caffe/util/math_functions.cu(384): error: caffe_gpu_log is not a template

src/caffe/util/math_functions.cu(399): error: caffe_gpu_powx is not a template

src/caffe/util/math_functions.cu(407): error: caffe_gpu_powx is not a template

src/caffe/util/math_functions.cu(414): error: this declaration has no storage class or type specifier

src/caffe/util/math_functions.cu(414): error: identifier "sign" is undefined

src/caffe/util/math_functions.cu(414): error: expected a ")"

src/caffe/util/math_functions.cu(416): error: this declaration has no storage class or type specifier

src/caffe/util/math_functions.cu(416): error: variable "caffe::DEFINE_AND_INSTANTIATE_GPU_UNARY_FUNC" has already been defined

src/caffe/util/math_functions.cu(416): error: identifier "sgnbit" is undefined

src/caffe/util/math_functions.cu(416): error: expected a ")"

src/caffe/util/math_functions.cu(419): error: name followed by "::" must be a class or namespace name

src/caffe/util/math_functions.cu(419): error: identifier "curandGenerate" is undefined

src/caffe/util/math_functions.cu(419): error: identifier "CURAND_CHECK" is undefined

src/caffe/util/math_functions.cu(423): error: "void caffe::caffe_gpu_rng_uniform(int, unsigned int *)" is not an entity that can be explicitly specialized

src/caffe/util/math_functions.cu(423): error: expected a ";"

src/caffe/util/math_functions.cu(462): warning: parsing restarts here after previous syntax error

src/caffe/util/math_functions.cu(201): error: identifier "CAFFE_GET_BLOCKS" is undefined

src/caffe/util/math_functions.cu(201): error: identifier "CAFFE_CUDA_NUM_THREADS" is undefined

src/caffe/util/math_functions.cu(197): error: identifier "CUDA_CHECK" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(189): error: identifier "CUDA_KERNEL_LOOP" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(189): error: expected a ";"
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(192): warning: parsing restarts here after previous syntax error
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(197): error: identifier "CUDA_CHECK" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=float]"
(206): here

src/caffe/util/math_functions.cu(197): error: identifier "CUDA_CHECK" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=double]"
(207): here

62 errors detected in the compilation of "/tmp/tmpxft_00009c1c_00000000-16_math_functions.compute_52.cpp1.ii".
make: *** [.build_release/cuda/src/caffe/util/math_functions.o] Error 1ate

src/caffe/util/math_functions.cu(169): error: caffe_gpu_asum is not a template

src/caffe/util/math_functions.cu(174): error: caffe_gpu_scale is not a template

src/caffe/util/math_functions.cu(181): error: caffe_gpu_scale is not a template

src/caffe/util/math_functions.cu(217): error: "caffe_gpu_add_scalar" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(224): error: "caffe_gpu_add_scalar" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(239): error: caffe_gpu_add is not a template

src/caffe/util/math_functions.cu(247): error: caffe_gpu_add is not a template

src/caffe/util/math_functions.cu(263): error: caffe_gpu_sub is not a template

src/caffe/util/math_functions.cu(271): error: caffe_gpu_sub is not a template

src/caffe/util/math_functions.cu(287): error: caffe_gpu_mul is not a template

src/caffe/util/math_functions.cu(295): error: caffe_gpu_mul is not a template

src/caffe/util/math_functions.cu(311): error: caffe_gpu_div is not a template

src/caffe/util/math_functions.cu(319): error: caffe_gpu_div is not a template

src/caffe/util/math_functions.cu(334): error: caffe_gpu_abs is not a template

src/caffe/util/math_functions.cu(341): error: caffe_gpu_abs is not a template

src/caffe/util/math_functions.cu(356): error: caffe_gpu_exp is not a template

src/caffe/util/math_functions.cu(363): error: caffe_gpu_exp is not a template

src/caffe/util/math_functions.cu(377): error: caffe_gpu_log is not a template

src/caffe/util/math_functions.cu(384): error: caffe_gpu_log is not a template

src/caffe/util/math_functions.cu(399): error: caffe_gpu_powx is not a template

src/caffe/util/math_functions.cu(407): error: caffe_gpu_powx is not a template

src/caffe/util/math_functions.cu(414): error: this declaration has no storage class or type specifier

src/caffe/util/math_functions.cu(414): error: identifier "sign" is undefined

src/caffe/util/math_functions.cu(414): error: expected a ")"

src/caffe/util/math_functions.cu(416): error: this declaration has no storage class or type specifier

src/caffe/util/math_functions.cu(416): error: variable "caffe::DEFINE_AND_INSTANTIATE_GPU_UNARY_FUNC" has already been defined

src/caffe/util/math_functions.cu(416): error: identifier "sgnbit" is undefined

src/caffe/util/math_functions.cu(416): error: expected a ")"

src/caffe/util/math_functions.cu(419): error: name followed by "::" must be a class or namespace name

src/caffe/util/math_functions.cu(419): error: identifier "curandGenerate" is undefined

src/caffe/util/math_functions.cu(419): error: identifier "CURAND_CHECK" is undefined

src/caffe/util/math_functions.cu(423): error: "void caffe::caffe_gpu_rng_uniform(int, unsigned int *)" is not an entity that can be explicitly specialized

src/caffe/util/math_functions.cu(423): error: expected a ";"

src/caffe/util/math_functions.cu(462): warning: parsing restarts here after previous syntax error

src/caffe/util/math_functions.cu(201): error: identifier "CAFFE_GET_BLOCKS" is undefined

src/caffe/util/math_functions.cu(201): error: identifier "CAFFE_CUDA_NUM_THREADS" is undefined

src/caffe/util/math_functions.cu(197): error: identifier "CUDA_CHECK" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(189): error: identifier "CUDA_KERNEL_LOOP" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(189): error: expected a ";"
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(192): warning: parsing restarts here after previous syntax error
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(197): error: identifier "CUDA_CHECK" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=float]"
(206): here

src/caffe/util/math_functions.cu(197): error: identifier "CUDA_CHECK" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=double]"
(207): here

62 errors detected in the compilation of "/tmp/tmpxft_00009c1c_00000000-16_math_functions.compute_52.cpp1.ii".
make: *** [.build_release/cuda/src/caffe/util/math_functions.o] Error 1

system configuration

Operating system: Ubuntu 14.04.5 LTS
Compiler: gcc version 4.8.5
CUDA version: cuda-7.5
Python or MATLAB version (for pycaffe and matcaffe respectively): Python 2.7.13

@schlowm0
Copy link
Contributor

schlowm0 commented Jan 7, 2019

I can not reproduce your error on my system (Ubuntu 16.04 with gcc 5.4.0)
The compilation process from source files works as expected, once all dependencies are installed.
I followed the following instructions:
http://caffe.berkeleyvision.org/install_apt.html
and
http://caffe.berkeleyvision.org/installation.html#compilation

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

2 participants