How to compile CUDA SDK Sample?

我怕爱的太早我们不能终老 提交于 2019-12-11 05:45:57

问题


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/


回答1:


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

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.



来源:https://stackoverflow.com/questions/15790150/how-to-compile-cuda-sdk-sample

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!