[Rd] R thread safe

Andrew Piskorski atp at piskorski.com
Tue Nov 8 22:59:19 CET 2005

On Mon, Nov 07, 2005 at 07:57:28PM +0100, Olaf.Schenk at unibas.ch wrote:

> I would like to accelerate my R computation by using parallel OpenMP
> compilers (e.g from Pathscale) on a 2-processor AMD server and I
> would like to know whether R is a tread safe library. The main

R is not thread safe, but others will have to tell you just how and
why not and what needs to be done to fix that (I don't know).

Does OpenMP require thread support, or can it alternately use multiple
processes plus System V shared memory?  Perhaps the latter would still
be an option even in R's currently non-thread-safe state.

Your approach is interesting.  Why do you want to do shared memory
parallel programming with OpenMP, rather than say message passing via
MPI or PVM?  Do you have a particularly fine-grained problem for which
message passing would be unsuitable?  Or are you just hoping to
automatically take advantage of both CPUs of your dual CPU workstation
without having to write any extra message passing code?

I haven't heard of anyone else doing shared memory programming with R.
But if instead you are interested in message passing, there are lots
of different tools and projects in R for that:


Andrew Piskorski <atp at piskorski.com>

More information about the R-devel mailing list