sparc64 is reporting 128 as a total, but only 32 is online. So use only
online cpus for tests parallel runs.
$ nproc
32
$ nproc --all
128
$ lscpu
Architecture: sparc64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Big Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 8
Core(s) per socket: 4
Socket(s): 1
Model name: UltraSparc T5 (Niagara5)
Flags: sun4v
Signed-off-by: Anatoly Pugachev <matorola@gmail.com>
local num
# coreutils
- if num=$(nproc --all 2>/dev/null); then
+ if num=$(nproc 2>/dev/null); then
:
# BSD, OSX
elif num=$(sysctl -n hw.ncpu 2>/dev/null); then