Chapter 4. parallel
A new parallel programming package named parallel will be included in R 2.14.0, tentatively
scheduled for release on October 31, 2011. It is derived from the snow and multicore packages, providing many of the same
functions as those packages. Some of the functions derived from multicore have been renamed by adding the prefix
“mc.”, and some of the arguments to mclapply() have been changed a bit, but if you
have read the snow and multicore chapters of this book, you will have
very little difficulty learning to use parallel.
This is an exciting development, since it makes parallel computing in
R more mainstream. Hopefully the parallel
package will be used from other standard packages, giving many more users
the benefit of parallel computing, perhaps without knowing that they’re
using it.[39]
An important feature of parallel is
its integration with the new L’Ecuyer-CMRG random
number generator (RNG), also new in R 2.14.0. The seed of this generator can
be easily advanced a given number of steps, making it very useful as a
parallel RNG. This is accomplished using the same concepts used in the
rlecuyer package, but it is a completely
new implementation, so parallel has no
dependency on the rlecuyer package
itself.
In particular, the multicore
derived functions in parallel now have
true parallel RNG support, solving the biggest “gotcha” in the multicore package.
Warning
This chapter was written using an experimental version of the
parallel package using the development ...