有人在linux 上用cuda 做开发的么

75 views
Skip to first unread message

Bendney Yu

unread,
May 14, 2014, 5:21:13 AM5/14/14
to hz...@googlegroups.com
编译的时候 dim3  类型找不到,导致编译出错。

--
Best Regards

Bendney Yu

cheng chen

unread,
May 14, 2014, 6:01:52 AM5/14/14
to Hangzhou (杭州) Linux User Group
用nvcc编译的?
你信息给太少


--
--
欢迎来到杭州Linux用户组邮件列表
要在列表里发起一个帖子(专业术语叫线索,thread) 发送邮件到 hz...@googlegroups.com
如要退订: 请发送空邮件至 hzlug+un...@googlegroups.com
详情请看: http://groups.google.com/group/hzlug?hl=zh-CN

---
您收到此邮件是因为您订阅了Google网上论坛中的“Hangzhou (杭州) Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到hzlug+un...@googlegroups.com
要查看更多选项,请访问https://groups.google.com/d/optout



--
MfG

Cheng(誠)

Bendney Yu

unread,
May 14, 2014, 6:29:49 AM5/14/14
to hz...@googlegroups.com
1. ubuntu 10.04下安装的 cuda 版本4.0。

2. 用nvcc 编译的,编译的时候已经链接上cudart 库,是否需要链接 cuda 库?
3. 我在cuda/lib 下面找了老半天没有找到libcuda.so?是否这个版本有缺失?
Best Regards

Bendney Yu

Bendney Yu

unread,
May 14, 2014, 7:28:17 AM5/14/14
to hz...@googlegroups.com
编译附件中的源文件
/opt/cuda/bin/nvcc absdiff.cu -lcuda -lcudart -L/opt/cuda/lib
得到以下errors:

absdiff.cu(200): error: transfer of control bypasses initialization of:
            variable "threads"
(235): here
            variable "grids"
(236): here

absdiff.cu(207): error: transfer of control bypasses initialization of:
            variable "threads"
(235): here
            variable "grids"
(236): here

absdiff.cu(213): error: transfer of control bypasses initialization of:
            variable "threads"
(235): here
            variable "grids"
(236): here

absdiff.cu(219): error: transfer of control bypasses initialization of:
            variable "threads"
(235): here
            variable "grids"
(236): here

absdiff.cu(226): error: transfer of control bypasses initialization of:
            variable "threads"
(235): here
            variable "grids"
(236): here

absdiff.cu(232): error: transfer of control bypasses initialization of:
            variable "threads"
(235): here
            variable "grids"
(236): here

6 errors detected in the compilation of "/tmp/tmpxft_000044f9_00000000-4_absdiff.cpp1.ii".


absdiff.cu

cheng chen

unread,
May 15, 2014, 8:20:36 AM5/15/14
to Group(杭州) Linux UserHangzhou

你定义的地方不对,定义的地方不一定能被执行到。nvcc用的是c语法,定义在函数顶部

Bendney Yu

unread,
May 15, 2014, 9:43:27 PM5/15/14
to hz...@googlegroups.com
已经编译通过,这家伙非GPU部门用的是gcc,只有GPU部门程序用的nvcc

Thanks
Reply all
Reply to author
Forward
0 new messages