Skip to content

Commit 126b4fe

Browse files
authored
Apply suggestion from @ktf
1 parent c965703 commit 126b4fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Utilities/Tools/jobutils2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ getNumberOfPhysicalCPUCores() {
398398
#
399399
# Notice the human readable output of lscpu depends on the version and wether or not you
400400
# are inside a container. The following should be more stable.
401-
CORESPERSOCKET=$(lscpu -p=cpu,socket | grep ,0 | sort | uniq | wc -l)
401+
CORESPERSOCKET=$(lscpu -p=cpu,socket | grep "^[0-9]\+,0" | sort | uniq | wc -l)
402402
SOCKETS=$(lscpu -p=socket | grep -e "^[0-9]" | sort | uniq | wc -l)
403403
fi
404404
N=$((${CORESPERSOCKET}*${SOCKETS}))

0 commit comments

Comments
 (0)