Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have use a self-complie R 2.15 on CentOS 6.4

All CUDA environment is correct (I have wrote CUDA C program)

and I have yum installed R-devel

I still can not install gputools for R


config.status: creating src/Makefile
config.status: creating R/gpuSvm.R
config.status: creating R/gpuFastICA.R
config.status: creating R/gpuSvd.R
** libs
** arch - 
/usr/local/cuda-5.0/bin/nvcc -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -c -I. -I/usr/local/cuda-5.0/include  -Xcompiler -fpic -o kendall.o
ptxas /tmp/tmpxft_00002846_00000000-17_kendall.compute_10.ptx, line 285; warning : Double is not supported. Demoting to float
ptxas /tmp/tmpxft_00002846_00000000-14_kendall.compute_11.ptx, line 285; warning : Double is not supported. Demoting to float
ptxas /tmp/tmpxft_00002846_00000000-11_kendall.compute_12.ptx, line 285; warning : Double is not supported. Demoting to float
/usr/local/cuda-5.0/bin/nvcc -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -c -I. -I/usr/local/cuda-5.0/include  -Xcompiler -fpic -o classification.o error: R.h: No such file or directory
make: *** [classification.o] Error 1
ERROR: compilation failed for package ‘gputools’
* removing ‘/usr/local/lib64/R/library/gputools’

The downloaded source packages are in
Updating HTML index of packages in '.Library'
Making packages.html  ... done
Warning message:
In install.packages("gputools") :
  installation of package ‘gputools’ had non-zero exit status
share|improve this question

migrated from Mar 19 '13 at 14:19

This question came from our site for professional and enthusiast programmers.

I started a bounty for this question, but after a while I figured out how to solve it, so I might as well post it here as an answer.

It looks like nvcc is asking for /usr/lib/R/include, which does not exist on ubuntu 12.04. Here is the solution (tested on ubuntu 12.04)

sudo aptitude install r-base-dev
cd /usr/lib/R
sudo ln -s /usr/share/R/include .

Now start R and install gputools as usual. It should work. You should be able to work out something similar on centOS.

share|improve this answer
Just so you know, you can probably avoid creating a link by using the pkg-configure application with the --cflags and/or --libs options with the package name (e.g. calling pkg-configure --cflags r-base-rev should echo the proper flags for nvcc/gcc to find the R.h file automatically). – Breakthrough Jun 6 '13 at 20:49

I have Debian Wheezy and followed Nvidia's Ubuntu CUDA instructions as best I could. When I everything was installed, I was unable to install gputools into R3.01. This post was the ticket to solving the problem. Once I created the link with the following two lines in a terminal, I could successfully install gputools.

cd /usr/lib/R sudo ln -s /usr/share/R/include .

Don't forget the trailing space and dot!!

If you are using Debian Wheezy, be sure that you also include include cuda in your PATH and LD_LIBRARY_PATH as specified in the Nvidia cuda instructions. To make these permanent, put the following two lines after the PATH statements in /etc/profile. Those PATH statements are inside an if ... fi structure, so place the lines after the fi statement. Putting this in /etc/profile will make sure that the updates are available to all users.

export PATH=$PATH:/usr/local/cuda-5.5/bin export LD_LIBRARY_PATH="/usr/local/cuda-5.5/lib64"

Note, if you already have an LD_LIBRARY_PATH you should substitute

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-5.5/lib64


export LD_LIBRARY_PATH="/usr/local/cuda-5.5/lib64"


share|improve this answer

You must log in to answer this question.