2016-12-13 9 views
-4

私はNVIDIAのWebサイトの指示に従って、コンピュータにCUDAをセットアップしています。私は "3.2 Install"(http://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#installation)まですべてを完了しました。コマンドcuda-install-samples-8.0.shの使用方法がわかりません。コマンドが見つからないと言います。私が実行しようとすると、私は次のメッセージが表示されますいくつかのサンプルをコンパイルするために作る:私はこれを望んでいるMacでCUDAをセットアップしますか?

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 
+0

Xcodeをインストールしましたか? –

+0

私の投稿、短い答え:はいを編集しました。ありがとうございました。 @PaulR – Developer

+1

申し訳ありません - 他に何を提案すればいいのでしょうか?おそらくnVidia開発者フォーラムを試してみてください。 –

答えて

-2

回答は次のリンクhttps://github.com/nodejs/node-gyp/issues/569#issuecomment-255589932(bergerjacの答え)に見つけることができます。また、別のエラーはそのため

Unable to open output file 'vectorAdd.o': 'Error opening output file 'vectorAdd.o': Permission denied 

などの線に沿っている可能性が何かをポップアップかもしれない私は、次のコマンド

sudo chown -R your-user-name /Developer/NVIDIA/CUDA-7.0/samples

を走ったと私はそれが正常に動作信じています。

関連する問題