Use 'nproc' command instead of /proc/cpuinfo (doesn't work on armv5tel) to determine # of cores (lscpu can be another option)

This commit is contained in:
Tom Reynolds
2013-05-15 04:00:36 +00:00
parent c10bb9f10e
commit a6e6ab8f53
6 changed files with 8 additions and 9 deletions

View File

@@ -119,8 +119,7 @@ CXX=/usr/bin/g++
OSTYPE=`uname -s`
if [ "$OSTYPE" = "Linux" ]; then
NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
let NCPU=$NCPU+1
NCPU=`nproc`
elif [ "$OSTYPE" = "Darwin" ]; then
NCPU=`sysctl -n hw.ncpu`
elif [ "$OSTYPE" = "SunOS" ]; then