I\'m posting this question to ask for advice on how to optimize the use of multiple processors from R on a Windows XP machine.
At the moment I\'m creating 4 scripts (eac
You could try doSMP
from REvolution Computing.
For more information, see this blog posting:
Parallel Multicore Processing with R (on Windows)
For completeness, here is the requested answer to Tal's comment which provides a simple and portable alternative. The answer consists of running
> library(snow)
> help(makeCluster)
and running the first three lines of code from the top of the Examples: section:
> cl <- makeCluster(c("localhost","localhost"), type = "SOCK")
> clusterApply(cl, 1:2, get("+"), 3)
[[1]]
[1] 4
[[2]]
[1] 5
> stopCluster(cl)
> .Platform$OS.type
[1] "windows"
>
Was that really that hard?
Add-on packages like doSNOW and thereafter foreach can make use of this in a portable way.
Try the doSNOW
parallel backend- it is supported out of the box on Windows. Use it with a snow socket cluster.