Re: [Rd] SUGGESTION: Add get/setCores() to 'parallel' (and command line option --max-cores)

From: Norm Matloff <matloff_at_cs.ucdavis.edu>
Date: Sat, 15 Dec 2012 16:38:50 -0800


Henrik Bengtsson <hb_at_biostat.ucsf.edu> wrote:

^ In the 'parallel' package there is detectCores(), which tries its best
^ to infer the number of cores on the current machine. This is useful
^ if you wish to utilize the *maximum* number of cores on the machine.
^ Several are using this to set the number of cores when parallelizing,
^ sometimes also hardcoded within 3rd-party scripts/package code, but
^ there are several settings where you wish to use fewer, e.g. in a
^ compute cluster where you R session is given only a portion of the
^ cores available. Because of this, I'd like to propose to add
^ getCores(), which by default returns what detectCores() gives, but can

Even if one has the entire machine to oneself, there is often another very good reason not to use the maximum number of cores: Using the maximum number of cores may reduce performance. This is true in general, and sometimes especially true when the inferred number of cores includes hyperthreading.

Norm



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun 16 Dec 2012 - 00:47:41 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 16 Dec 2012 - 04:22:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive