Reply to comment

cuda-gdb. Проблема при компиляции с одновременном использовании -g -G и -arch sm_11

Tagged:  

Помогите разобраться с проблемой:

Хочу запустить cuda-gdb для своего программы. Но при компиляции с
параметрами -g -G получаю ошибку:

obj/debug/time_3d_Cuda.cu.o: In function `$$SymbolTable':

(.nv11Segment+0x7238): undefined reference to `$gpu_registers'

obj/debug/time_3d_Cuda.cu.o: In function `$$SymbolTable':

(.nv11Segment+0x112a0): undefined reference to `blockDim'

obj/debug/time_3d_Cuda.cu.o: In function `$$SymbolTable':

(.nv11Segment+0x112b8): undefined reference to `gridDim'

obj/debug/time_3d_Cuda.cu.o: In function `$$SymbolTable':

(.nv11Segment+0x112d0): undefined reference to `blockIdx'

obj/debug/time_3d_Cuda.cu.o: In function `$$SymbolTable':

(.nv11Segment+0x112e8): undefined reference to `threadIdx'

collect2: ld returned 1 exit status

make: *** [../../bin/linux/debug/FDCuda] Error 1

Попробовал скомпилить simpleTemplates с параметрами -g -G - проходит.
Разница только в том что в своей программе мне приходится добовлять
-arch sm_11 так как я использую атомарные функции.

Попробовал скомпилировать simpleTemplates еще и с -arch sm_11 примерно
таким образом

[moron@lmi simpleTemplates]$ make dbg=1

echo @/home/moron/cuda/bin/nvcc -D_DEBUG -arch sm_11 -I.
-I/home/moron/cuda/include -I../../common/inc -DUNIX -g -G -o
obj/debug/simpleTemplates.cu.o -c simpleTemplates.cu

И получил такую же ошибку

obj/debug/simpleTemplates.cu.o: In function `$$SymbolTable':

(.nv11Segment+0x1b0): undefined reference to `$gpu_registers'

obj/debug/simpleTemplates.cu.o: In function `$$SymbolTable':

(.nv11Segment+0x2b8): undefined reference to `blockDim'

obj/debug/simpleTemplates.cu.o: In function `$$SymbolTable':

(.nv11Segment+0x2d0): undefined reference to `gridDim'

obj/debug/simpleTemplates.cu.o: In function `$$SymbolTable':

(.nv11Segment+0x2e8): undefined reference to `blockIdx'

obj/debug/simpleTemplates.cu.o: In function `$$SymbolTable':

(.nv11Segment+0x300): undefined reference to `threadIdx'

collect2: ld returned 1 exit status

make: *** [../../bin/linux/debug/simpleTemplates] Error 1

ПС
Cuda release 2.2

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <i> <table> <td> <tr> <th>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Images can be added to this post.

More information about formatting options

Copyright © 2008-2011 Alex Tutubalin