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

cuda/cwc_convnet.cu: 6: cuda/cwc_convnet.cu: extern: not found #198

Open
shooyu opened this issue Mar 22, 2017 · 2 comments
Open

cuda/cwc_convnet.cu: 6: cuda/cwc_convnet.cu: extern: not found #198

shooyu opened this issue Mar 22, 2017 · 2 comments

Comments

@shooyu
Copy link

shooyu commented Mar 22, 2017

Hello, guys,

When compile ccv, I get the Error message:

cuda/cwc_convnet.cu -o cuda/cwc_convnet.o -c -O3 --use_fast_math -arch=sm_30 -D HAVE_CBLAS -D HAVE_LIBPNG -D HAVE_LIBJPEG -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_AVCODEC -D HAVE_AVFORMAT -D HAVE_SWSCALE -D HAVE_SSE2 -D HAVE_GSL -D HAVE_CUDA
cuda/cwc_convnet.cu: 6: cuda/cwc_convnet.cu: extern: not found
cuda/cwc_convnet.cu: 15: cuda/cwc_convnet.cu: Syntax error: "}" unexpected
makefile:30: recipe for target 'cuda/cwc_convnet.o' failed
make: *** [cuda/cwc_convnet.o] Error 2

My system:
ubuntu 16.04
cuda 8.0

What is the problem? Could you help me?
Thank you!
@antimatter15
@liuliu

@liuliu
Copy link
Owner

liuliu commented Mar 22, 2017

Doesn't seem like nvcc is in your $PATH otherwise it would be nvcc cuda/cwc_convnet.cu -o cuda/cwc_convnet.o -c -O3 --use_fast_math -arch=sm_30 -D HAVE_CBLAS -D HAVE_LIBPNG -D HAVE_LIBJPEG -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_AVCODEC -D HAVE_AVFORMAT -D HAVE_SWSCALE -D HAVE_SSE2 -D HAVE_GSL -D HAVE_CUDA

try which nvcc

@shooyu
Copy link
Author

shooyu commented Mar 23, 2017

Thank you!

I check my config.mk, and find NVCC is empty:

CC := clang
AR := ar
NVCC :=
CUDA_OBJS := cuda/cwc_convnet.o cuda/cwc_convnet_helper.o cuda/convnet/cwc_convnet_convolutional.o cuda/convnet/cwc_convnet_rnorm.o cuda/convnet/cwc_convnet_pool.o cuda/convnet/cwc_convnet_full_connect.o
DEFINE_MACROS := -D HAVE_CBLAS -D HAVE_LIBPNG -D HAVE_LIBJPEG -D HAVE_FFTW3 -D HAVE_LIBLINEAR -D HAVE_AVCODEC -D HAVE_AVFORMAT -D HAVE_SWSCALE -D USE_DISPATCH -D HAVE_SSE2 -D HAVE_GSL -D HAVE_CUDA
prefix := /usr/local
exec_prefix := ${prefix}
CFLAGS := -fblocks -msse2 $(DEFINE_MACROS) -I${prefix}/include
NVFLAGS := --use_fast_math -arch=sm_30 $(DEFINE_MACROS)
LDFLAGS := -L${exec_prefix}/lib -lm -lcblas -latlas -lpng -ljpeg -lfftw3 -lfftw3f -lpthread -llinear -lavcodec -lavformat -lswscale -ldispatch -lBlocksRuntime -lgsl -lgslcblas -lcuda -lcudart -lcublas -L/usr/local/cuda/lib64

if I force NVCC := nvcc the compile error is nvcc command not found. But I have installed cuda 8.0 and added the $PATH:

~/ccv/ccv-stable/lib$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

Is there any problem? Thank you!

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