我有一块C2050卡,用nvidia-smi命令查看有2687M显存
我的程序设定的网格数是192192110,运行时显示使用内存981M,计算结果正确无误
但如果我增加z方向的网格,编译时会出错;增加xy方向的网格也如此
直观上我感觉是显存的问题,因为增加网格数只会增加显存使用,但是显存使用还远未达到显卡的上线
或许也有其他原因?如此显卡有资源使用限制吗?
此问题干扰已久,望众大神指导!
LZ您好:
C2050对grid规模的支持远远不止192192110,但是为何报错,我们无法凭空得知,请您发一下错误信息,以便判断问题所在。
祝您好运~
错误信息如下:
/tmp/tmpxft_00000499_00000000-16_main_C.o: In function ____nv_dummy_param_ref(void*)': tmpxft_00000499_00000000-3_main_C.cudafe1.cpp:(.text+0x3034): relocation truncated to fit: R_X86_64_PC32 against
.bss’
/tmp/tmpxft_00000499_00000000-16_main_C.o: In function __cudaUnregisterBinaryUtil()': tmpxft_00000499_00000000-3_main_C.cudafe1.cpp:(.text+0x304b): relocation truncated to fit: R_X86_64_PC32 against
.bss’
/tmp/tmpxft_00000499_00000000-16_main_C.o: In function __device_stub__Z10G_boundaryv()': tmpxft_00000499_00000000-3_main_C.cudafe1.cpp:(.text+0x3065): relocation truncated to fit: R_X86_64_PC32 against
.bss’
/tmp/tmpxft_00000499_00000000-16_main_C.o: In function __device_stub__Z13G_corrector_xv()': tmpxft_00000499_00000000-3_main_C.cudafe1.cpp:(.text+0x308f): relocation truncated to fit: R_X86_64_PC32 against
.bss’
/tmp/tmpxft_00000499_00000000-16_main_C.o: In function __device_stub__Z13G_corrector_yv()': tmpxft_00000499_00000000-3_main_C.cudafe1.cpp:(.text+0x30b9): relocation truncated to fit: R_X86_64_PC32 against
.bss’
/tmp/tmpxft_00000499_00000000-16_main_C.o: In function __device_stub__Z13G_corrector_zv()': tmpxft_00000499_00000000-3_main_C.cudafe1.cpp:(.text+0x30e3): relocation truncated to fit: R_X86_64_PC32 against
.bss’
/tmp/tmpxft_00000499_00000000-16_main_C.o: In function __device_stub__Z5G_minv()': tmpxft_00000499_00000000-3_main_C.cudafe1.cpp:(.text+0x310d): relocation truncated to fit: R_X86_64_PC32 against
.bss’
/tmp/tmpxft_00000499_00000000-16_main_C.o: In function __device_stub__Z6G_min1v()': tmpxft_00000499_00000000-3_main_C.cudafe1.cpp:(.text+0x3137): relocation truncated to fit: R_X86_64_PC32 against
.bss’
/tmp/tmpxft_00000499_00000000-16_main_C.o: In function __device_stub__Z13G_predictor_xv()': tmpxft_00000499_00000000-3_main_C.cudafe1.cpp:(.text+0x3161): relocation truncated to fit: R_X86_64_PC32 against
.bss’
/tmp/tmpxft_00000499_00000000-16_main_C.o: In function __device_stub__Z13G_predictor_yv()': tmpxft_00000499_00000000-3_main_C.cudafe1.cpp:(.text+0x318b): relocation truncated to fit: R_X86_64_PC32 against
.bss’
/tmp/tmpxft_00000499_00000000-16_main_C.o: In function `__device_stub__Z13G_predictor_zv()':
tmpxft_00000499_00000000-3_main_C.cudafe1.cpp:(.text+0x31b5): additional relocation overflows omitted from the output
collect2: ld 返回 1
make: *** [all] 错误 1
楼主您好,
您可能使用了超过2GB的数组之类的巨大的结构。
请不要这样做(这不是个好的编程习惯)。
请检查是否如此。
版主您好,我检查了一下程序,最大的一个数组是192192111*8,双精度浮点型
占的显存大约为250MB,未超过2G,况且程序运行时也只用了1G的显存(nvidia-smi命令获得)
楼主您好,既然如此,我不知道具体原因了。
但这个看上去是贵host compiler(GCC)里的linker的报错。我不知道具体原因了。
(您可以咨询GCC的开发团队是否能解决此方面的信息,不过在您使用GCC前可能已经被迫接受了“无任何质保”的授权要求了)
感谢来访。
不知所措中,,,
还是感谢版主