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.
library(doMC)
library(foreach)
registerDoMC(32)
foreach(i=1:32) %dopar% foo()
##kill command here?
I've tried following with registerDoSEQ() but it doesn't seem to kill off the processes.
parallel::stopCluster
might do it but I don't have any experience withdoMC
– BillingsleydoMC
help pages, I'd recommend using the other cluster packages instead. – Billingsley