The documentation for doMC seems very sparse, listing only doMC-package and registerDoMC(). The problem I'm encountering is I'll spawn several workers via doMC/foreach, but then when the job is done they just sit there taking up memory. I can go and hunt their process IDs, but I often kill the master process by accident.
foreach(i=1:32) %dopar% foo()
##kill command here?
I never did find a suitable solution for doMC, so for a while I've been doing the following:
library(doParallel) cl <- makePSOCKcluster(4) # number of cores to use registerDoParallel(cl) ## computation stopCluster(cl)
Works every time.