Feb 24, 2016

Microsoft R Open 3.2.3 on Debian Jessie

After its acquisition through Microsoft, it was not quite clear what would happen to Revolution Analytic's improved version of R. Right now it seems that it remains open source and continues to have linux support. Considering that they started to actively support docker and made the very good Visual Studio Code available for Linux, it is evident that Microsoft's general policy these days seems to embrace open source a lot more than in the past. After reading about the tremendous performance improvements that Microsoft R Open achieves through Intel's MKL library, I was curious to give Microsoft R Open a try. I quickly realized that there is unfortunately no official support for Debian at the moment. However, Ubuntu as a not too distant relative is supported through a deb package. When trying to install the deb package for Ubuntu 15 on Debian Jessie, I ran into a dependency problem with the libjpeg8 library. After some googling I found that libjpeg8 was excluded from Debian Jessie in favor of libjpeg62-turbo. This inspired me to just force an installation and to make Microsoft R Open recognize libjpeg62 as libjpeg8 through a symbolic link. However, this didn't work such that I was forced to install libjpeg8 from the debian stretch repository as was suggested here

You can test if everything works as expected by using capabilities(). In the following screenshot I show the error message I got and how it disappeared after installing libjpeg8.



For me this worked and I enjoy faster matrix operations etc. hoping that Microsoft will not abandon support in the future.

Apr 20, 2012

Let FastRWeb communicate via TCP/IP instead of unix sockets

Unix sockets are efficient and nice and everything, but if you want to use your Rserve installation in the most flexible way (e.g. connect through KNIME or Windows in general) you'll probably prefer a TCP/IP connection. It is easy enough to set Rserve up to use TCP/IP, but before you can start with FastRWeb you need to convince the CGI client to use the right protocol. In order to do this just find the folder where R has put FastRWeb (in R just type: system.file("cgi-bin", package="FastRWeb") ) and then find the source files for the client in a subfolder called Rcgi. There is a file Rcgi.cc you need to edit. Read the comments where Simon Urbanek explains how to set RSERVE_HOST and RSERVE_PORT, compile with the make command, copy the new client Rcgi to your CGI-BIN folder and you're good to go!

FastRWeb on CentOS

The last two days I was trying to get FastRWeb to work on my CentOS 6 installation. I tried virtually everything and learned a lot about how FastRWeb is structured and how Rserve is configured in the process.

James Emerson gives a perfect example of how to install FastRWeb on Ubuntu in his Blog. Follow this and you can set up FastRWeb on any linux distribution in no time (assuming you know your apache paths). On my CentOS installation I keep running into connection errors from both CGI and PHP client. After trial and error I could at least establish a TCP/IP connection: The problem is that in SElinux default settings (which seem stricter on CentOS) a network connection from a CGI script is NOT allowed. You can change this setting with just one command:

A unix socket connection however does not work for me. I'll keep trying.