[R-SIG-Mac] Multicore and as.POSIXct on MacOS Lion

Simon Urbanek simon.urbanek at r-project.org
Thu Aug 11 16:26:23 CEST 2011


On Aug 9, 2011, at 12:34 PM, Sebastian Schmidt wrote:

> Multicore and/or as.POSIXct seems to have problems with MacOS Lion.
> 
> The following program (from the pvec help) runs fine:
> 
> dates <- sprintf('%04d-%02d-%02d', as.integer(2000+rnorm(1e5)),
>                  as.integer(runif(1e5,1,12)), as.integer(runif(1e5,1,28)))
> 
> 
> system.time(a <- as.POSIXct(dates))
> 
> but
> 
> system.time(b <- pvec(dates, as.POSIXct))
> 
> blocks all cpu cores and does not terminate on both my Apple machines. I
> tested that on MacOS Lion with multicore 1.5 and 1.6 under R 2.13.1 and R
> 2.12.2. On snow leopard everything ran smooth.
> 
> Is this a problem with R libraries or with the OS? Are there any known
> workarounds?
> 

I had a report from someone (ah, Sebastian, now I see it was you :)) that there are certain system calls that block on Lion - and I think they were date/time related. It seems to be a bug in Lion. I did have time to have a closer look yet (mainly because I avoid Lion until it gets more stable so I can use it on my regular machines), but I doubt there is much we can do - more likely Apple needs to fix it.

Cheers,
Simon



More information about the R-SIG-Mac mailing list