R 3.0.2 on Parallella Ubuntu

Moderator: censix

R 3.0.2 on Parallella Ubuntu

Postby philipz » Fri Oct 24, 2014 10:18 am

Hi,

I found R have installed on Ubuntu 14.04 for Parallella. But, this R 3.0.2 isn't installed Rcpp and ROpenCL.
I suggest the release image could pre-load those packages.
philipz
 
Posts: 8
Joined: Tue Nov 12, 2013 2:16 am

Re: R 3.0.2 on Parallella Ubuntu

Postby censix » Sun Oct 26, 2014 7:24 pm

From the R prompt, do

install.packages('Rcpp ')
install.packages('ROpenCL')

and you have what you want. Takes about 5 seconds to install....
censix
 
Posts: 49
Joined: Sun Dec 16, 2012 7:54 pm
Location: europe

Re: R 3.0.2 on Parallella Ubuntu

Postby sneuf0897 » Sun Jan 25, 2015 11:35 pm

Hi Censix,

censix wrote:From the R prompt, do

install.packages('Rcpp ')
install.packages('ROpenCL')

and you have what you want. Takes about 5 seconds to install....


I get this when I try to install ROpenCL
package ‘ROpenCL’ is not available (for R version 3.0.2)

What can I do to get past this?
sneuf0897
 
Posts: 4
Joined: Tue Aug 05, 2014 3:08 pm

Re: R 3.0.2 on Parallella Ubuntu

Postby davewr2015 » Sun Aug 30, 2015 1:08 am

sneuf0897 wrote:Hi Censix,

censix wrote:From the R prompt, do

install.packages('Rcpp ')
install.packages('ROpenCL')

and you have what you want. Takes about 5 seconds to install....


I get this when I try to install ROpenCL
package ‘ROpenCL’ is not available (for R version 3.0.2)

What can I do to get past this?


Same Issue! R 3.03

Any solutions?
davewr2015
 
Posts: 7
Joined: Sat Aug 29, 2015 8:57 pm

Re: R 3.0.2 on Parallella Ubuntu

Postby Timtator » Wed Sep 23, 2015 3:03 am

I have a solution.

To install the packages, not as root and outside of R. Run these three commands:

Code: Select all
sudo su - -c "R -e \"install.packages('Rcpp', repos = 'http://cran.rstudio.com/')\""
sudo su - -c "R -e \"install.packages('logging', repos = 'http://cran.rstudio.com/')\""
sudo su - -c "R -e \"install.packages('ROpenCL', repos = 'http://repos.openanalytics.eu', type = 'source')\""


Then you should have ROpenCL installed :)

However, as Censix has said in another thread, the package needs slight modification.

So instead of running the last command above, you are probably better off doing this:

Code: Select all
wget http://repos.openanalytics.eu/src/contrib/ROpenCL_0.1-2.tar.gz
tar zxf ROpenCL_0.1-2.tar.gz

wget http://censix.com/parallella/parallella-ROpenCL_0.1-1.patch
patch -p0 <parallella-ROpenCL_0.1-1.patch

R CMD INSTALL ROpenCL


Then when you type in R:

Code: Select all
require(ROpenCL)


You will see:

Code: Select all
Loading required package: ROpenCL
Loading required package: Rcpp
Loading required package: logging
coprthr-1.6.0 (Freewill)


Then type in R:
Code: Select all
p <- getPlatformIDs()
d <- getDeviceIDs(p[[1]])
d

And you should see both devices as opposed to just the host:

Code: Select all
[[1]]
<pointer: 0xcb1010>

[[2]]
<pointer: 0x7e0b90>
Timtator
 
Posts: 10
Joined: Tue Jul 21, 2015 8:18 am

Re: R 3.0.2 on Parallella Ubuntu

Postby Befedo » Wed Oct 07, 2015 5:09 pm

Hi folks,
I'm trying to follow your instructions to run OpenCL code within R.

My R Version is
Code: Select all
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
so far what I did was:
Code: Select all
sudo su - -c "R -e \"install.packages('Rcpp', repos = 'http://cran.rstudio.com/')\""
sudo su - -c "R -e \"install.packages('logging', repos = 'http://cran.rstudio.com/')\""
wget http://repos.openanalytics.eu/src/contrib/ROpenCL_0.1-2.tar.gz
tar zxf ROpenCL_0.1-2.tar.gz
wget http://censix.com/parallella/parallella-ROpenCL_0.1-1.patch
patch -p0 <parallella-ROpenCL_0.1-1.patch

but applying the path fails and leads to:
Code: Select all
patching file ROpenCL//src/createContext.cpp
patching file ROpenCL//src/Makevars
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file ROpenCL//src/Makevars.rej

and if we inspect what's been rejected and look into 'Makewars.rej':
Code: Select all
--- ROpenCL//src/Makevars       2012-03-01 18:33:41.000000000 +0000
+++ ROpenCL1//src/Makevars      2013-06-13 20:38:37.554603712 +0000
@@ -1,7 +1,9 @@
 ## Use the R_HOME indirection to support installations of multiple R version
-PKG_CPPFLAGS += -I../inst/include/
+
+## Parallella: make sure the COPRTHR OpenCL implementation by browndeer is used.
+PKG_CPPFLAGS += -I/usr/local/browndeer/include
 PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`
-PKG_LIBS += -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib -lOpenCL
+PKG_LIBS += -L/usr/local/browndeer/lib -locl

 ## As an alternative, one can also add this code in a file 'configure'
 ##

so i tried to fix this by hand an tried inside R:
Code: Select all
> require(ROpenCL)
Loading required package: ROpenCL
Loading required package: Rcpp
Loading required package: logging
coprthr-1.6.0 (Freewill)
> p <- getPlatformIDs()
> d <- getDeviceIDs(p[[1]])
> d
[[1]]
<pointer: 0x6db218>

so it seems like the Epiphany isn't found.
Does anybody overcome this error and could figure out an solution?

Thanks for your help and best regards,


Befedo
Befedo
 
Posts: 5
Joined: Wed Sep 09, 2015 8:29 am


Return to R

Who is online

Users browsing this forum: No registered users and 2 guests