Hi, A previous thread suggests that R on Windows is multi-threaded http://tolstoy.newcastle.edu.au/R/help/03b/6946.html When I'm running R 2.5.1 on a dual core pc I get Rgui.exe uses up to 50% of the available cpu and the rest is not used. i.e. it only uses one cpu. I'm soon going to get a nice shiny new 8 cpu machine which it would be very nice to fully utilize. Is there any way to get R to use all the cpus - should this happen automatically? Many thanks, Regards, David [[alternative HTML version deleted]]
Rees, David wrote:> Hi, > > A previous thread suggests that R on Windows is multi-threaded > > http://tolstoy.newcastle.edu.au/R/help/03b/6946.html > > When I'm running R 2.5.1 on a dual core pc I get Rgui.exe uses up to 50% > of the available cpu and the rest is not used. i.e. it only uses one > cpu. I'm soon going to get a nice shiny new 8 cpu machine which it would > be very nice to fully utilize. > > Is there any way to get R to use all the cpus - should this happen > automatically?Multi-threaded does not mean that computations are performed in parallel automatically. There are some packages around that help you to parallelize your code (e.g. the meta package "snow" that needs some additional low-level package for the architecture you are going to use for making your computations parallel). I'd use all of those packages under Linux or similar OS rather than Windows. Uwe Ligges> Many thanks, > > Regards, > David > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
On 1/11/2008 9:28 AM, Rees, David wrote:> Hi, > > A previous thread suggests that R on Windows is multi-threaded > > http://tolstoy.newcastle.edu.au/R/help/03b/6946.htmlRgui is normally single threaded. Rterm runs two threads in order to keep graphics windows updated. Most computation happens in just one thread.> > When I'm running R 2.5.1 on a dual core pc I get Rgui.exe uses up to 50% > of the available cpu and the rest is not used. i.e. it only uses one > cpu. I'm soon going to get a nice shiny new 8 cpu machine which it would > be very nice to fully utilize. > > Is there any way to get R to use all the cpus - should this happen > automatically?Not currently, other than by running multiple instances of R. There are packages available to help multiple instances communicate. There's also an experimental package by Luke Tierney in the works that parallelizes computations in one instance. See this message: http://tolstoy.newcastle.edu.au/R/e3/devel/07/11/0291.html Note his warning: "It is not too hard to get parallel versions to use all available processor cores. The challenge is to make sure that the parallel versions don't run slower than the serial versions." Duncan Murdoch
Someone else suggested the snow package, but I don't think it is available for windows. I have been able to get the nws package to work on a duel core machine using windows and it did speed up my tests (and was fairly straight forward to use). ________________________________ From: r-help-bounces@r-project.org on behalf of Rees, David Sent: Fri 1/11/2008 7:28 AM To: r-help@r-project.org Subject: [R] Is R on Windows multi-threaded Hi, A previous thread suggests that R on Windows is multi-threaded http://tolstoy.newcastle.edu.au/R/help/03b/6946.html When I'm running R 2.5.1 on a dual core pc I get Rgui.exe uses up to 50% of the available cpu and the rest is not used. i.e. it only uses one cpu. I'm soon going to get a nice shiny new 8 cpu machine which it would be very nice to fully utilize. Is there any way to get R to use all the cpus - should this happen automatically? Many thanks, Regards, David [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]