我一直在努力在我的计算机上安装 r
包 gputools
。我已经安装了 CUDA 并按照 here 所说正确设置了相应的 PATH 文件。
编译包时我最初收到错误
/usr/local/cuda/bin/nvcc -gencode arch=compute_10,code=sm_10 -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -c -I. -I"/usr/local/cuda/include" -I"/usr/local/Cellar/r/3.1.0/R.framework/Resources/include" -m64 -Xcompiler -fPIC rinterface.cu -o rinterface.o
nvcc fatal : Unsupported gpu architecture 'compute_10'
我通过从 gputools
makefile 中删除 -gencode arch=compute_10,code=sm_10
解决了这个问题(找到了这个简单的解决方案 here )。
现在它会编译一些内容大约 30 秒,然后以以下错误结束:
/usr/local/cuda/bin/nvcc -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -shared -m64 -Xlinker '-rpath /usr/local/cuda/lib -F/usr/local/Cellar/r/3.1.0/R.framework/Resources/.. -framework R' -L"/usr/local/Cellar/r/3.1.0/R.framework/Resources/lib" -L"/usr/local/cuda/lib" -lcublas -framework Accelerate rinterface.o mi.o sort.o granger.o qrdecomp.o correlation.o hcluster.o distance.o matmult.o lsfit.o kendall.o cuseful.o -o gputools.so
nvcc fatal : Unknown option 'framework'
make: *** [gputools.so] Error 1
ERROR: compilation failed for package ‘gputools’
* removing ‘/usr/local/Cellar/r/3.1.0/R.framework/Versions/3.1/Resources/library/gputools’
完整的控制台输出可以在 here 中找到。我对这个感到迷惑,在 config.mk
文件中只出现了一次 -framework
,即 R_FRAMEWORK := -F$(R_HOME )/.. -framework R
甚至删除 -framework R
也没有什么区别。
注意:我使用 R CMD build gputools && R CMD INSTALL gputools_0.28.tar.gz
从存储库将其编译为 recommended here
有人知道我可以尝试什么吗?
最佳答案
看来gputools 1.0已经解决了我的问题。我已经能够使用 R 3.2.2
毫无问题地安装它。
platform x86_64-apple-darwin15.0.0
arch x86_64
os darwin15.0.0
system x86_64, darwin15.0.0
status
major 3
minor 2.2
year 2015
month 08
day 14
svn rev 69053
language R
version.string R version 3.2.2 (2015-08-14)
nickname Fire Safety
关于r - gputools 安装失败 - "Unknown option ' 框架'",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27966346/