Re: [R] Opening more than 1 R console in Windows

2008-05-19 Thread Prof Brian Ripley

On Sun, 18 May 2008, Anh Tran wrote:


Hi all,

I recently found out that R does not utilize fully the Duo Core capability
when you only run one instance of R.


How surprising was that?  Do you have any programs that do?  Very few 
Windows programs make effective use of multiple CPUs, and of those that 
do, they do not do so for the sort of tasks R is running routinely.



I did some number crunching today and it seems that if I only open 1 R
console, it uses 50% of my CPU (either 50-50 or 100-0 on 2 cores).

Then, I open the second instance and divide the work into two parts, and run
them parallelly, they seems to utilize 100% of my CPU.

So, my question would be that: is the computing result the same if I do them
this way? Will there any mistake compared to running only one instance at a
time?


Running multiple instances of R simultaneously is very common practice. 
(Right now I have 14 instances running on an 8-core machine.)  The only 
thing you need to watch is that you don't save the workspaces in the same 
place.  So wither run them from different directories or (probably better) 
don't save the workspace.




Thank you all.

--
Regards,
Anh Tran

[[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.



--
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
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.


Re: [R] Opening more than 1 R console in Windows

2008-05-19 Thread Charles Plessy
Le Mon, May 19, 2008 at 07:39:11AM +0100, Prof Brian Ripley a écrit :
 On Sun, 18 May 2008, Anh Tran wrote:
 
 I recently found out that R does not utilize fully the Duo Core capability
 when you only run one instance of R.
 
 How surprising was that?  Do you have any programs that do?  Very few 
 Windows programs make effective use of multiple CPUs, and of those that 
 do, they do not do so for the sort of tasks R is running routinely.

Hello,

actually, when I was (wrongly) plotting a 1,500,000 × 8 data frame and
had problems because the plot window was redrawn very frequently, I
wondered whether this would be one task that could be given to a separate
CPU than the one that deals with the command line interface of R. Do you
think that it would be possible?

Best regards,

-- 
Charles Plessy
Wakō, Saitama, Japan

__
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.


Re: [R] Opening more than 1 R console in Windows

2008-05-19 Thread Prof Brian Ripley

On Mon, 19 May 2008, Charles Plessy wrote:


Le Mon, May 19, 2008 at 07:39:11AM +0100, Prof Brian Ripley a écrit :

On Sun, 18 May 2008, Anh Tran wrote:


I recently found out that R does not utilize fully the Duo Core capability
when you only run one instance of R.


How surprising was that?  Do you have any programs that do?  Very few
Windows programs make effective use of multiple CPUs, and of those that
do, they do not do so for the sort of tasks R is running routinely.


Hello,

actually, when I was (wrongly) plotting a 1,500,000 × 8 data frame and
had problems because the plot window was redrawn very frequently, I
wondered whether this would be one task that could be given to a separate
CPU than the one that deals with the command line interface of R. Do you
think that it would be possible?


Not at present.  There are other reasons to want to do graphics 
interaction in a separate thread, but there are complex synchronization 
issues.  (Suppose you start plotting on a device that is currently 
repainting?)  We are moving in that direction, slowly.




Best regards,

--
Charles Plessy
Wakō, Saitama, Japan

__
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.



--
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595__
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.


[R] Opening more than 1 R console in Windows

2008-05-18 Thread Anh Tran
Hi all,

I recently found out that R does not utilize fully the Duo Core capability
when you only run one instance of R.
I did some number crunching today and it seems that if I only open 1 R
console, it uses 50% of my CPU (either 50-50 or 100-0 on 2 cores).

Then, I open the second instance and divide the work into two parts, and run
them parallelly, they seems to utilize 100% of my CPU.

So, my question would be that: is the computing result the same if I do them
this way? Will there any mistake compared to running only one instance at a
time?

Thank you all.

-- 
Regards,
Anh Tran

[[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.