diff --git a/Makefile b/Makefile index 17c96cd3..d06e6ace 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,8 @@ COMMON= -Iinclude/ CFLAGS=-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC ifeq ($(DEBUG), 1) -OPTS= -O0 -g +#OPTS= -O0 -g +#OPTS= -Og -g COMMON+= -DDEBUG CFLAGS+= -DDEBUG else diff --git a/src/cuda.c b/src/cuda.c index 028b1c04..85c8a299 100644 --- a/src/cuda.c +++ b/src/cuda.c @@ -13,7 +13,7 @@ void cuda_set_device(int n) { gpu_index = n; cudaError_t status = cudaSetDevice(n); - CHECK_CUDA(status); + if(status != cudaSuccess) CHECK_CUDA(status); } int cuda_get_device()