llu13701
llu13701

Reputation: 163

Rodinia File not found when "make"

I tried to run Rodinia on my computer with cuda 5.5, given the makefile provided by the rodinia suits. In the common config file, I change the directory location from /usr/local/cuda/ to /usr/local/cuda/cuda and leave everything unchanged. My nvcc works fine. However, when I type in make, i got the error

/usr/local/cuda/cuda/bin/nvcc -I/usr/local/cuda/cuda/include -O2 -c backprop_cuda.cu backprop_cuda.cu:12:35: error: backprop_cuda_kernel.cu: No such file or directory

while clearly in the directory there is a file called backprop_cuda_kernel.cu

backprop.c               backprop.h   facetrain.o  Makefile
backprop_cuda.cu         backprop.o   imagenet.c   Makefile_nvidia
backprop_cuda_kernel.cu  facetrain.c  imagenet.o   run

The make file is:

include ../../common/make.config

CC = gcc
CC_FLAGS = -g  -O2

NVCC = $(CUDA_DIR)/bin/nvcc
NVCC_FLAGS = -I$(CUDA_DIR)/include

ifeq ($(dbg),1)
    NVCC_FLAGS += -g -O0
else
    NVCC_FLAGS += -O2
endif

ifeq ($(emu),1)
    NVCC_FLAGS += -deviceemu
endif


backprop: backprop.o facetrain.o imagenet.o backprop_cuda.o 
$(CC) $ (CC_FLAGS) backprop.o facetrain.o imagenet.o backprop_cuda.o -o backprop -
L$(CUDA_LIB_DIT) -lcuda -lcudart -lm

%.o: %.[ch]
$(CC) $(CC_FLAGS) $< -c

facetrain.o: facetrain.c backprop.h
$(CC) $(CC_FLAGS) facetrain.c -c

backprop.o: backprop.c backprop.h
$(CC) $(CC_FLAGS) backprop.c -c 

backprop_cuda.o:backprop_cuda.cu backprop.h $(NVCC) $(NVCC_FLAGS) -c backprop_cuda.cu

imagenet.o: imagenet.c backprop.h $(CC) $(CC_FLAGS) imagenet.c -c

clean: rm -f *.o *~ backprop backprop_cuda.linkinfo

Sorry I couldn't put it in the code format, the websites keeps telling me that my indent is wrong

Thank you in advance.

Upvotes: 0

Views: 373

Answers (2)

Abhishek Nikam
Abhishek Nikam

Reputation: 698

Just replace #include backprop_cuda_kernel.cu present in the backprop_cuda.cu file by #include "backprop_cuda_kernel.cu" The backprop_cuda_kernel.cu is present in the directory you are doing a make.

Upvotes: 0

MadScientist
MadScientist

Reputation: 100986

I don't know much about nvcc etc. but this error:

backprop_cuda.cu:12:35: error: backprop_cuda_kernel.cu: No such file or directory

implies that at line 12 of backprop_cuda.cu you are including a file named backprop_cude_kernel.cu. You say that this file exists in your current directory. However, the compile line you give to nvcc doesn't list the current directory as a place to search for included files.

If nvcc doesn't search the local directory by default, then you'll have to add something like -I$(CURDIR) to your nvcc line to get it to look there.

Upvotes: 1

Related Questions