[R-sig-hpc] Querying the numbers of CPUs on a Windows box

Simon Urbanek simon.urbanek at r-project.org
Fri Nov 2 16:05:11 CET 2012


On Nov 2, 2012, at 10:36 AM, Jonathan Greenberg wrote:

> r-sig-hpc'ers:
> 
> Is there any way to query the number of CPUs on a single-node Windows box?

parallel::detectCores()

Cheers,
Simon


> I'm trying to write some code using snowfall and it defaults to 1 CPU even
> with sfInit(parallel=TRUE).  Of course I can manually set the number of
> cpus to use but I'd like to have a way to dynamically query the system and
> determine the available number of cpus/cores.  Thanks!
> 
> --j
> 
> -- 
> Jonathan A. Greenberg, PhD
> Assistant Professor
> Department of Geography and Geographic Information Science
> University of Illinois at Urbana-Champaign
> 607 South Mathews Avenue, MC 150
> Urbana, IL 61801
> Phone: 217-300-1924
> AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307, Skype: jgrn3007
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
> 
>



More information about the R-sig-hpc mailing list