cuda-gdb

Hi, all,

 I tried to use cuda-gdb to debug some cuda code and got the following messages:

////////////////////////////////////////////////////////////////////////////////////////////////////////
(cuda-gdb) n
[Thread 140413364259152 (LWP 20791) exited]
0x00007fb489f09500 in cudbgIpcCall () from /usr/lib/libcuda.so
(cuda-gdb) n
Single stepping until exit from function cudbgIpcCall,
which has no line number information.
0x00007fb489f0a12e in ?? () from /usr/lib/libcuda.so
(cuda-gdb) n
Cannot find bounds of current function
////////////////////////////////////////////////////////////////////////////////////////////////////////////
What does those messages mean? Thank you very much.

Best,
Wu

Hi, all,

I tried CUDA-GDB walkthrough and almost got the same result, which means that my cuda-gdb works well. I believe something wrong with the make of the cuda codes. I am now using Qt4.6 in unbuntu 9.04 and the following is my .pro file

[codebox]# Path to opencv install

OPENCV_DIR = /usr/local/opencv

Path to cuda SDK install

CUDA_SDK = /home/wu/NVIDIA_GPU_Computing_SDK/C

Path to cuda toolkit install

CUDA_DIR = /usr/local/cuda

#CUDA_DIR = $$system(which nvcc | sed ‘s,/bin/nvcc$,’)

GPU architecture

CUDA_ARCH = sm_11

PROJECT_DIR = $$system(pwd)

#CONFIG += create_prl

#CONFIG += link_prl

TEMPLATE = app

#TARGET = release_binary

#CONFIG += release

QMAKE_CXXFLAGS_RELEASE =-O3

DESTDIR = …/bin

LIBS += -lcudart -lcutil

LIBS += -lGLEW -lGL -lGLU

LIBS += -lcxcore -lcv -lhighgui -lcvaux -lml

RESOURCES += ressources.qrc

OBJECTS_DIR = $$PROJECT_DIR/Obj

NVCCFLAGS = --compile --host-compilation ‘C++’ \

        --compiler-options -fno-strict-aliasing -use_fast_math 

DEPENDPATH += $$PROJECT_DIR/Gui

DEPENDPATH += $$PROJECT_DIR/Motion

DEPENDPATH += $$PROJECT_DIR/Cuda

DEPENDPATH += $$PROJECT_DIR/Core

DEPENDPATH += $$PROJECT_DIR/Media

DEPENDPATH += $$PROJECT_DIR/OpenGL

DEPENDPATH += $$PROJECT_DIR

INCLUDEPATH += $$PROJECT_DIR/Gui

INCLUDEPATH += $$PROJECT_DIR/Motion

INCLUDEPATH += $$PROJECT_DIR/Cuda

INCLUDEPATH += $$PROJECT_DIR/Media

INCLUDEPATH += $$PROJECT_DIR/Core

INCLUDEPATH += $$PROJECT_DIR/OpenGL

INCLUDEPATH += $$PROJECT_DIR

QT += opengl

INCLUDEPATH += $$CUDA_DIR/include

QMAKE_LIBDIR += $$CUDA_DIR/lib64

INCLUDEPATH += $$CUDA_SDK/common/inc/

QMAKE_LIBDIR += $$CUDA_SDK/lib

QMAKE_LIBDIR += $$CUDA_SDK/common/lib

INCLUDEPATH += $$OPENCV_DIR/include

QMAKE_LIBDIR += $$OPENCV_DIR/lib

Input

FORMS += paramsFolki.ui

HEADERS += LIVA.hpp

HEADERS += Logger.hpp

HEADERS += Singleton.hpp

HEADERS += mainwindows.h

HEADERS += paramsFolki.hpp

HEADERS += LiGL2Dwidget.hpp

HEADERS += MediaPlayer.hpp

HEADERS += LkCvWidget.hpp

HEADERS += FolkiOpticalFlow.hpp

HEADERS += OpticalFlow.hpp

HEADERS += endianness.h

HEADERS += FlotRender.hpp

HEADERS += GestionBuffer.hpp

SOURCES += main.cpp

SOURCES += paramsFolki.cpp

SOURCES += LiGL2Dwidget.cpp

SOURCES += MediaPlayer.cpp

SOURCES += LkCvWidget.cpp

SOURCES += FolkiOpticalFlow.cpp

SOURCES += OpticalFlow.cpp

SOURCES += endianness.c

SOURCES += FlotRender.cpp

CUDA_SOURCES += ConvolutionSeparable.cu

CUDA_SOURCES += ConvolutionSeparableFlat.cu

CUDA_SOURCES += ConvolutionSeparableU.cu

CUDA_SOURCES += ConvolutionSeparableFlatU.cu

CUDA_SOURCES += DeriveGradient.cu

CUDA_SOURCES += FolkiOpticalFlowKernels.cu

CUDA_SOURCES += PyramidBurt.cu

CUDA_SOURCES += PyramidHaar.cu

CUDA_SOURCES += DivRot.cu

CUDA_SOURCES += RenderGL.cu

CUDA_SOURCES += Morpho.cu

CUDA_SOURCES += Reduction.cu

CUDA_SOURCES += Propage.cu

HEADERS += ConvolutionSeparableFlat.hpp

HEADERS += ConvolutionSeparable.hpp

HEADERS += ConvolutionSeparableFlatU.hpp

HEADERS += ConvolutionSeparableU.hpp

HEADERS += DeriveGradient.hpp

HEADERS += FolkiOpticalFlowKernels.hpp

HEADERS += LiCuda.hpp

HEADERS += PyramidBurt.hpp

HEADERS += PyramidHaar.hpp

HEADERS += DivRot.hpp

HEADERS += RenderGL.hpp

HEADERS += Morpho.hpp

HEADERS += Reduction.hpp

HEADERS += Propage.hpp

CUDA_INC = $$join(INCLUDEPATH,’ -I’,’-I’,’ ')

cuda.output = {OBJECTS_DIR}{QMAKE_FILE_BASE}_cuda.o

cuda.commands = $$CUDA_DIR/bin/nvcc -g -G -arch=$$CUDA_ARCH -c $$NVCCFLAGS $$CUDA_INC $$LIBS {QMAKE_FILE_NAME} -o {QMAKE_FILE_OUT}

cuda.dependcy_type = TYPE_C

cuda.depend_command = $$CUDA_DIR/bin/nvcc -M $$CUDA_INC $$NVCCFLAGS ${QMAKE_FILE_NAME} |sed “s,^.*:,”|sed “s,^ *,” | tr -d ‘\\n’

cuda.input = CUDA_SOURCES

QMAKE_EXTRA_UNIX_COMPILERS += cuda

Qt+= network[/codebox]

Hi, all,

 The program I am debugging is a GUI application. Is cuda-gdb not able to debug this kind of program? Thank you very much.

Best,
Wu