Tim Triche, Jr.
2011-Oct-06 20:14 UTC
[Rd] parallel::mclapply() dummy function on Windows?
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 really see where it would cause problems, but then I don't develop R, myself. Thanks for any thoughts on the matter. -- If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is. John von Neumann<http://www-groups.dcs.st-and.ac.uk/~history/Biographies/Von_Neumann.html> [[alternative HTML version deleted]]
Prof Brian Ripley
2011-Oct-07 06:25 UTC
[Rd] parallel::mclapply() dummy function on Windows?
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'tWhy 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
Seemingly Similar Threads
- hanging spaces prior to linebreak from cat()
- R cmd check and multicore foreach loop
- Memory limitations for parallel::mclapply
- possible bug in function 'mclapply' of package parallel
- parallel::mclapply does not return try-error objects with mc.preschedule=TRUE