From atp at piskorski.com  Mon Sep  7 16:47:28 2009
From: atp at piskorski.com (Andrew Piskorski)
Date: Mon, 7 Sep 2009 10:47:28 -0400
Subject: [Rd] Running two R instances at the same time
In-Reply-To: <b2050ab90909051131i15b413bci18300426406cbcea@mail.gmail.com>
References: <b2050ab90909051131i15b413bci18300426406cbcea@mail.gmail.com>
Message-ID: <20090907144728.GA85931@piskorski.com>

On Sat, Sep 05, 2009 at 08:31:18PM +0200, Peter Juhasz wrote:

> I don't understand how is this possible. Maybe there is an issue of
> thread-safety with the R backend, meaning that the two R *interpreter*
> instances are talking to the same backend that's capable of processing
> only one thing at a time?

No.  Particularly since there is no R "backend" involved at all, not
if you're starting up the standard R from Ubuntu 9.04 (rather than
Rserve or something else unusual).  People run multiple R processes
concurrently on the same (multi-core) machine all the time, works
fine.

> Please see http://www.perlmonks.org/?node_id=792460 for an extended
> discussion of the problem, and especially
> http://www.perlmonks.org/?node_id=793506 for excerpts of output and
> actual code.

The most likely explanation seems to be that you have a bug in your
Perl code.  Have you tried using your Perl framework to fork something
OTHER than R?  Have you tried manually starting up two R processes and
running your R code that way?  And, what is the actual R code you're
running?  You don't seem to have shown it anywhere.

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



[Rd] Running two R instances at the same time
Andrew Piskorski