Script for RStudio CentOS Linux install dependencies yum

 

Script for RStudio CentOS Linux install dependencies yum

This is supposed to work:

http://support.rstudio.org/help/discussions/problems/3353-installing-r-studio-server-on-redhat-446-4#comment_18902730
yum install r-studio-server.rpm

https://github.com/rstudio/rstudio/blob/master/dependencies/linux/install-dependencies-yum

 

#!/bin/bash
#
# install-dependencies-yum
#
# Copyright (C) 2009-12 by RStudio, Inc.
#
# This program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#
#
set -e
# build/development tools
sudo yum install -y make
sudo yum install -y gcc
sudo yum install -y gcc-c++
sudo yum install -y cmake
sudo yum install -y rpmdevtools
# core system libraries
sudo yum install -y libuuid-devel
sudo yum install -y openssl-devel
sudo yum install -y bzip2-devel
sudo yum install -y zlib-devel
sudo yum install -y pam-devel
# boost
sudo yum install -y boost-devel
# pango cairo
sudo yum install -y pango-devel
# gwt prereqs
sudo yum install -y java-1.6.0-openjdk
sudo yum install -y ant
sudo yum install -y xml-commons-apis
# common
cd ../common
./install-gwt
./install-dictionaries
./install-mathjax
cd ../linux
# boost
./install-boost
# desktop dependencies (qt)
if [ "$1" != "--exclude-qt-sdk" ]
then
   # install Qt 4.8 SDK (into a private /opt/RStudio-QtSDK directory so as to
   # not conflict with any other installed versions of Qt on the system)
   ./install-qt-sdk
fi

Posted in R and tagged , , , , , ,

How to install R Base with latest update and Rstudio onto Debian Linux #rstats #linux

How to install R Base with latest update and Rstudio onto Debian Linux

apt-get install r-base

http://rwiki.sciviews.org/doku.php?id=getting-started:installation:debian#install_r

Then from http://tata-box-blog.blogspot.ca/2012/03/install-r-2142-in-debian-squeeze.html

First, open a Terminal and open the sources.list file: $ gksudo gedit /etc/apt/sources.list

Then, add these lines at the bottom of the file (Note, I use the UCLA server, but this can be easily changed taking a look here for the mirrors):

## R BACKPORTS deb http://cran.stat.ucla.edu/bin/linux/debian squeeze-cran/ #deb-src http://cran.stat.ucla.edu/bin/linux/debian squeeze-cran/ To install Rstudio download Rstudio deb file from http://www.rstudio.com/ide/download/desktop Install with deb http://linux.about.com/od/ubuntu_doc/a/ubudg21t2.htm

To install Rstudio

 

download Rstudio deb file from

http://www.rstudio.com/ide/download/desktop

Install with deb

http://linux.about.com/od/ubuntu_doc/a/ubudg21t2.htm

Posted in R and tagged , , , , , ,

Damn, I really want to get RCPP and RInside working on my Netbeans for WIndows with Cygwin but..

Damn, I really want to get RCPP and RInside  working on my Netbeans for WIndows with Cygwin but..

I get these errors in my build attempt within Nebeans:

## -*- mode: makefile; tab-width: 8; -*-
##
## Simple Makefile for Windows

## This version is fairly directly derived from the Unix versions
## You may have to set R_HOME manually if this does not work
## It requires Rtools in the path — as does all R package building
#R_HOME := $(shell R RHOME | sed -e “s|\\\\|\/|g”)
R_HOME := “/cygdrive/c/PROGRA~1/R/R-214~1.1″

## You may have to set this to one of the two values below to enforce a particular
## architecture in case the autodetection in the next line does not work correctly
R_ARCH := –arch $(shell echo ‘cat(.Platform$$r_arch)’ | R –vanilla –slave)
##R_ARCH := –arch i386
##R_ARCH := –arch x64

## You may need to set R_LIBS_USER if Rcpp or RInside are installed where R does not see them by default
#R_LIBS_USER := “C:/myRstuff/library”

sources := $(wildcard *.cpp)
programs := $(sources:.cpp=)

## include headers and libraries for R
RCPPFLAGS := $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config –cppflags)
RLDFLAGS := $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config –ldflags)
RBLAS := $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config BLAS_LIBS)
RLAPACK := $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config LAPACK_LIBS)
## include headers and libraries for Rcpp interface classes
RCPPINCL := $(shell echo ‘Rcpp:::CxxFlags()’ | $(R_HOME)/bin/R $(R_ARCH) –vanilla –slave)
RCPPLIBS := $(shell echo ‘Rcpp:::LdFlags()’ | $(R_HOME)/bin/R $(R_ARCH) –vanilla –slave)
## include headers and libraries for RInside embedding classes
RINSIDEINCL := $(shell echo ‘RInside:::CxxFlags()’ | $(R_HOME)/bin/R $(R_ARCH) –vanilla –slave)
RINSIDELIBS := $(shell echo ‘RInside:::LdFlags()’ | $(R_HOME)/bin/R $(R_ARCH) –vanilla –slave)
## compiler etc settings used in default make rules
CXX := $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config CXX)
CPPFLAGS := -Wall $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config CPPFLAGS)
CXXFLAGS := $(RCPPFLAGS) $(RCPPINCL) $(RINSIDEINCL) $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config CXXFLAGS)
LDFLAGS = -s
LDLIBS := $(RLDFLAGS) $(RBLAS) $(RLAPACK) $(RINSIDELIBS) $(RCPPLIBS)
CC := $(shell $(R_HOME)/bin/R $(R_ARCH) CMD config CXX)

Error and warning  messages are:

(Note the strange MinGW path but I am not using that)

cygwin warning:
MS-DOS style path detected: C:\PROGRA~1\R\R-214~1.1/bin/config.sh
Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-214~1.1/bin/config.sh
CYGWIN environment variable option “nodosfilewarning” turns off this warning.
Consult the user’s guide for more details about POSIX paths:

http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

rm -vf rinside_sample8 rinside_sample12 rinside_test1 rinside_sample2 rinside_sample5 rinside_sample3 rinside_sample11 rinside_sample9 rinside_callbacks0 rinside_sample6 rinside_sample1 rinside_sample4 rinside_module_sample0 rinside_sample0 rinside_test0 rinside_sample10 rinside_sample7
CLEAN SUCCESSFUL (total time: 4s)

cygwin warning:
MS-DOS style path detected: C:\PROGRA~1\R\R-214~1.1/bin/config.sh
Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-214~1.1/bin/config.sh
CYGWIN environment variable option “nodosfilewarning” turns off this warning.
Consult the user’s guide for more details about POSIX paths:

http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

x86_64-w64-mingw32-g++ -IC:/PROGRA~1/R/R-214~1.1/include -IC:/PROGRA~1/R/R-214~1.1/include/x64 -IC:/Program Files/R/R-2.14.1/library/Rcpp/include -IC:/Program Files/R/R-2.14.1/library/RInside/include -O2 -Wall -mtune=core2 -Wall -s rinside_sample8.cpp -LC:/PROGRA~1/R/R-214~1.1/bin/x64 -lR -LC:/PROGRA~1/R/R-214~1.1/bin/x64 -lRblas -LC:/PROGRA~1/R/R-214~1.1/bin/x64 -lRlapack “C:/Program Files/R/R-2.14.1/library/RInside/lib/x64/libRInside.a” C:/Program Files/R/R-2.14.1/library/Rcpp/lib/x64/libRcpp.a -o rinside_sample8
/bin/sh: x86_64-w64-mingw32-g++: command not found
make: *** [rinside_sample8] Error 127
<builtin>: recipe for target `rinside_sample8′ failed
BUILD FAILED (exit value 2, total time: 4s)
all : $(programs)

clean:
rm -vf $(programs)

checkR:
echo “R is at $(R_HOME)”

 

Posted in R

Research paper in R: Here is why GotoBLAS2 may be the fastest C multi threading library over ATLAS, MKL, GPU, FPGA, and others

Research paper in R: Here is why GotoBLAS2 may be the fastest C multi threading library over ATLAS, MKL, GPU, FPGA, and others.

 

I was just referred to this which shows GotoBLAS2 could be the fastest C multi threading library out there.

http://www.tacc.utexas.edu/tacc-projects/gotoblas2

 

These claims come from a vignette where there is an R package around these:

 

http://cran.r-project.org/web/packages/gcbd/index.html

 

I just extracted out of this from this research paper:

http://cran.r-project.org/web/packages/gcbd/vignettes/gcbd.pdf

 

.

Between the multithreaded

BLAS implementations, Goto is seen to have a slight advantage over MKL

and Atlas. GPU computing is showing promise but requires relatively large matrices to

outperform multi-threaded BLAS.

A second key aspect is the di_erence between static and shared linking. In static linking,

object code is taken from the underlying library and copied into the resulting executable.

This has several key implications. First, the executable becomes larger due to the copy of

the binary code. Second, it makes it marginally faster as the library code is present and no

additional look-up and subsequent redirection has to be performed…. Shared library builds, on the other

hand, result in smaller binaries that may run marginally slower|but which can make use of

di_erent libraries without a rebuild.

Shared library builds, on the other

hand, result in smaller binaries that may run marginally slower|but which can make use of

di_erent libraries without a rebuild.

Posted in R and tagged , , , , , , , , , ,

How to install R with RCpp RInside for C++ HFT with multithreading capabilities for parallelizing with Open MPI in Ubuntu Linux

How to install R with RCpp RInside for  C++ HFT with multithreading capabilities for parallelizing with Open MPI in Ubuntu Linux

To get RCpp and RInside running in your Ubuntu Linux environment

Install RStudio to manage the installation of your R packages which is the lazy person’s way of doing it.  Also, ensure you have the latest R version by doing:

http://quantlabs.net/r-blog/2012/10/how-to-upgrade-to-the-latest-r-package-in-your-ubuntu-linux-environment/

In RStudio, install RCpp and RInside. Download the latest version of RInside for C++ from (under Download section)

http://dirk.eddelbuettel.com/code/rinside.html

Once the tarball is expanded in your Linux environment, navigate to the examples standard to make all the examples. Again, you will need the RCpp and RInside R packages available for the build process. Other R packages may be needed as your run the many examples.

To run the RInside examples with the OPen MPI for parallelizing examples, install Open MPI following apt-get instructions at:

http://cs.ucsb.edu/~hnielsen/cs140/openmpi-install.html

The navigate to the RInside example mpi and do a make. Run the samples and watch your jaw drop on the potential of R and C++ for HFT in a multithreaded environment.

 

 

 

Posted in R and tagged , , , , , , , , , , , ,