doRSR and foreach - numCoresToUse has no effect

numCoresToUse (and rxOptions, in general) is related only to setting up distributed computing for RevoScaleR functions. foreach and doParallel do not use it. To run your script in parallel mode, you will need to first register a parallel backend for your foreach command.  Instead of setting numCoresToUse, use
library(doParallel} registerDoParallel(cores=6)
getDoParWorkers() should return 6 at this point. This sets up a "compute cluster" across each core, each of which can run an R process and communicate over sockets with the others. 

Some additional resources on using foreach and doParallel that will explain more options on running in parallel:

http://cran.r-project.org/web/packages/foreach/vignettes/foreach.pdf 
http://cran.r-project.org/web/packages/doParallel/vignettes/gettingstartedParallel.pdf
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.
Properties

Article ID: 3103818 - Last Review: 11/01/2015 14:12:00 - Revision: 1.0

Revolution Analytics

  • KB3103818
Feedback