Skip to content

Information on the number of CPU's

7 messages · Brian Ripley, Markus Schmidberger, tolga.i.uzuner at jpmorgan.com +1 more

#
On Tue, 9 Sep 2008, tolga.i.uzuner at jpmorgan.com wrote:

            
Correct, since

a) R does not make use of more than 1.

b) It is really not portable, and not even well-defined.  (How many CPUs 
has a hyperthreaded dual Xeon?  Some say 2, some say 4.  Do you want 
CPUs or cores?  If this is a virtualized OS, is the physical number or the 
logical number?)

In the case of Windows, how depends on the Windows version.  The w32api 
(XP or later) call GetNativeSystemInfo will tell you the number of CPUs, 
for some (unstated) definition of 'CPU'.  Later versions have 
GetLogicalProcessorInformation, which can give the number of cores.

  
    
#
Hi Tolga,

I am not sure why ls() is showing only "args" and "fun".

But x is at the nodes. Try this:

clusterEvalQ(cl,x<-x+3)
[[1]]
[1] 4

[[2]]
[1] 4

clusterCall(cl,function()x+5)
[[1]]
[1] 9

[[2]]
[1] 9

Best
Markus



tolga.i.uzuner at jpmorgan.com schrieb:

  
    
#
ls() looks in its calling environment, which in this case would be the
internals of the snow mechnism.  If you want ls of the global
environment use one of

     clusterEvalQ(cl, ls())
     clusterCall(cl, ls, .GlobalEnv)

luke
On Wed, 10 Sep 2008, tolga.i.uzuner at jpmorgan.com wrote: