scott.raynaud at yahoo.com
Thu Dec 8 18:52:55 CET 2011
I want to take advantage of my multicore CPU to speed up a loop in a simulation program. I didn’t write the code,
but the iterations appear independent to me, at least in the sense that the results of one loop do not depend on
previous ones. Right now I’m relegated to a Windows box that runs Windows 7. These appear to be the options:
Pnmath-appears to parallelize non-BLAS routine but requires a special build
Romp-looks like this hasn’t advanced past the developmental stage
Multicore-use on Windows at your own risk
R/parallel-seems like the best option if I don’t want to recompile.
Has anyone ever used R/parallel? What kind of results did you have? One difficulty with my simulation is that the
loop includes code to generate random numbers. If this loop is split into different threads, then I suspect the
randomness of the numbers is not assured. What can I do about that?
I can provide the loop code, but it’s fairly long, say 75-100 lines.
If R/parallel is not feasible then a recompile with BLAS and pnmath appears to be the next best option.
More information about the R-help