## Thursday, June 4, 2015

### R-GPU on our Gupiter

As you may know, our gpu server is called gupiter, voted by the research members in our last formal meeting.

I just installed the gputools package in R (with a lots of difficulties). Now you can compute on the the Tesla K40  from R.  It is enough to load the gputools library and use the cuda wrapped functions.
Moreover, our gpuiter now can give you access to RStudio through RStudioServer. Since we have only two seats over the gupiter, I thought it is much better if I provide access to the other team members. Now you can remotely can have access (with graphical support) through RStudioServer.
Sajjad already made a post on comparison of GPU with CPU in MATLAB over gupiter. I just run a toy example. Let's generate a 1024X1024 random matrix and compute the Euclidean distance over the matrix. Seems for this example gpu is about 30 times faster! I am sure we can get much more efficiency over larger data.

library(gputools)
set.seed(5446)
X <- matrix(rnorm(2^20),ncol = 2^(10))
cputime <- system.time(d <- dist(X))
gputime <- system.time(gpud <- gpuDist(X))
cputime/gputime[1]
##     user   system  elapsed
## 31.11688  0.00000 31.12338