-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add script to check the cpu env #6291
Conversation
1d18f0e
to
e670453
Compare
Added DIMMs Locator info。 The result :
|
我在两台服务器(没有avx2和有avx2上)分别跑了脚本,结果如下,看起来有些命令格式不兼容
|
|
||
if [ "`uname -s`" != "Linux" ]; then | ||
echo "Current scenario only support in Linux yet!" | ||
exit 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mac上的docker环境也不适用?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我试过, 主要是 dmidecode
这个指令没有,所以不支持,如果在docker里面加进去就可以了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以新开一个issue,在docker环境下加入dmidecode指令?
paddle/scripts/check_env.sh
Outdated
num_dimms_installed=0 | ||
for dimm_id in `dmidecode |grep Locator|sort -u | awk -F ':' '{print $2}'`; do | ||
num_refered=`dmidecode |grep -c "$dimm_id"` | ||
# the acutal dimm id should be refered only once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acutal笔误:Actual
|
||
# dump all details for fully check | ||
lscpu > lscpu.dump | ||
dmidecode > dmidecode.dump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以在脚本后面列一下正确的输出么?
包括 #6291 (comment) 和 #6291 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有完全正确的输出,因为不同平台需要的结果可能不一样。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不需要正确的输出,只是给一个输出的例子。
paddle/scripts/check_env.sh
Outdated
physical_cores=$((sockets * cores_per_socket)) | ||
virtual_cores=`grep 'processor' /proc/cpuinfo | sort -u | wc -l` | ||
numa_nodes=`lscpu |grep "NUMA node(s)"|awk -F':' '{print $2}'|xargs` | ||
echo "CPU Name : `lscpu |grep \"name\" |awk -F':' '{print $2}'|xargs`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CPU Name,我试了两台机器,打出来都是空?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx, 可以分别传下没有avx2和有avx2的机器,最后dump出来的两个文件吗。我估计是跟系统版本有关。
|
||
if [ "`uname -s`" != "Linux" ]; then | ||
echo "Current scenario only support in Linux yet!" | ||
exit 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我试过, 主要是 dmidecode
这个指令没有,所以不支持,如果在docker里面加进去就可以了。
|
||
# dump all details for fully check | ||
lscpu > lscpu.dump | ||
dmidecode > dmidecode.dump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有完全正确的输出,因为不同平台需要的结果可能不一样。
dump.zip |
Thx。另外
这句话应该是应为版本不够,我的版本是 |
没有avx2的那台机器,系统权限不够,dump出来的也是空的。 lscpu的版本可能不一样,所以没有cpu的name 我可加个判断,bypass这种情况。 |
打印结果如下:因为没有装cmake,所以命令找不到,这里需要判断下么?
|
Thanks for catching this, it's done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fix #5960
The result would be shown like this: