#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).