[R] parLapply within a function

Uwe Ligges ligges at statistik.tu-dortmund.de
Sun Jan 15 20:38:50 CET 2012


Katja,

since the information given in this message is not sufficient to be able 
to help (question whether you are forking or parallelization happens 
through, e.g., MPI or sockets) and no reproducible code is given yet (as 
the posting guide ask you to provide), let us discuss this off-list and 
get back to the list with an appropriate question and answer later.

Best,
Uwe


On 12.01.2012 18:14, Katja Hebestreit wrote:
> Dear R users,
>
> I have some problems with the parLapply function from the "parallel"
> package:
>
> I use parLapply on a pretty big R object without changing the object
> within the called function. If I execute parLapply alone, everything
> works fine. It seems that the object resides only once in the memory.
> But if I use the same call within another function, the object seems to
> be multiplied to the nodes. We conclude this from the longer run time
> and a significant higher memory usage.
>
> Any help is appreciated! :-)
> Cheers,
> Katja Hebestreit
>
>
>
> Some version information:
>> sessionInfo()
> R version 2.14.1 (2011-12-22)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
>   [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>   [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>   [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>   [7] LC_PAPER=C                 LC_NAME=C
>   [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] parallel  stats     graphics  grDevices utils     datasets
> methods
> [8] base
>
> ______________________________________________
> 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