Sunday 15 March 2015

r - Problems using random forests with foreach and doMC in Yosemite OSX -



r - Problems using random forests with foreach and doMC in Yosemite OSX -

since updating yosemite osx on late-2012 mac mini scripts utilize foreach , domc parallel computation have been throwing next error:

the process has forked , cannot utilize corefoundation functionality safely. must exec(). break on __the_process_has_forked_and_you_cannot_use_this_corefoundation_functionality___you_must_exec__() debug.

the computations finish, in add-on error output in console i'm left 8 open zombie nodes. when executing multiple parallel scripts results in scheme getting flooded these zombie nodes, fire cpu , ram in background, rapidly gumming whole process:

since problem system-dependent i'm not sure if can provide minimum illustration fail on machine, next script reproduces error on mine.

install.packages(c('foreach', 'domc', 'bigrf')) library(bigrf) data(cars93, package="mass") x <- cars93 y <- cars93$type vars <- c(4:22) forest <- bigrfc(x, y, ntree=30l, varselect=vars, cachepath=null)

any other yosemite users out there experiencing this? have clue might going on here? absolutely need prepare this, , prefer not have wiping out hard drive , reinstalling osx mavericks.

cheers,

aaron

answered @steveweston, above:

the simple way around run script file using r cmd batch script.r or rscript script.r in terminal window. e.g., save next illustration test_case.r

library(bigrf) library(domc) data(cars93, package="mass") registerdomc(detectcores()) x <- cars93 y <- cars93$type vars <- c(4:22) forest <- bigrfc(x, y, ntree=30l, varselect=vars, cachepath=null) preds <- predict(forest, x) print(preds)

run file wherever you've saved on computer changing drive , running rscript test_case.r. flawless execution, no zombie nodes. wonder why problem comes in gui?

thank you, steve!

cheers,

aaron

r foreach parallel-processing osx-yosemite domc

No comments:

Post a Comment