[R] multiple cores/building fails

Uwe Ligges ligges at statistik.tu-dortmund.de
Thu Sep 16 12:22:05 CEST 2010



On 15.09.2010 17:40, Gregory Ryslik wrote:
> Hi,
>
> That seems to be the case. Is there a way that I can put an object in some global place where all the workers can access it?
>
> Doing the following at the start (before I make multiple workers) does not work:
> Assign('global.control', control, globalenv())


Well, you need to go via the NetWorkSpaces if using the Ffaemwork, I 
believe, hence use nwsDeclare().

I never used nws myself, hence just a guess. But all these parallelizing 
framworks work more or less the way that you need to make objects 
available to clients since it would be ineffeicent to transfer the whole 
(maybe huge) workspace of the master to each client.

Best,
Uwe Ligges





> Thanks for your help!
>
> Kind regards,
> Greg
>
> Sent via BlackBerry by AT&T
>
> -----Original Message-----
> From: Uwe Ligges<ligges at statistik.tu-dortmund.de>
> Date: Wed, 15 Sep 2010 10:56:54
> To: Gregory Ryslik<rsaber at comcast.net>
> Cc:<r-help at stat.math.ethz.ch>
> Subject: Re: [R] multiple cores/building fails
>
>
>
> On 14.09.2010 21:50, Gregory Ryslik wrote:
>> Hi Everyone,
>>
>> I have written debugged and tested my code and it works (yay!). I recently tried to parallelize it (1 core/per tree) and when I run the code I get an error saying the object "control" was not found. I do have an object control in my code but it always works fine as long as I am not running it on multiple cores (which I am doing via the help of sleigh and the 'nws' package).
>>
>> Think that this could be an error in my "source" statements, I tried to build my package (with the hope of replace source with library()) and I get the following (where XXX is my package name that I've removed for privacy reasons):
>>
>> * creating vignettes ... ERROR
>>
>> Error: processing vignette 'XXXX.Rnw' failed with diagnostics:
>>    chunk 4
>> Error : object "control" not found
>>
>> Again it gives me that this "control" object is not found.
>>
>> Does anyone have an idea how I can isolate what's going on. It's slightly tough to do because it all works fine in the single processor case!
>
>
> Perhaps you forgot to populate the object to the client nodes?
> Hard to say without any reproducible example code.
>
> Uwe Ligges
>
>
>> Thanks!
>>
>> Kind regards,
>> Greg
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list