RRO
From FarmShare
Line 11: | Line 11: | ||
dpkg -X RRO-3.2.2-Ubuntu-14.4.x86_64.deb . #extract the deb | dpkg -X RRO-3.2.2-Ubuntu-14.4.x86_64.deb . #extract the deb | ||
tar zxvf RevoMath-3.2.2.tar.gz | tar zxvf RevoMath-3.2.2.tar.gz | ||
- | |||
export PATH=~/RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/bin/:$PATH | export PATH=~/RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/bin/:$PATH | ||
Line 27: | Line 26: | ||
Packages in library ‘/home/chekh/RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/library’: | Packages in library ‘/home/chekh/RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/library’: | ||
- | If you want this to work every time you log in, you'd need to add the | + | Check your linear algebra performance with this test.R: http://www.bios.unc.edu/research/genomic_software/Matrix_eQTL/BLAS_Testing.html and https://web.stanford.edu/group/proclus/cgi-bin/mediawiki/index.php/Software-R#Measuring_linear_algebra_performance |
+ | |||
+ | For some reason with the pre-compiled RRO R v 3.2.0 the test.R takes over 10mins to run on my machine and eventually prints: | ||
+ | <pre> | ||
+ | chekh@srn-chek:~$ ./RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/bin/Rscript test.R | ||
+ | %*% 42.104 crossprod 53.855 | ||
+ | </pre> | ||
+ | |||
+ | After modifyint the RevoMath script like so, run it and it will install the RRO-distributed MKL to your local RRO install: | ||
+ | |||
+ | <pre> | ||
+ | chekh@srn-chek:~/RRO$ diff RevoMath/RevoMath.sh RevoMath.sh.alex | ||
+ | 6,7c6,7 | ||
+ | < R_PATH="noop" | ||
+ | < LIB_PATH= | ||
+ | --- | ||
+ | > R_PATH=~/RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/bin/R | ||
+ | > LIB_PATH=~/RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/lib | ||
+ | 142c142 | ||
+ | < checkForValidRROInstallation | ||
+ | --- | ||
+ | > #checkForValidRROInstallation | ||
+ | </pre> | ||
+ | |||
+ | After installing the RevoMath script: | ||
+ | <pre> | ||
+ | chekh@srn-chek:~$ ./RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/bin/Rscript test.R | ||
+ | Multithreaded BLAS/LAPACK libraries detected. Using 4 cores for math algorithms. | ||
+ | %*% 1.12 crossprod 0.869 | ||
+ | </pre> | ||
+ | |||
+ | So you can see about 40x faster in this case. | ||
+ | |||
+ | If you want this to work every time you log in, you'd need to add the PATH modification to your startup scripts. Pretty standard. |
Revision as of 19:01, 14 October 2015
Revolution R is a pre-compiled distribution of R. Here's how you can install it into your homedir without sysadmin intervention.
It's a little bit round-about because they actually only provide .deb packages, but we want just the files. So we extract the files from the deb instead of just installing the deb into the system.
We currently use the Ubuntu 14.04 distribution, so we download the appropriate packages from here: https://mran.revolutionanalytics.com/download/#download
mkdir ~/RRO cd RRO wget https://mran.revolutionanalytics.com/install/RRO-3.2.2-Ubuntu-14.4.x86_64.deb wget https://mran.revolutionanalytics.com/install/RevoMath-3.2.2.tar.gz dpkg -X RRO-3.2.2-Ubuntu-14.4.x86_64.deb . #extract the deb tar zxvf RevoMath-3.2.2.tar.gz export PATH=~/RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/bin/:$PATH
Now you can check which R you're going to use, it should point to your RRO R:
which R
You can check the version:
R --version
You can check the library:
R library();
In my case it says:
Packages in library ‘/home/chekh/RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/library’:
Check your linear algebra performance with this test.R: http://www.bios.unc.edu/research/genomic_software/Matrix_eQTL/BLAS_Testing.html and https://web.stanford.edu/group/proclus/cgi-bin/mediawiki/index.php/Software-R#Measuring_linear_algebra_performance
For some reason with the pre-compiled RRO R v 3.2.0 the test.R takes over 10mins to run on my machine and eventually prints:
chekh@srn-chek:~$ ./RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/bin/Rscript test.R %*% 42.104 crossprod 53.855
After modifyint the RevoMath script like so, run it and it will install the RRO-distributed MKL to your local RRO install:
chekh@srn-chek:~/RRO$ diff RevoMath/RevoMath.sh RevoMath.sh.alex 6,7c6,7 < R_PATH="noop" < LIB_PATH= --- > R_PATH=~/RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/bin/R > LIB_PATH=~/RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/lib 142c142 < checkForValidRROInstallation --- > #checkForValidRROInstallation
After installing the RevoMath script:
chekh@srn-chek:~$ ./RRO/usr/lib64/RRO-3.2.2/R-3.2.2/lib/R/bin/Rscript test.R Multithreaded BLAS/LAPACK libraries detected. Using 4 cores for math algorithms. %*% 1.12 crossprod 0.869
So you can see about 40x faster in this case.
If you want this to work every time you log in, you'd need to add the PATH modification to your startup scripts. Pretty standard.