[Rd] [R] multithreading calling from the rpy Python package

Luke Tierney luke at stat.uiowa.edu
Fri Oct 20 16:24:01 CEST 2006


There are several sets of notes on threading off
http://developer.r-project.org page--somewhat old but still relevant.
The Python approach is discussed there.  That approach, which gives
concurrency but not parallelism, is in principle fleasible for R but
getting from here to there is non-trivial given that we have some
unique issues related to FORTRAN semantics as well as how many R
packages are written.  It may happen yet, but probably later rather
than sooner.

Best,

luke

On Fri, 20 Oct 2006, René J.V. Bertin wrote:

> Since Python has been mentioned in this context: Could not Python's
> threading model and implementation serve as a guideline?
>
>> From a few simple benchmarks I've run, it seems as if the Python
> interpreter itself is thread-safe but not threadable. That is, when I
> run something "pure Python" like a recursive function that returns the
> nth Fibonacci number in parallel, there is no speed-up for 2 threads
> on a dual-processor machine. However, calling sleep in parallel does
> scale down with the number of threads, even on a single-processor ;)
>
> Real-life code does tend to speed up somewhat, though never as much as
> one would hope.
>
> Just an idea...
>
> René
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:      luke at stat.uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu


More information about the R-devel mailing list