Caffe: g++ cannot find cuda_runtime.h

Created on 3 Aug 2014  路  3Comments  路  Source: BVLC/caffe

I followed in instructions on the installation page and upon running make all I receive.


/usr/bin/g++ src/caffe/blob.cpp -pthread -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/pkgs_local/cuda-5.5 -I/include -c -o build/src/caffe/blob.o
src/caffe/blob.cpp:3:26: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
make: *** [build/src/caffe/blob.o] Error 1


The file cuda_runtime is sitting in /pkgs_local/cuda-5.5/include, but it seems that it cannot be found.

Thanks in advance,
Kelvin

Most helpful comment

Apparently you didn't set the variables in Make.config right.

All 3 comments

Apparently you didn't set the variables in Make.config right.

I seem to have gotten around it by adding /pkgs_local/cuda-5.5/include explicitly to the INCLUDE_DIRS variable.

Seems weird that this is necessary based on the Makefile.

You may be using a different cuda install approach than the default one in ubuntu - the Makefile.config assumes /usr/local/cuda/, so this is causing the problem.

Glad that this issue is solved :)

Was this page helpful?
0 / 5 - 0 ratings