Re: [Rd] nested parallel workers

2015-03-30 Thread Valerie Obenchain
On 03/30/2015 02:51 PM, Simon Urbanek wrote: On Mar 30, 2015, at 4:40 PM, Valerie Obenchain wrote: On 03/25/2015 07:48 PM, Simon Urbanek wrote: On Mar 25, 2015, at 3:46 PM, Valerie Obenchain wrote: Hi Simon, I'm having trouble with nested parallel workers, specifically, forking i

Re: [Rd] nested parallel workers

2015-03-30 Thread Valerie Obenchain
On 03/25/2015 07:48 PM, Simon Urbanek wrote: On Mar 25, 2015, at 3:46 PM, Valerie Obenchain wrote: Hi Simon, I'm having trouble with nested parallel workers, specifically, forking inside socket connections. You simply can't by definition - when you fork *all* the workers shar

[Rd] nested parallel workers

2015-03-25 Thread Valerie Obenchain
Hi Simon, I'm having trouble with nested parallel workers, specifically, forking inside socket connections. When mclapply is called inside a SOCK, PSOCK or FORK worker I get an error in unserialize(). cl <- makeCluster(1, "SOCK") fun = function(i) { library(parallel) mclapply(1:2, sqrt) }

Re: [Rd] cache most-recent dispatch

2013-07-02 Thread Valerie Obenchain
ing key computations in a seriously faster language, like C++ via Rcpp. John On 7/1/13 10:04 PM, Valerie Obenchain wrote: Hi, S4 method dispatch can be very slow. Would it be reasonable to cache the most recent dispatch, anticipating the next invocation will be on the same type? This would

[Rd] cache most-recent dispatch

2013-07-01 Thread Valerie Obenchain
Hi, S4 method dispatch can be very slow. Would it be reasonable to cache the most recent dispatch, anticipating the next invocation will be on the same type? This would be very helpful in loops. fun0 <- function(x) sapply(x, paste, collapse="+") fun1 <- function(x) { paste <-