CTPN icon indicating copy to clipboard operation
CTPN copied to clipboard

math_functions.cu errors during compiling caffe...

Open szbach opened this issue 7 years ago • 1 comments

i merged the caffe with the latest version (keep the layers, e.g. transpose...). i got the error messages as follows during compiling caffe : benson@nkomlserver:~/projects/sceneReco/CTPN/caffe$ make -j && make pycaffe CXX src/caffe/util/math_functions.cpp NVCC src/caffe/util/math_functions.cu nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). src/caffe/util/math_functions.cpp:200:16: error: expected initializer before ‘<’ token void caffe_sqrt(const int n, const float* a, float* y) { ^ src/caffe/util/math_functions.cpp:205:16: error: expected initializer before ‘<’ token void caffe_sqrt(const int n, const double* a, double* y) { ^ Makefile:518: recipe for target '.build_release/src/caffe/util/math_functions.o' failed make: *** [.build_release/src/caffe/util/math_functions.o] Error 1 make: *** Waiting for unfinished jobs.... nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). src/caffe/util/math_functions.cu(94): error: no instance of function template "caffe::caffe_gpu_scal" matches the specified type

src/caffe/util/math_functions.cu(97): error: expected a declaration

src/caffe/util/math_functions.cu(97): error: expected a declaration

src/caffe/util/math_functions.cu(98): error: expected a declaration

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

src/caffe/util/math_functions.cu(98): error: expected a declaration

src/caffe/util/math_functions.cu(99): error: expected a declaration

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

src/caffe/util/math_functions.cu(99): error: expected a declaration

src/caffe/util/math_functions.cu(100): error: expected a declaration

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

src/caffe/util/math_functions.cu(100): error: expected a declaration

src/caffe/util/math_functions.cu(101): error: expected a declaration

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

src/caffe/util/math_functions.cu(107): error: expected a declaration

src/caffe/util/math_functions.cu(108): error: expected a declaration

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

src/caffe/util/math_functions.cu(108): error: expected a declaration

src/caffe/util/math_functions.cu(109): error: expected a declaration

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

src/caffe/util/math_functions.cu(109): error: expected a declaration

src/caffe/util/math_functions.cu(110): error: expected a declaration

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

src/caffe/util/math_functions.cu(110): error: expected a declaration

src/caffe/util/math_functions.cu(111): error: expected a declaration

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

src/caffe/util/math_functions.cu(130): error: expected a declaration

src/caffe/util/math_functions.cu(131): error: expected a declaration

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

src/caffe/util/math_functions.cu(136): error: expected a declaration

src/caffe/util/math_functions.cu(137): error: expected a declaration

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

src/caffe/util/math_functions.cu(141): error: expected a declaration

src/caffe/util/math_functions.cu(142): error: expected a declaration

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

src/caffe/util/math_functions.cu(146): error: expected a declaration

src/caffe/util/math_functions.cu(147): error: expected a declaration

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

src/caffe/util/math_functions.cu(152): error: expected a declaration

src/caffe/util/math_functions.cu(153): error: expected a declaration

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

src/caffe/util/math_functions.cu(153): error: expected a declaration

src/caffe/util/math_functions.cu(154): error: expected a declaration

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

src/caffe/util/math_functions.cu(159): error: expected a declaration

src/caffe/util/math_functions.cu(160): error: expected a declaration

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

src/caffe/util/math_functions.cu(160): error: expected a declaration

src/caffe/util/math_functions.cu(161): error: expected a declaration

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

src/caffe/util/math_functions.cu(173): error: expected a declaration

src/caffe/util/math_functions.cu(174): error: expected a declaration

src/caffe/util/math_functions.cu(175): error: expected a declaration

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

src/caffe/util/math_functions.cu(179): error: expected a declaration

src/caffe/util/math_functions.cu(182): error: caffe_gpu_set is not a template

src/caffe/util/math_functions.cu(182): error: invalid explicit instantiation declaration

src/caffe/util/math_functions.cu(183): error: caffe_gpu_set is not a template

src/caffe/util/math_functions.cu(183): error: invalid explicit instantiation declaration

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

src/caffe/util/math_functions.cu(398): error: caffe_gpu_sqrt is not a template

src/caffe/util/math_functions.cu(405): error: caffe_gpu_sqrt is not a template

src/caffe/util/math_functions.cu(411): error: caffe_gpu_sign is not a template

src/caffe/util/math_functions.cu(411): error: caffe_gpu_sign is not a template

src/caffe/util/math_functions.cu(413): error: caffe_gpu_sgnbit is not a template

src/caffe/util/math_functions.cu(413): error: caffe_gpu_sgnbit is not a template

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

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

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

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

src/caffe/util/math_functions.cu(422): error: expected a declaration

src/caffe/util/math_functions.cu(423): error: identifier "b" is undefined

src/caffe/util/math_functions.cu(423): error: identifier "a" is undefined

src/caffe/util/math_functions.cu(424): error: expected a declaration

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

src/caffe/util/math_functions.cu(435): error: expected a declaration

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

src/caffe/util/math_functions.cu(437): error: expected a declaration

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

src/caffe/util/math_functions.cu(448): error: expected a declaration

src/caffe/util/math_functions.cu(450): error: expected a declaration

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

src/caffe/util/math_functions.cu(455): error: expected a declaration

src/caffe/util/math_functions.cu(457): error: expected a declaration

At end of source: warning: parsing restarts here after previous syntax error

80 errors detected in the compilation of "/tmp/tmpxft_00007c7c_00000000-13_math_functions.compute_50.cpp1.ii". Makefile:531: recipe for target '.build_release/cuda/src/caffe/util/math_functions.o' failed make: *** [.build_release/cuda/src/caffe/util/math_functions.o] Error 1 benson@nkomlserver:~/projects/sceneReco/CTPN/caffe$

## Any advice is appreciated!

szbach avatar Nov 23 '17 06:11 szbach

i merged the caffe with the latest version (keep the layers, e.g. transpose...). i got the error messages as follows during compiling caffe : benson@nkomlserver:~/projects/sceneReco/CTPN/caffe$ make -j && make pycaffe CXX src/caffe/util/math_functions.cpp NVCC src/caffe/util/math_functions.cu nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). src/caffe/util/math_functions.cpp:200:16: error: expected initializer before ‘<’ token void caffe_sqrt(const int n, const float* a, float* y) { ^ src/caffe/util/math_functions.cpp:205:16: error: expected initializer before ‘<’ token void caffe_sqrt(const int n, const double* a, double* y) { ^ Makefile:518: recipe for target '.build_release/src/caffe/util/math_functions.o' failed make: *** [.build_release/src/caffe/util/math_functions.o] Error 1 make: *** Waiting for unfinished jobs.... nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). src/caffe/util/math_functions.cu(94): error: no instance of function template "caffe::caffe_gpu_scal" matches the specified type

src/caffe/util/math_functions.cu(97): error: expected a declaration

src/caffe/util/math_functions.cu(97): error: expected a declaration

src/caffe/util/math_functions.cu(98): error: expected a declaration

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

src/caffe/util/math_functions.cu(98): error: expected a declaration

src/caffe/util/math_functions.cu(99): error: expected a declaration

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

src/caffe/util/math_functions.cu(99): error: expected a declaration

src/caffe/util/math_functions.cu(100): error: expected a declaration

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

src/caffe/util/math_functions.cu(100): error: expected a declaration

src/caffe/util/math_functions.cu(101): error: expected a declaration

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

src/caffe/util/math_functions.cu(107): error: expected a declaration

src/caffe/util/math_functions.cu(108): error: expected a declaration

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

src/caffe/util/math_functions.cu(108): error: expected a declaration

src/caffe/util/math_functions.cu(109): error: expected a declaration

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

src/caffe/util/math_functions.cu(109): error: expected a declaration

src/caffe/util/math_functions.cu(110): error: expected a declaration

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

src/caffe/util/math_functions.cu(110): error: expected a declaration

src/caffe/util/math_functions.cu(111): error: expected a declaration

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

src/caffe/util/math_functions.cu(130): error: expected a declaration

src/caffe/util/math_functions.cu(131): error: expected a declaration

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

src/caffe/util/math_functions.cu(136): error: expected a declaration

src/caffe/util/math_functions.cu(137): error: expected a declaration

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

src/caffe/util/math_functions.cu(141): error: expected a declaration

src/caffe/util/math_functions.cu(142): error: expected a declaration

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

src/caffe/util/math_functions.cu(146): error: expected a declaration

src/caffe/util/math_functions.cu(147): error: expected a declaration

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

src/caffe/util/math_functions.cu(152): error: expected a declaration

src/caffe/util/math_functions.cu(153): error: expected a declaration

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

src/caffe/util/math_functions.cu(153): error: expected a declaration

src/caffe/util/math_functions.cu(154): error: expected a declaration

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

src/caffe/util/math_functions.cu(159): error: expected a declaration

src/caffe/util/math_functions.cu(160): error: expected a declaration

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

src/caffe/util/math_functions.cu(160): error: expected a declaration

src/caffe/util/math_functions.cu(161): error: expected a declaration

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

src/caffe/util/math_functions.cu(173): error: expected a declaration

src/caffe/util/math_functions.cu(174): error: expected a declaration

src/caffe/util/math_functions.cu(175): error: expected a declaration

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

src/caffe/util/math_functions.cu(179): error: expected a declaration

src/caffe/util/math_functions.cu(182): error: caffe_gpu_set is not a template

src/caffe/util/math_functions.cu(182): error: invalid explicit instantiation declaration

src/caffe/util/math_functions.cu(183): error: caffe_gpu_set is not a template

src/caffe/util/math_functions.cu(183): error: invalid explicit instantiation declaration

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

src/caffe/util/math_functions.cu(398): error: caffe_gpu_sqrt is not a template

src/caffe/util/math_functions.cu(405): error: caffe_gpu_sqrt is not a template

src/caffe/util/math_functions.cu(411): error: caffe_gpu_sign is not a template

src/caffe/util/math_functions.cu(411): error: caffe_gpu_sign is not a template

src/caffe/util/math_functions.cu(413): error: caffe_gpu_sgnbit is not a template

src/caffe/util/math_functions.cu(413): error: caffe_gpu_sgnbit is not a template

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

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

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

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

src/caffe/util/math_functions.cu(422): error: expected a declaration

src/caffe/util/math_functions.cu(423): error: identifier "b" is undefined

src/caffe/util/math_functions.cu(423): error: identifier "a" is undefined

src/caffe/util/math_functions.cu(424): error: expected a declaration

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

src/caffe/util/math_functions.cu(435): error: expected a declaration

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

src/caffe/util/math_functions.cu(437): error: expected a declaration

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

src/caffe/util/math_functions.cu(448): error: expected a declaration

src/caffe/util/math_functions.cu(450): error: expected a declaration

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

src/caffe/util/math_functions.cu(455): error: expected a declaration

src/caffe/util/math_functions.cu(457): error: expected a declaration

At end of source: warning: parsing restarts here after previous syntax error

80 errors detected in the compilation of "/tmp/tmpxft_00007c7c_00000000-13_math_functions.compute_50.cpp1.ii". Makefile:531: recipe for target '.build_release/cuda/src/caffe/util/math_functions.o' failed make: *** [.build_release/cuda/src/caffe/util/math_functions.o] Error 1 benson@nkomlserver:~/projects/sceneReco/CTPN/caffe$

## Any advice is appreciated!

Did you slove this problem,I also met this problem?

wuyang0329 avatar Mar 01 '19 10:03 wuyang0329