[ET Trac] [Einstein Toolkit] #2059: SimFactory should detect the number of cores automatically

Einstein Toolkit trac-noreply at einsteintoolkit.org
Mon Jan 29 17:13:19 CST 2018


#2059: SimFactory should detect the number of cores automatically
--------------------------+-------------------------------------------------
  Reporter:  hinder       |       Owner:                     
      Type:  enhancement  |      Status:  reopened           
  Priority:  minor        |   Milestone:                     
 Component:  SimFactory   |     Version:  development version
Resolution:               |    Keywords:                     
--------------------------+-------------------------------------------------

Comment (by rhaas):

 {{{lscpu}}} does not seem to exist on OSX so the number of threads is
 detected incorrectly.
 Thus on OSX the auto-generated machine.ini file always claims {{{ppn=1}}}
 instead one seems to be able to query sysctl (see
 https://coolaj86.com/articles/get-a-count-of-cpu-cores-on-linux-and-os-x/)
 {{{
 sysctl -n hw.ncpu
 8

 sysctl -n hw.physicalcpu
 4

 sysctl -n hw.logicalcpu
 8
 }}}
 or just {{{sysctl hw}}} and something like {{{sysctl hw.packages}}} for
 the number of sockets.

 Note that the current implementation is buggy since it uses lscpu's
 "Core(s) per socket" value for ppn which is the number of cores per node
 (so is wrong on a dual socket workstation).

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/2059#comment:27>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list