multicore - Parallel processing in R on machines with multiple cores or CPUs
Package R docs
NEWS/ChangeLog for multicore
0.1-8 (under development)
o fix a bug introduced in 0.1-6 error checking for
o mclapply() will issue a warning if any of the results is of
the class "try-error". For prescheduled calls the warning will
include the index of the core(s) that failed - to facilitate
debugging of the user code.
o minor performance improvements were made by creating results
lists in C code and by resolving all native routines at load
o bugfix: errors in prescheduled mclapply could result in
incorrectly returned objects
o bugfix: parallel() treated raw vector results as the result of
serialized objects - thus arbitrary raw vectors were not alowed.
(Thanks to Jeroen Ooms for reporting)
o fix an issue in mclapply() and mc.prechedule = FALSE when NULL
results are involved (thanks to Ralf Tautenhahn for reporting)
o added (experimental) support for Windows
Note: it (sort of) works on Windows 2k and XP only. Vista and
Windows 7 is not supported due to changes to the kernel. Since
Vista it becomes increasingly unlikely that multicore will be
possible on Windows in general.
o added cores detection for FreeBSD (thanks to Gunnar Schaefer)
o added pvec() function which splits up the call of a vectorized
map function across cores and re-combines them. It is useful
for computation on large vectors.
o added mc.cleanup argument (by default TRUE) which terminates
child processes in the case of user interrupt (or error) in
the master process.
o children() allows to check the status of a subset of active
processes using the select argument.
o multicore now attempts to automatically disable event loop
processing on Mac OS X in forked children. For Quartz
Cocoa event loop this requires R 2.12.2 or higher.
This allows the use of multicore in R for Mac GUI.
o simplify the internal management of child processes and
consequently remove bugs that lead to poor feeding of cores
in mclapply() when no precheduling was used
o added mc.preschedule parameter to mclappy() which (if FALSE)
allows on-demand distribution of FUN calls across cores.
o added "silent" parmeter to parallel() and mclapply()
suppressing output on stdout in child processes
o added internal functions closeStdout(), closeStrerr(),
closeFD(), closeAll(), isChild(), childrenDescriptors() and
o selectChildren() implicitly checks for and removes zombies
o removed spurious debugging output in mclapply()
o fixed cases in which mclapply() would not preserve names
o fixed child list management
o in order to make sure that children cannot die before the
master can collect results, children will specifically wait
for the master to allow them to exit (SIGUSR1 is used for this
purpose, so don't use it directly unless you want a child to
exit even if the master didn't release it).
o added name parameter to parallel(), accordingly collect()
names the results if the job name is present
o bug fix: collect() returned early if no jobs responded for a
o bug fix: internal list of children could get corrupted when a
child was removed (all preceding children were removed as well)
o added better debugging support. Set PKG_CFLAGS=-DMC_DEBUG to
enable debugging output on stdout (it is purposefully not sent
to the R console to prevent output processing issues in child
o initial release