【发布时间】:2017-04-28 04:58:18
【问题描述】:
我正在按照 NVIDIA 网站上的说明在我的计算机上设置 CUDA。我已经完成了“3.2 安装”(http://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#installation)之前的所有工作。我不确定如何使用命令cuda-install-samples-8.0.sh,它说找不到该命令。当我尝试运行 make 来编译一些示例时,我收到以下消息:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
expr: syntax error
/Developer/NVIDIA/CUDA-8.0/bin/nvcc -ccbin g++ -I../../common/inc -m64 -Xcompiler -arch -Xcompiler x86_64 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_60,code=compute_60 -o vectorAdd.o -c vectorAdd.cu
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc fatal : GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X.
make: *** [vectorAdd.o] Error 1
我希望这与我没有设置环境变量有关。我有一台配备 NVIDIA GeForce GT 650M GPU 的 MacBook Pro,所以我很确定我的计算机与 CUDA 兼容。
我已经安装了 Xcode,并对其进行了更新,并确保安装了命令行工具。
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
【问题讨论】:
-
你安装Xcode了吗?
-
编辑了我的帖子,简短回答:是的。谢谢你。 @PaulR
-
抱歉 - 不知道还有什么建议 - 也许试试 nVidia 开发者论坛?
-
这与 SO 无关,在您自己的程序上寻求编程问题的帮助时应该使用它。
-
“有关通用计算硬件和软件的问题对于 Stack Overflow 来说是无关紧要的,除非它们直接涉及主要用于编程的工具。”我需要安装 CUDA 以便我可以编写我的程序,所以这不是题外话。试着帮忙:)
标签: macos shell parallel-processing cuda gpu