[Rd] Plans for multithreading?

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Aug 31 17:48:39 CEST 2007

On Fri, 31 Aug 2007, D. R. Evans wrote:

> I was surprised, given the vector-ish nature of R, to see that
> (according to my CPU meters) there doesn't seem to be any obvious
> multithreading in R.
> Are there any plans to change this?

Yes, and some multithreading is done with some external BLAS, which is 
probably where there is the most obvious scope for benefit.

The problem is that unless the vectors are long the costs of using 
multiple threads can exceed the gain in using multiple CPUs: we have seen 
dramatic slowdowns using reputable multithreaded BLAS.

Other parts of R are under active consideration for using multiple 
threads: for example now Open MP is fairly widely available (in gcc >= 
4.2.0 and some earlier RedHat backports) this may be easier to do in a 
portable way.

I think you probably did not mean the ability to run multiple R 
interpreters in separate threads -- that has been discussed for many years 
(e.g. at DSC 2001).

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-devel mailing list