R processes do not stop after R is shut down -
i using parallel. if code interrupted (e.g. bug, or shutdown of r console) before stopcluster(cl) code runs, r processes maintain on running! using new macbook pro. in activity monitor, can see 8 r processes running, after have shut downwards r console. way can seem stop them restart computer. can forcefulness quit each 1 individually activity monitor. there improve solution?
cl <- makecluster(getoption('cl.cores', detectcores())) clusterevalq(cl, library(data.table)) clusterevalq(cl, require(zoo)) ... stopcluster(cl)
you can utilize mckill
low level function in parallel
bundle :
sends signal kid process: equivalent pskill in bundle tools.
example:
p <- mcparallel(scan(n = 1, quiet = true)) parallel:::mckill(p) [1] true parallel:::mckill(p) ## check process killed error in fun(3202l[[1l]], ...) : 'mckill' failed
r
No comments:
Post a Comment