by Guangming Lang
~1 min read

Categories

  • r

I recently encountered zombie processes when running some R code in parallel. I was running the code in linux and was using doMC to register the parallel backend. If you’re not familiar with doMC, read this stack overflow answer on the difference between doMC and doParallel. In a nutshell, doMC sometimes is more efficient than doParallel, and it only works with linux or Mac, not with windows, while doParallel works with all platforms.

It turns out the zombie processes weren’t caused by doMC.

Finally, use the inline package and the wait function by Steve Weston (scroll down) to kill zombie processes. I used them in my application and they work like a charm.