We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 126b4fe commit 5d6e2b7Copy full SHA for 5d6e2b7
Utilities/Tools/jobutils2.sh
@@ -396,8 +396,8 @@ getNumberOfPhysicalCPUCores() {
396
else
397
# Do something under GNU/Linux platform
398
#
399
- # Notice the human readable output of lscpu depends on the version and wether or not you
400
- # are inside a container. The following should be more stable.
+# Gets the cores per socket by counting unique cores on socket 0.
+# Gets sockets by counting unique socket ids. The grepping is done in any case to avoid matching comments.
401
CORESPERSOCKET=$(lscpu -p=cpu,socket | grep "^[0-9]\+,0" | sort | uniq | wc -l)
402
SOCKETS=$(lscpu -p=socket | grep -e "^[0-9]" | sort | uniq | wc -l)
403
fi
0 commit comments