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

On Mon, Sep 07, 2009 at 05:36:38PM +0200, Peter Juhasz wrote:

> But please see http://www.perlmonks.org/index.pl?node_id=793907 ,
> where I posted my R code in its simplest form along with an example
> run which exhibits the symptoms I originally wrote about.

Ah, your two-process serialization is probably happening during that
cenros() call then.  (You may want to run with/without that call to
confirm.)  cenros() is in the NADA package and seems to use survreg()
from the survival package.  The survival package looks bigger than
NADA and includes a bunch of C code, so perhaps one of its C
implementations is using some sort of mutex-locked system call.  If
so, it'd be interesting to know where the serialization is happening.

  http://cran.r-project.org/web/packages/NADA/index.html
  http://cran.r-project.org/web/packages/survival/index.html

You may want to run your code under strace (perhaps with -cfF) and/or
ltrace, to get a list of C-level functions that are actually being
called.  That might give you an idea of where the blocking is
occurring, and could also help the NADA or survival package
maintainers when you ask them about this.

(But, hm, haven't any of your international collaborators run across
this serialization problem before?)

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



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