Hi guys,
I am facing a strange problem. What I am trying to do is to debug a cuda program in the emulation mode in Ubuntu, I think I have put the correct compiler parameters for nvcc. When I start debugging, I do see the highlighted line, but the problem is that for some reason, if I go trace the execution line by line by pressing F6, the execution order does NOT go by line order! It seems to me that it jumps arbitrarily, sometimes it even executes those lines which are commented out. Could someone give me some points on this? I am attaching the Makefile that I am using as follow. Thanks a lot for the help!! This problem really drives me crazy!
[codebox]filename = MemCoales02
executable = $(filename)
objects = $(filename).o
source = $(filename).cu
$(executable) : $(objects)
emulation + debug mode
gcc -o $(executable) $(objects) -L/usr/local/cuda/lib64 -lcudart -lcublasemu -L/home/mj/NVIDIA_GPU_Computing_SDK/C/lib/ -L/home/mj/NVIDIA_GPU_Computing_SDK/C/common/lib -lcutil -lcblas -lm
$(objects) : $(source)
emulation + debug mode
/usr/local/cuda/bin/nvcc -o $(objects) -c -g --compiler-options='-fPIC' -deviceemu -arch=sm_11 -O3 -I/home/mj/NVIDIA_GPU_Computing_SDK/C/common/inc/ $(source)
all :
${MAKE} $(executable)
clean :
rm $(objects)
rm $(executable)[/codebox]