[Rd] parallel::mclapply() dummy function on Windows?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Oct 7 08:25:18 CEST 2011
On Thu, 6 Oct 2011, Tim Triche, Jr. wrote:
> Hi all,
>
> Would it be possible to have the new 'parallel' library export a dummy
> function, something akin to
>
> if(Windows) mclapply <- lapply
>
> to paper over the lack of fork() support on said platform? This may not be
> the world's greatest idea, but it would make it easier for me to maintain my
> package and still offer most users good parallel support. Plus, I can't
Why would it make it easier? And how could using a dummy for 'most
users' (who are on Windows) offer them 'good parallel support'?
> really see where it would cause problems, but then I don't develop R,
> myself.
Take a look at e.g. package 'boot' to see how to offer alternatives.
(A version that uses 'parallel' is pending on CRAN, or see
http://www.stats.ox.ac.uk/pub/R/boot_1.3-3.tar.gz .) Package
'parallel' may in future offer a higher-level abstraction layer that
makes offers such a choice, but as the 'boot' code shows, deciding
what to send to the workers in a snow-style cluster is not simple.
Note that it is not just Windows that lacks fork support: some
front-ends (notably Rstudio) do not work with forking at present. And
some parts of parallel (and multicore/snow) do not work reliably on
some OSes (e.g. Solaris).
> Thanks for any thoughts on the matter.
>
> [[alternative HTML version deleted]]
Please do follow the posting guide: no HTML and use the signature
block for your real name and credentials.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list