I’m having issues getting cuda-gdb to step into my kernel. It will break at the proper line number but performing a “list” gives me the code in the calling code’s main function.
I’ve attached my CUDA code and pasted my makefile. Any help would be much appreciated.
ubuntu = Ubuntu 10.04, g++, MPICH, FFTW, CUDA 3.0
SHELL = /bin/sh
#.IGNORE:
System-specific settings
NVCC = nvcc
NVCCFLAGS = -g -G
CC = g+±4.2
CCFLAGS = -g -O -I/usr/include/mpich2 -DFFT_FFTW -DLAMMPS_GZIP -I/usr/local/cuda/include
DEPFLAGS = -M
LINK = g+±4.2
LINKFLAGS = -g -O -L/usr/include/mpich2 -L/usr/local/cuda/lib64
USRLIB = -lfftw -lmpich -lcuda -lcudart
SYSLIB =
ARCHIVE = ar
ARFLAGS = -rc
SIZE = size
Link target
$(EXE): $(OBJ) $(CU_OBJ)
$(LINK) $(LINKFLAGS) $(OBJ) $(CU_OBJ) $(USRLIB) $(SYSLIB) -o $(EXE)
$(SIZE) $(EXE)
Library target
lib: $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
Compilation rules
%.o:%.cu
$(NVCC) $(NVCCFLAGS) -c $<
%.o:%.cpp
$(CC) $(CCFLAGS) -c $<
%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
Individual dependencies
DEPENDS = $(OBJ:.o=.d)
include $(DEPENDS)
kernel.cu (9.26 KB)