如何编译CUDA SDK示例? [英] How to compile CUDA SDK Sample?

查看:68
本文介绍了如何编译CUDA SDK示例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法编译共轭梯度求解器.我下载了包含库,makefile和其他内容的整个档案,但是编译器缺少一些头文件.如何包含我下载的所有文件?也许我需要添加一些路径或将文件夹"common"复制到/usr/local/cuda/include/

I failed to compile conjugate gradient solver. I downloaded the whole archieve that contains libraries, makefile and other stuff but the compiler lacks some header files. How to include all files I downloaded? Maybe I need to add some path or copy folder "common" to /usr/local/cuda/include/

推荐答案

要直接下载并构建cuda示例,以下步骤对我有用:

To download and build a cuda sample directly, the following steps worked for me:

wget http://developer.download.nvidia.com/compute/DevZone/CUDALibraries/Projects/x64/conjugateGradient.tar.gz
tar -xzvf conjugateGradient.tar.gz
cd 7_CUDALibraries/conjugateGradient
make
# to execute the program:
./conjugateGradient

这假定可以在/usr/local/cuda 中获得标准的cuda 5安装.它不假定以前安装了任何示例.我在装有CUDA 5和RHEL 5.5的计算机上对此进行了测试

This assumes a standard cuda 5 install is available at /usr/local/cuda. It does not assume that any samples are previously installed. I tested this on a machine with CUDA 5 and RHEL 5.5

如果这不起作用,请发布您收到的错误输出的详细信息.

If this does not work, please post details of the error output you received.

如果您要使用此处给出的示例以外的其他示例,则可以从

If you want to use some other sample than the example given here, the download links can be obtained here.

这篇关于如何编译CUDA SDK示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆