[R] mclapply hanging occasionally on macos
Ivo Welch
|vo@we|ch @end|ng |rom gm@||@com
Tue Dec 31 04:16:11 CET 2024
sequoia, 15.2. R --vanilla : 4.4.2 (2024-10-31). I have the same
basic setup on three macs: a macbook air, a mac pro m1, and a mac mini
m4. The following code is running into a bug on the mac pro m1 and
the mac mini, but works just fine on my macbook air. (of course, it
doesn't do anything useful.) it's replicable!
```
$ R --vanilla
> source("debug.R")
```
and (after putting a single word into debug.csv in order to avoid the
empty file error),
```
library(parallel)
ignore.dataset <- read.csv("debug.csv"); rm(ignore.dataset)
useless.function <- function( ) {
y <- rnorm(3); x <- rnorm(3)
summary( lm( y ~ x )) ## useless
NULL
}
run30 <- function(i) {
message("run30=", i)
useless.function()
}
run30( 0 )
message("many mc")
simsl <- mclapply( 1:30, run30 )
```
this replicably does not count to 30 on both desktops, but does on the air.
not fun...can someone else try this program on a macos recent desktop,
and let me know whether I am alone here?
/iaw
More information about the R-help
mailing list