[Rd] Re: [R] Running Parallel Jobs in R

Luke Tierney luke@stat.uiowa.edu
Wed, 20 Nov 2002 09:25:24 -0600 (CST)

On Tue, 19 Nov 2002, Mohamed A. Kerasha wrote:

> Dear All,
> I am completely  new to R, and I was wondering if there is any way you can run concurrent jobs in R.

Depends on what you mean.  Your subject line says "parallel", here you
say "concurrent".  Those are different.  Processes on a time sharing
single processor run concurrently; on a multiprocessor machine some of
them may run in parallel.

There are tools available for using R for parallel programming on a
cluster of workstations.  The rpvm and Rmpi packages available from
CRAN provide powerful low level facilities for this.  The package snow
available at www.stat.uiowa.edu/~luke/R/cluster/ provides a simpler,
higher level interface that is useful for many "embarassingly
parallel" applications.  snow runs on top of sockets, or rpvm, or
Rmpi.  snow is still udergoing changes in its basic design but should
stabilize and get submitted to CRAN within a month or so.

R does not currently allow multiple threads within a single R process.
It may eventually allow concurrent threads; it is unlikely that it
will ever allow parallel threads (for lots of reasons it will probably
always be necessary to make sure that at most one R thread is running
in the R internals at any given time).


Luke Tierney
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
   Actuarial Science
241 Schaeffer Hall                  email:      luke@stat.uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu