From atp at piskorski.com  Tue Nov  8 22:59:19 2005
From: atp at piskorski.com (Andrew Piskorski)
Date: Tue, 8 Nov 2005 16:59:19 -0500
Subject: [Rd] R thread safe
In-Reply-To: <1131389848.436fa39855a52@webmail.unibas.ch>
References: <1131389848.436fa39855a52@webmail.unibas.ch>
Message-ID: <20051108215919.GA65494@tehun.pair.com>

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:

  http://cran.us.r-project.org/src/contrib/Descriptions/Rmpi.html
  http://cran.us.r-project.org/src/contrib/Descriptions/rpvm.html
  http://cran.us.r-project.org/src/contrib/Descriptions/papply.html
  http://cran.us.r-project.org/src/contrib/Descriptions/snow.html
  http://www.aspect-sdm.org/Parallel-R/
  http://cran.us.r-project.org/src/contrib/Descriptions/RScaLAPACK.html
  http://cran.us.r-project.org/src/contrib/Descriptions/taskPR.html
  http://cran.us.r-project.org/src/contrib/Descriptions/biopara.html
  http://www.omegahat.org/download/R/packages/CORBA.tar.gz

-- 
Andrew Piskorski <atp at piskorski.com>
http://www.piskorski.com/



[Rd] R thread safe
Andrew Piskorski