CUDA5.0的cdpAdvancedQuicksort例只能在windows环境下编译运行?

CUDA5.0 的cdpAdvancedQuicksort 的例子是不是只能在windows环境下编译运行?

[root@gpu cdpAdvancedQuicksort]# nvcc cdpAdvancedQuicksort.cu
cdpAdvancedQuicksort.cu(145): error: identifier “__ballot” is undefined

cdpAdvancedQuicksort.cu(160): error: identifier “atomicAdd” is undefined

cdpAdvancedQuicksort.cu(162): error: identifier “atomicAdd” is undefined

cdpAdvancedQuicksort.cu(165): error: identifier “__shfl” is undefined

cdpAdvancedQuicksort.cu(190): error: identifier “atomicAdd” is undefined

cdpAdvancedQuicksort.cu(223): error: calling a global function(“big_bitonicsort”) from a global function(“qsort_warp”) is only allowed on the compute_35 architecture or above

cdpAdvancedQuicksort.cu(234): error: calling a global function(“qsort_warp”) from a global function(“qsort_warp”) is only allowed on the compute_35 architecture or above

cdpAdvancedQuicksort.cu(244): error: calling a global function(“bitonicsort”) from a global function(“qsort_warp”) is only allowed on the compute_35 architecture or above

cdpAdvancedQuicksort.cu(260): error: calling a global function(“big_bitonicsort”) from a global function(“qsort_warp”) is only allowed on the compute_35 architecture or above

cdpAdvancedQuicksort.cu(270): error: calling a global function(“qsort_warp”) from a global function(“qsort_warp”) is only allowed on the compute_35 architecture or above

cdpAdvancedQuicksort.cu(277): error: calling a global function(“bitonicsort”) from a global function(“qsort_warp”) is only allowed on the compute_35 architecture or above

cdpAdvancedQuicksort.cu(86): error: identifier “atomicAdd” is undefined

cdpAdvancedQuicksort.cu(87): error: identifier “atomicMax” is undefined

cdpAdvancedQuicksort.cu(66): error: identifier “atomicAdd” is undefined

14 errors detected in the compilation of “/tmp/tmpxft_00002ef2_00000000-6_cdpAdvancedQuicksort.cpp1.ii”.

上边使用nvcc
下边是makfile的结果

[root@gpu cdpAdvancedQuicksort]# ./Makefile
./Makefile: line 37: OSUPPER: command not found
./Makefile: line 38: OSLOWER: command not found
./Makefile: line 41: shell: command not found
./Makefile: line 41: OS_SIZE: command not found
./Makefile: line 42: shell: command not found
./Makefile: line 42: OS_ARCH: command not found
./Makefile: line 45: syntax error near unexpected token $(i386),1' ./Makefile: line 45: ifeq ($(i386),1)’

LZ您好,我觉得应该是您配置的问题,而不是代码本身的问题。

但我并不使用除WIN外的其他OS,所以无法进一步建议了,留待其他人补充。

祝您好运!

Makefile不能自己执行,需要使用make工具来解释其中内容,执行。

建议的解决方案:请使用make(或者gmake,如果您的默认make不是gnu make的话)回车而不是./Makefile回车。

楼主的问题和CUDA无关。望您下次能注意。

本人刚接触CUDA,处于环境熟悉的阶段,多谢版主回复!

谢版主指导,下次注意:D