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.
我试过, 主要是 dmidecode这个指令没有,所以不支持,如果在docker里面加进去就可以了。
There was a problem hiding this comment.
可以新开一个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 |
|
|
||
| # dump all details for fully check | ||
| lscpu > lscpu.dump | ||
| dmidecode > dmidecode.dump |
There was a problem hiding this comment.
可以在脚本后面列一下正确的输出么?
包括 #6291 (comment) 和 #6291 (comment)
There was a problem hiding this comment.
没有完全正确的输出,因为不同平台需要的结果可能不一样。
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`" |
tensor-tang
left a comment
There was a problem hiding this comment.
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.
我试过, 主要是 dmidecode这个指令没有,所以不支持,如果在docker里面加进去就可以了。
|
|
||
| # dump all details for fully check | ||
| lscpu > lscpu.dump | ||
| dmidecode > dmidecode.dump |
There was a problem hiding this comment.
没有完全正确的输出,因为不同平台需要的结果可能不一样。
|
dump.zip |
|
Thx。另外
这句话应该是应为版本不够,我的版本是 |
没有avx2的那台机器,系统权限不够,dump出来的也是空的。 lscpu的版本可能不一样,所以没有cpu的name 我可加个判断,bypass这种情况。 |
|
打印结果如下:因为没有装cmake,所以命令找不到,这里需要判断下么? |
|
Thanks for catching this, it's done. |
fix #5960
The result would be shown like this: