[R] parLapply within a function

Katja Hebestreit katja.hebestreit at uni-muenster.de
Thu Jan 12 18:14:12 CET 2012


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



More information about the R-help mailing list