kernel is not executed iterative PDE solving using CUSPARSE

Hallo,

i’m beginner in cuda c. i’m implementing iterative method of equation solving and using CUSPARSE. could someone help me with advice : what could be reason that kernel which should change the value of the variable allocated on device doesn’t affect on it? the variable is sent in argument list. i think the kernel is simply not executed.

Without seeing code it could be any number of reasons. But assuming that the kernel is not executed at all is a hot one. Check error codesto find out. Check all Cuda calls, the error will probably be returned by the first memcpy back to the host as the kernel is executed asynchronously.

thank you for your soon reply. i minimized the code but it still doesn’t work. would you look at the attached code please? i tried to test with the simplest SetA kernel which is also not launched, but it was working with the other variable. i get only zeros (i guess piece of results from previous runs) and “no error”.
ept_kernel.cu (231 Bytes)
ept_main.cu (2.39 KB)

Seems ok and works for me. Are you executing this on a GPU that supports double and are you giving the appropriate -arch=sm_xx to nvcc?

yes it has compute capability 2.0 and i tried to compile with -arch=13 and -arch=20.

is the compilation as below correct ? do i have to include there all .cu files?

PROGRAM = main

CU_SOURCES = main.cu

OBJECTS = $(CU_SOURCES:.cu=.o) $(CC_SOURCES:.c=.o)

CC=$(CUDA_HOME)/bin/nvcc

libs = …

cflags = …

$(PROGRAM): $(OBJECTS) …here i list my .c files

        $(CC)  $(cflags) $^ $(ldflags) $(libs) -o $@

The argument to set compute capability 2.0 is [font=“Courier New”]-arch=sm_20[/font] (or [font=“Courier New”]-arch=compute_20[/font]), not [font=“Courier New”]-arch=20[/font].

sorry, it’s typing mistake, but in makefile it’s correct.

Does any other CUDA code work on your installation - can you successfully run examples from the SDK?

yes, i tried scalarProd, cublas.

ok, i needed to change the device. External Image