需要帮助在我的系统上安装gputools(R版本3.1.2(2014-10-31)x86_64)

时间:2015-09-13 00:33:38

标签: r nvidia gpu-programming

我找到了一个网站,建议我在安装Nvidia工具包之前检查并查看是否已安装所有内容。我在R里面做了以下操作,我正在运行:

  

R版本3.1.2(2014-10-31) - “南瓜头盔”版权所有(C)2014   R统计计算平台基金会:   x86_64-pc-linux-gnu(64位)

     

2.1。验证您是否拥有支持CUDA的GPU

     

system(“lspci | grep -i nvidia”)       01:00.0 VGA兼容控制器:NVIDIA公司GM107 [GeForce GTX 750 Ti](rev a2)       01:00.1音频设备:NVIDIA Corporation设备0fbc(rev a1)

     

2.2。验证您是否拥有受支持的Linux版本

system("uname -m && cat /etc/*release")
x86_64
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.04
DISTRIB_CODENAME=vivid
DISTRIB_DESCRIPTION="Ubuntu 15.04"
NAME="Ubuntu"
VERSION="15.04 (Vivid Vervet)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 15.04"
VERSION_ID="15.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
  

2.3。验证系统是否已安装gcc

system("gcc --version")
gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  

2.4。验证系统是否安装了正确的内核标头和开发包

system("uname -r")
3.19.0-28-generic

system("nvcc --version")
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2014 NVIDIA Corporation
Built on Thu_Jul_17_21:41:27_CDT_2014
Cuda compilation tools, release 6.5, V6.5.12

system("cat /proc/driver/nvidia/version")
NVRM version: NVIDIA UNIX x86_64 Kernel Module  352.30  Tue Jul 21 18:53:45 PDT 2015
GCC version:  gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13) 
  

install.packages("gputools.tar.gz", repos = NULL, type = "source")
Installing package into ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
* installing *source* package ‘gputools’ ...
files ‘src/Makefile’, ‘src/config.mk’ have the wrong MD5 checksums
** libs
** arch - 
/usr/lib/nvidia-cuda-toolkit/bin/nvcc  -gencode arch=compute_50,code=sm_50 -c -I. -I"/usr/lib/nvidia-cuda-toolkit/include" -I"/usr/lib/R/include"  -Xcompiler -fpic rinterface.cu -o rinterface.o
rinterface.cu:1:14: fatal error: R.h: No such file or directory
 #include<R.h>
              ^
compilation terminated.
Makefile:27: recipe for target 'rinterface.o' failed
make: *** [rinterface.o] Error 1
ERROR: compilation failed for package ‘gputools’
* removing ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.1/gputools’
Warning in install.packages :
  installation of package ‘gputools.tar.gz’ had non-zero exit status
  

install.packages("gputools", dependencies = T)
Installing package into ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/gputools_0.28.tar.gz'
Content type 'application/x-gzip' length 65883 bytes (64 Kb)
opened URL
==================================================
downloaded 64 Kb

* installing *source* package ‘gputools’ ...
** package ‘gputools’ successfully unpacked and MD5 sums checked
** libs
** arch - 
/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/lib/R/include"  -Xcompiler -fpic rinterface.cu -o rinterface.o
/bin/bash: /usr/local/cuda/bin/nvcc: No such file or directory
Makefile:27: recipe for target 'rinterface.o' failed
make: *** [rinterface.o] Error 127
ERROR: compilation failed for package ‘gputools’
* removing ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.1/gputools’
Warning in install.packages :
  installation of package ‘gputools’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpvcNoks/downloaded_packages’

正如我刚开始使用R一样,任何帮助都会很棒。

1 个答案:

答案 0 :(得分:0)

对于最新版本的gputools,请特别注意以下说明:

rinterface.cu:1:14: fatal error: R.h: No such file or directory
  1. 从以下位置下载tar文件: https://cran.r-project.org/web/packages/gputools/index.html
  2. ~$ wget http://cran.r-project.org/src/contrib/gputools_1.1.tar.gz
    

    2。提取内容

    ~$ tar -zxvf gputools_1.1.tar.gz
    

    3.查看INSTALL文件的内容以获取说明

    ~$ cd gputools/
    ~/gputools$ gedit INSTALL
    

    4.如果您按照说明操作,最终会得到类似的内容

    ~$ R CMD INSTALL --configure-args="--with-nvcc=/usr/local/cuda/bin/nvcc 
    --with-r-include=/usr/share/R/include" gputools_1.1.tar.gz