diff --git a/samples/nvcuda/common.mk b/samples/nvcuda/common.mk index 54c2808399..06d7638458 100644 --- a/samples/nvcuda/common.mk +++ b/samples/nvcuda/common.mk @@ -31,7 +31,7 @@ OSARCH= $(shell uname -m) # Basic directory setup for SDK # (override directories only if they are not already defined) SRCDIR ?= -ROOTDIR ?= .. +ROOTDIR ?= /home/tuanle/NVIDIA_GPU_Computing_SDK # ROOTDIR/bin is the directory where executable file will be put in @@ -45,9 +45,9 @@ BOINC_API_DIR = $(BOINC_DIR)/api BOINC_LIB_DIR = $(BOINC_DIR)/lib # Directory for cutil_i386 as well as other utils while linking (-lcutil_i386) -LIBDIR := /home/tuanle/NVIDIA_GPU_Computing_SDK/C/lib -COMMONDIR := /home/tuanle/NVIDIA_GPU_Computing_SDK/C/common -SHAREDDIR := /home/tuanle/NVIDIA_GPU_Computing_SDK/shared +LIBDIR := $(ROOTDIR)/C/lib +COMMONDIR := $(ROOTDIR)/C/common +SHAREDDIR := $(ROOTDIR)/shared # Compilers NVCC := $(CUDA_INSTALL_PATH)/bin/nvcc @@ -238,7 +238,7 @@ endif ifeq ($(USENVCUVID), 1) ifneq ($(DARWIN),) - NVCUVIDLIB := -L/home/tuanle/NVIDIA_GPU_Computing_SDK/C/common/lib/darwin -lnvcuvid + NVCUVIDLIB := -L$(ROOTDIR)/C/common/lib/darwin -lnvcuvid endif endif diff --git a/samples/nvcuda/cuda.cu b/samples/nvcuda/cuda.cu index a639fdafbc..7928e71706 100644 --- a/samples/nvcuda/cuda.cu +++ b/samples/nvcuda/cuda.cu @@ -141,7 +141,6 @@ int main(int argc, char** argv) double fd; char input_path[512], output_path[512], chkpt_path[512], buf[256]; REAL* h_idata; - unsigned int mem_size; MFILE out; FILE* state, *infile; diff --git a/samples/nvcuda/readme.txt b/samples/nvcuda/readme.txt index bce264dc0c..5334bedc8e 100644 --- a/samples/nvcuda/readme.txt +++ b/samples/nvcuda/readme.txt @@ -3,6 +3,10 @@ University of California, Berkeley Berkeley Space Sciences Lab tuanle86@berkeley.edu +----------------------- Compiler ---------------------------- + +You will need to install gcc 4.3 and g++ 4.3. It appears that Cuda 3.0 SDK has not yet worked +with gcc 4.4 and g++ 4.4 ----------------------- Linux Makefile ---------------------- @@ -11,16 +15,9 @@ Makefile needs to be edited on your machine before running. Please follow these 1) Open "boinc/samples/nvcuda/common.mk" with gedit 2) Ctrl+f and search for "tuanle". You will find the following: -LIBDIR := /home/tuanle/NVIDIA_GPU_Computing_SDK/C/lib - -COMMONDIR := /home/tuanle/NVIDIA_GPU_Computing_SDK/C/common +ROOTDIR ?= /home/tuanle/NVIDIA_GPU_Computing_SDK -SHAREDDIR := /home/tuanle/NVIDIA_GPU_Computing_SDK/shared -... -... -NVCUVIDLIB := -L/home/tuanle/NVIDIA_GPU_Computing_SDK/C/common/lib/darwin -lnvcuvid - -3) Replace these above paths by appropriate paths on your machine. +3) Replace this path by appropriate path on your machine. 4) Done!