Cc1plus Fatal Error Cuda_runtime.h No Such File Or Directory
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the cuda_runtime.h location company Business Learn more about hiring developers or posting ads with us Stack Overflow cuda_runtime.h: no such file or directory caffe Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 cuda_runtime.h download million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up error: cuda_runtime.h: No such file or directory up vote 7 down vote favorite 1 How can I force gcc
Cuda_runtime.h Missing
to look in /usr/cuda/local/include for cuda_runtime.h? I'm attempting to compile a CUDA application with a C wrapper. I'm running Ubuntu 10.04. I've successfully compiled my CUDA application into a .so with the following command: nvcc -arch=sm_11 -o libtest.so --shared -Xcompiler -fPIC main.cu When I try and compile my c wrapper file with the following command: gcc -std=c99 -o main -L. -ltest main.c I receive the error: error: cuda_runtime.h: No such file or directory cuda_runtime.h: no such file or directory theano I've verified that cuda_runtime.h is in fact present in /usr/local/cuda/include c gcc cuda nvcc share|improve this question edited Oct 31 '12 at 21:32 asked Oct 31 '12 at 21:19 skrieder 134116 4 I assume you mean /usr/local/cuda/include. Did you try adding a -I switch to your gcc command line? For example: gcc -std=c99 -I/usr/local/cuda/include -o main -L. -ltest main.c –Robert Crovella Oct 31 '12 at 21:22 Thanks, that worked! –skrieder Oct 31 '12 at 21:37 1 If you wouldn't mind, please post it as an answer to your question. Then accept it or I will upvote the answer. Thank you. –Robert Crovella Oct 31 '12 at 21:38 Is there any option to make it work without adding -l? A library gives me this error –Keloo Sep 6 at 10:45 add a comment| 1 Answer 1 active oldest votes up vote 7 down vote Using an -I switch allowed gcc to find the cuda_runtime.h file: gcc -std=c99 -I/usr/local/cuda/include -o main -L. -ltest main.c share|improve this answer edited Nov 2 '12 at 12:10 talonmies 51.1k1493146 answered Oct 31 '12 at 21:45 skrieder 134116 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password
here for a quick overview of the site Help Center Detailed answers to any questions you might have cuda.h: no such file or directory Meta Discuss the workings and policies of this site About Us
Cuda Installation
Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with
Install Cuda Ubuntu
us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just http://stackoverflow.com/questions/13167598/error-cuda-runtime-h-no-such-file-or-directory like you, helping each other. Join them; it only takes a minute: Sign up Why does Theano print “cc1plus: fatal error: cuda_runtime.h: No such file or directory”? up vote 3 down vote favorite 2 I am trying to use the GPU with Theano. I've read this tutorial. However, I can't get theano to use the GPU and http://stackoverflow.com/questions/25003733/why-does-theano-print-cc1plus-fatal-error-cuda-runtime-h-no-such-file-or-dir I don't know how to continue. Testing machine $ cat /etc/issue Welcome to openSUSE 12.1 "Asparagus" - Kernel \r (\l). $ nvidia-smi -L GPU 0: Tesla C2075 (S/N: 0324111084577) $ echo $LD_LIBRARY_PATH /usr/local/cuda-5.0/lib64:[other]:/usr/local/lib:/usr/lib:/usr/local/X11/lib:[other] $ find /usr/local/ -name cuda_runtime.h /usr/local/cuda-5.0/include/cuda_runtime.h $ echo $C_INCLUDE_PATH /usr/local/cuda-5.0/include/ $ echo $CXX_INCLUDE_PATH /usr/local/cuda-5.0/include/ $ nvidia-smi -a NVIDIA: could not open the device file /dev/nvidiactl (Permission denied). Failed to initialize NVML: Insufficient Permissions $ echo $PATH /usr/lib64/mpi/gcc/openmpi/bin:/home/mthoma/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:.:/home/mthoma/bin $ ls -l /dev/nv* crw-rw---- 1 root video 195, 0 1. Jul 09:47 /dev/nvidia0 crw-rw---- 1 root video 195, 255 1. Jul 09:47 /dev/nvidiactl crw-r----- 1 root kmem 10, 144 1. Jul 09:46 /dev/nvram # nvidia-smi -a ==============NVSMI LOG============== Timestamp : Wed Jul 30 05:13:52 2014 Driver Version : 304.33 Attached GPUs : 1 GPU 0000:04:00.0 Product Name : Tesla C2075 Display Mode : Enabled Persistence Mode : Disabled Driver Model Current : N/A Pending : N/A Serial Number : 0324111084577 GPU UUID : GPU-7ea505ef-ad46-bb24-c440-69da9b300040 VBIOS Version : 70.10.46.00.05 Inforom Version Image Version : N/A OEM Ob
Support Search GitHub This repository Watch 98 Star 457 Fork 175 cbuchner1/CudaMiner Code Issues 69 Pull requests 9 Projects 0 https://github.com/cbuchner1/CudaMiner/issues/136 Wiki Pulse Graphs New issue Compiling issue - NVCC does not include CUDA include dir #136 Open Grinnz opened this Issue May 1, 2014 · 2 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 1 participant Grinnz commented May 1, 2014 I am getting an error in Fedora 20 x86_64 when I try no such to compile the latest cudaminer or ccminer releases. It cannot find header files in the cuda includes directory (/usr/local/cuda/include, in my case). I work around it by editing the Makefile created by ./configure and adding $(CUDA_CFLAGS) to every nvcc line near the end of the file; this variable is set to "CUDA_CFLAGS = -I/usr/local/cuda/include" earlier in the Makefile no such file but is never used. I don't know enough about autogen to suggest how to fix this in the makefile generation. Grinnz commented May 1, 2014 For searchability, the error this causes is below: /usr/local/cuda-5.5/bin/nvcc -g -O2 -Xptxas "-abi=no -v" -arch=compute_10 --maxrregcount=64 --ptxas-options=-v -I./compat/jansson -o salsa_kernel.o -c salsa_kernel.cu In file included from :0:0: /usr/include/stdc-predef.h:40:1: fatal error: cuda_runtime.h: No such file or directory #endif ^ Grinnz commented May 1, 2014 I did the same modification to Makefile.am instead of the generated makefile, and it successfully configured and built. This was referenced May 1, 2014 Open Include CUDA_CFLAGS to include cuda include dir in nvcc #137 Open Include CUDA_CFLAGS to include cuda include dir in nvcc cbuchner1/ccminer#4 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. Terms Privacy Security Status Help You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in anot