查看操作系统信息

cat /proc/version

在这里插入图片描述
Linux version 5.10.0-136.12.0.86.h1837.eulerosv2r12.aarch64 (abuild@szxrtosci10000) (gcc_old (GCC) 10.3.1, GNU ld (GNU Binutils) 2.37) #1 SMP Tue May 14 01:51:48 UTC 2024

  • 系统运行的是Linux内核5.10版本,并且是该版本的一个特定发行版(136.12.0.86.h1837.eulerosv2r12)。
  • aarch64表示你的系统架构是ARM 64位架构,这是ARM架构的64位版本,通常用于高性能计算和移动设备。

查看EulerOS内核版本

cat /etc/os-release

当你运行 cat /etc/os-release 命令时,它会显示 /etc/os-release 文件的内容
在这里插入图片描述

NAME="EulerOS"
VERSION="2.0 (SP10)"
ID="euleros"
VERSION_ID="2.0"
PRETTY_NAME="EulerOS 2.0 (SP10)"
ANSI_COLOR="0;31"

NAME:操作系统的名称。
VERSION:操作系统的版本号。
ID:操作系统的唯一标识符。
ID_LIKE:操作系统所属的家族或类似的操作系统。
PRETTY_NAME:操作系统的友好名称,通常用于显示。
VERSION_ID:操作系统的版本号,通常是一个数字。
HOME_URL:操作系统的官方网站 URL。
SUPPORT_URL:获取支持的 URL。
BUG_REPORT_URL:报告错误的 URL。

uname -r

用于显示当前运行的 Linux 内核版本号
在这里插入图片描述

查看root下的内容

[naie@notebook-srtpcpu2-d8d8f39b-7f48b6f495-g7p62 root]$ ls -l
total 4
-r-x------ 1 root root 125 Dec 26 2023 append_hadoop1_hosts.sh

查看/etc目录下的内容

ls -la /etc

[naie@notebook-srtpcpu2-d8d8f39b-7f48b6f495-g7p62 /]$ ls -la /etc

total 1068
drwxr-xr-x  1 root root     23 Mar 26  2024 .
drwxr-xr-x  1 root root     74 Oct 14 14:20 ..
-rw-r--r--  1 root root     12 Dec  2  2023 adjtime
-rw-r--r--  1 root root   1529 Dec  2  2023 aliases
drwxr-xr-x  2 root root    194 Dec 20  2023 alternatives
-rw-r--r--  1 root root    541 Dec  2  2023 anacrontab
drwx------  2 root root     34 Dec 20  2023 ATAE_VERSION
-rw-------  1 root root      0 Dec  5  2023 at.allow
-rw-r--r--  1 root root      1 Dec  2  2023 at.deny
drwxr-x---  4 root root     81 Dec  5  2023 audit
drwxr-xr-x  3 root root     73 Dec 20  2023 bash_completion.d
-rw-r--r--  1 root root   3066 Dec 20  2023 bashrc
-rw-r--r--  1 root root    447 Dec  2  2023 bindresvport.blacklist
drwxr-xr-x  2 root root     26 Dec 20  2023 binfmt.d
drwxr-xr-x  2 root root      6 Dec  2  2023 chkconfig.d
-rw-------  1 root root      5 Dec 20  2023 cron.allow
drwx------  2 root root     38 Dec 20  2023 cron.d
drwx------  2 root root     34 Dec 20  2023 cron.daily
drwx------  2 root root     22 Dec 20  2023 cron.hourly
drwx------  2 root root      6 Dec  2  2023 cron.monthly
-rw-------  1 root root    451 Dec  2  2023 crontab
drwx------  2 root root      6 Dec  2  2023 cron.weekly
drwxr-xr-x  6 root root     81 Dec  5  2023 crypto-policies
-rw-r--r--  1 root root   1701 Dec 20  2023 csh.cshrc
-rw-r--r--  1 root root   1126 Dec 20  2023 csh.login
drwxr-xr-x  2 root root     32 Dec 20  2023 default
drwxr-xr-x  2 root root     23 Dec  5  2023 depmod.d
drwx------  1 root root     25 Dec 27  2023 dim
-rw-r--r--  1 root root   4351 Dec  2  2023 DIR_COLORS
-rw-r--r--  1 root root   4351 Dec  2  2023 DIR_COLORS.256color
-rw-r--r--  1 root root   4351 Dec  2  2023 DIR_COLORS.lightbgcolor
drwxr-xr-x  8 root root    150 Dec  5  2023 dnf
-rw-r--r--  1 root root    685 Dec  2  2023 e2scrub.conf
-rw-r--r--  1 root root      0 Dec  2  2023 environment
-rw-r--r--  1 root root   1362 Dec  2  2023 ethertypes
-rw-r--r--  1 root root     82 Dec  5  2023 EulerLinux.conf
-rw-r--r--  1 root root     27 Dec  2  2023 euleros-release
drwx------  2 root root      6 Dec  5  2023 euleros_security
-rw-r--r--  1 root root      0 Dec  2  2023 exports
drwxr-xr-x  2 root root      6 Dec  2  2023 exports.d
-rw-r--r--  1 root root     70 Dec  2  2023 filesystems
drwxr-xr-x  3 root root     38 Dec 20  2023 fonts
-rw-r--r--  1 root root    694 Dec  2  2023 fuse.conf
drwxr-xr-x  2 root root     46 Dec  5  2023 gamin
drwxr-xr-x  2 root root     25 Dec  5  2023 gcrypt
drwxr-xr-x  2 root root      6 Dec  2  2023 gnupg
-rw-r--r--  1 root root    527 Mar  8  2024 group
-rw-r--r--  1 root root    523 Dec 26  2023 group-
drwx------  2 root root      6 Dec 20  2023 grub.d
----------  1 root root    409 Mar  8  2024 gshadow
----------  1 root root    405 Dec 26  2023 gshadow-
drwxr-xr-x  3 root root     20 Dec  5  2023 gss
drwxr-xr-x  2 root root     79 Dec 20  2023 gssproxy
-rw-r--r--  1 root root      9 Dec  2  2023 host.conf
-rw-r--r--  1 root root     44 Oct 14 14:20 hostname
-rw-r--r--  1 root root    242 Oct 14 14:20 hosts
-rw-r--r--  1 root root   5799 Dec  2  2023 idmapd.conf
drwx------  1 root root     74 Dec 27  2023 ima
lrwxrwxrwx  1 root root     11 Dec  2  2023 init.d -> rc.d/init.d
-rw-r--r--  1 root root    490 Dec  2  2023 inittab
-rw-r--r--  1 root root    943 Dec  2  2023 inputrc
drwxr-xr-x  2 root root    159 Dec 20  2023 iproute2
drwxr-xr-x  2 root root      6 Dec  2  2023 ipset
-rw-r--r--  1 root root     70 Dec  5  2023 issue
-rw-r--r--  1 root root     70 Dec  5  2023 issue.net
drwxr-xr-x  2 naie naie     35 Dec 27  2023 jupyter
drwxr-xr-x  3 root root     23 Dec  5  2023 kernel
drwxr-xr-x  2 root root      6 Dec  2  2023 keyutils
-rw-r--r--  1 root root    587 Dec  2  2023 krb5.conf
drwxr-xr-x  2 root root     29 Dec  5  2023 krb5.conf.d
-rw-r--r--  1 root root   1128 Dec  2  2023 kshrc
-rw-r--r--  1 root root  22852 Nov 19  2021 ld.so.cache
-rw-r--r--  1 root root     28 Dec  2  2023 ld.so.conf
drwxr-xr-x  2 root root    163 Dec 20  2023 ld.so.conf.d
-rw-r-----  1 root root    191 Dec  2  2023 libaudit.conf
drwxr-xr-x  2 root root     35 Dec 20  2023 libnl
drwxr-xr-x  6 root root     70 Dec  5  2023 libreport
-rw-r--r--  1 root root   2391 Dec  2  2023 libuser.conf
-rw-r--r--  1 root root     17 Dec  5  2023 locale.conf
lrwxrwxrwx  1 root root     23 Nov 19  2021 localtime -> /usr/share/zoneinfo/UTC
-rw-r--r--  1 root root   1487 Dec 20  2023 login.defs
-rw-r--r--  1 root root    434 Dec  2  2023 logrotate.conf
drwxr-xr-x  2 root root     52 Dec 20  2023 logrotate.d
-rw-r--r--  1 root root    111 Dec  2  2023 magic
-rw-r--r--  1 root root    812 Dec  2  2023 mke2fs.conf
drwxr-xr-x  2 root root      6 Dec  2  2023 modprobe.d
-rw-r--r--  1 root root     70 Dec  5  2023 motd
drwxr-xr-x  2 root root      6 Dec  2  2023 motd.d
lrwxrwxrwx  1 root root     12 Dec 20  2023 mtab -> /proc/mounts
-rw-r--r--  1 root root    767 Dec  2  2023 netconfig
-rw-r--r--  1 root root     58 Dec  2  2023 networks
-rw-r--r--  1 root root   1160 Dec  2  2023 nfs.conf
-rw-r--r--  1 root root   3606 Dec  2  2023 nfsmount.conf
-rw-r--r--  1 root root   1516 Dec  5  2023 nsswitch.conf
-rw-r--r--  1 root root   1498 Dec  2  2023 nsswitch.conf.bak
drwxr-xr-x  3 root root     36 Dec  5  2023 openldap
drwxr-xr-x  2 root root      6 Dec  2  2023 opt
-rw-r--r--  1 root root    118 Dec  2  2023 os-release
drwxr-xr-x  2 root root   4096 Dec 20  2023 pam.d
-rw-r--r--  1 root root   1118 Dec 26  2023 passwd
-rw-r--r--  1 root root   1071 Dec 26  2023 passwd-
drwxr-xr-x  3 root root     21 Dec  5  2023 pkcs11
drwxr-xr-x  7 root root     73 Dec 20  2023 pki
drwxr-xr-x  5 root root     52 Dec  5  2023 pm
drwxr-xr-x  2 root root      6 Dec  2  2023 popt.d
drwxr-xr-x  2 root root      6 Dec 20  2023 prelink.conf.d
-rw-r--r--  1 root root    233 Dec  2  2023 printcap
-rw-r--r--  1 root root   2043 Dec 20  2023 profile
drwxr-xr-x  2 root root    284 Dec  5  2023 profile.d
-rw-r--r--  1 root root   6568 Dec  2  2023 protocols
-rw-------  1 root root      0 Dec 26  2023 .pwd.lock
-rw-r--r--  1 root root    220 Dec  2  2023 quotagrpadmins
-rw-r--r--  1 root root    261 Dec  2  2023 quotatab
lrwxrwxrwx  1 root root     10 Dec  2  2023 rc0.d -> rc.d/rc0.d
lrwxrwxrwx  1 root root     10 Dec  2  2023 rc1.d -> rc.d/rc1.d
lrwxrwxrwx  1 root root     10 Dec  2  2023 rc2.d -> rc.d/rc2.d
lrwxrwxrwx  1 root root     10 Dec  2  2023 rc3.d -> rc.d/rc3.d
lrwxrwxrwx  1 root root     10 Dec  2  2023 rc4.d -> rc.d/rc4.d
lrwxrwxrwx  1 root root     10 Dec  2  2023 rc5.d -> rc.d/rc5.d
lrwxrwxrwx  1 root root     10 Dec  2  2023 rc6.d -> rc.d/rc6.d
drwxr-xr-x 10 root root    127 Dec  5  2023 rc.d
lrwxrwxrwx  1 root root     13 Dec  2  2023 rc.local -> rc.d/rc.local
-rw-r--r--  1 root root   1787 Dec  2  2023 request-key.conf
drwxr-xr-x  2 root root     30 Dec 20  2023 request-key.d
-rw-r--r--  1 root root    109 Oct 14 14:20 resolv.conf
-rw-r--r--  1 root root   1634 Dec  2  2023 rpc
drwxr-xr-x  2 root root     25 Dec  2  2023 rpm
-rw-r--r--  1 root root    458 Dec  2  2023 rsyncd.conf
drwxr-xr-x  2 root root      6 Dec  2  2023 rwtab.d
drwxr-xr-x  2 root root      6 Nov 19  2021 sasl2
-rw-r--r--  1 root root      9 Dec  5  2023 securetty
drwxr-xr-x  5 root root    281 Dec  5  2023 security
drwxr-xr-x  2 root root     27 Dec  5  2023 selinux
-rw-r--r--  1 root root  10593 Dec  2  2023 sensors3.conf
drwxr-xr-x  2 root root      6 Dec  2  2023 sensors.d
-rw-r--r--  1 root root 692252 Dec  2  2023 services
----------  1 root root    631 Dec 26  2023 shadow
----------  1 root root    604 Dec 26  2023 shadow-
-rw-r--r--  1 root root    112 Dec 20  2023 shells
drwxr-xr-x  2 root root     76 Dec 20  2023 skel
-rw-r--r--  1 root root   2030 Dec  2  2023 slsh.rc
drwxr-xr-x  2 root root     57 Dec 20  2023 ssh
drwxr-xr-x  2 root root     19 Dec  5  2023 ssl
drwxr-xr-x  2 root root      6 Dec  2  2023 statetab.d
-rw-r--r--  1 root root    118 Dec 26  2023 subgid
-rw-r--r--  1 root root     99 Dec 26  2023 subgid-
-rw-r--r--  1 root root    118 Dec 26  2023 subuid
-rw-r--r--  1 root root     99 Dec 26  2023 subuid-
-rw-r-----  1 root root   2381 Dec  2  2023 sudo.conf
-r--r-----  1 root root   4434 Mar  8  2024 sudoers
drwxr-x---  1 root root     27 Mar 26  2024 sudoers.d
drwxr-xr-x  2 root root    284 Dec 20  2023 sysconfig
-rw-r--r--  1 root root   1076 Dec  5  2023 sysctl.conf
drwxr-xr-x  2 root root     28 Dec  5  2023 sysctl.d
drwxr-xr-x  4 root root    129 Dec 20  2023 systemd
lrwxrwxrwx  1 root root     15 Dec  2  2023 system-release -> euleros-release
-rw-r--r--  1 root root     39 Dec  2  2023 system-release-cpe
drwxr-xr-x  2 root root      6 Dec  2  2023 terminfo
drwxr-xr-x  2 root root      6 Dec  2  2023 tmpfiles.d
-rw-------  1 root root    750 Dec  2  2023 trusted-key.key
drwxr-xr-x  2 root root     45 Dec  5  2023 unbound
-rw-r--r--  1 root root     17 Dec  5  2023 vconsole.conf
-rw-r-----  1 root root     19 Dec 20  2023 vimrc
-rw-r--r--  1 root root    351 Dec  2  2023 virc
-rw-r--r--  1 root root   3360 Dec  2  2023 warnquota.conf
-rw-r--r--  1 root root   4945 Dec  2  2023 wgetrc
drwxr-xr-x  6 root root     70 Dec  5  2023 X11
-rw-r--r--  1 root root    643 Dec  2  2023 xattr.conf
drwxr-xr-x  4 root root     38 Dec  5  2023 xdg
drwxr-xr-x  2 root root     57 Dec  5  2023 yum
lrwxrwxrwx  1 root root     12 Dec  2  2023 yum.conf -> dnf/dnf.conf
drwxr-xr-x  2 root root      6 Dec 20  2023 yum.repos.d

sh: yum: command not found

1.echo $PATH 命令来检查当前的路径

/opt/manager_client/HDFS/hadoop/bin:/usr/local/Ascend/nnae/latest/bin:/usr/local/Ascend/nnae/latest/compiler/ccec_compiler/bin:/usr/bin:/usr/local/Ascend/nnae/latest/bin:/usr/local/Ascend/nnae/latest/compiler/ccec_compiler/bin:/usr/local/Ascend/nnae/latest/fwkacllib/ccec_compiler/bin:/usr/local/Ascend/nnae/latest/fwkacllib/bin:/opt/Ascend/ascend-toolkit/24.2.RC201/fwkacllib/ccec_compiler/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/naie/jre/bin:/usr1/python/python/target/checkout/package/python/python-24.10.217/bin:/home/naie/.local/bin

在这里插入图片描述

ValueError: zero-size array to reduction operation minimum which has no identity

在这里插入图片描述

在这里插入图片描述

AttributeError: ‘torch_npu._C._NPUDeviceProperties’ object has no attribute ‘multi_processor_count’

原因:torch_npu当前不支持DataParallel(DP)并行模式
解决办法:如果是运行单卡模式,在训练脚本中加入export ASCEND_RT_VISIBLE_DEVICES=0(指定 0 号卡对当前进程可见)。多卡环境模式需要运行DDP并行模式。

查看CANN版本号

cd /usr/local/Ascend/ascend-toolkit/

drwxr-xr-x 4 root root 66 Oct 18 11:18 .
drwxr-xr-x 1 root root 58 Oct 18 11:11 …
lrwxrwxrwx 1 root root 11 Oct 18 11:15 8.0 -> ./8.0.RC2.2
drwxr-xr-x 17 root root 4096 Oct 18 11:18 8.0.RC2.2
drwxr-xr-x 6 root root 4096 Oct 18 11:18 latest
-r-xr-xr-x 1 root root 907 Oct 18 11:15 set_env.sh

cd latest

drwxr-xr-x 6 root root 4096 Oct 18 11:18 .
drwxr-xr-x 4 root root 66 Oct 18 11:18 …
dr-xr-xr-x 14 root root 263 Oct 18 11:15 aarch64-linux
lrwxrwxrwx 1 root root 20 Oct 18 11:12 acllib -> …/8.0.RC2.2/runtime
lrwxrwxrwx 1 root root 13 Oct 18 11:15 arm64-linux -> aarch64-linux
lrwxrwxrwx 1 root root 16 Oct 18 11:12 atc -> …/8.0.RC2.2/atc
lrwxrwxrwx 1 root root 17 Oct 18 11:18 bin -> aarch64-linux/bin
lrwxrwxrwx 1 root root 21 Oct 18 11:12 compiler -> …/8.0.RC2.2/compiler
lrwxrwxrwx 1 root root 18 Oct 18 11:18 conf -> aarch64-linux/conf
lrwxrwxrwx 1 root root 22 Oct 18 11:12 fwkacllib -> …/8.0.RC2.2/fwkacllib
lrwxrwxrwx 1 root root 17 Oct 18 11:12 hccl -> …/8.0.RC2.2/hccl
lrwxrwxrwx 1 root root 21 Oct 18 11:18 include -> aarch64-linux/include
lrwxrwxrwx 1 root root 19 Oct 18 11:18 lib64 -> aarch64-linux/lib64
lrwxrwxrwx 1 root root 31 Oct 18 11:15 mindstudio-toolkit -> …/8.0.RC2.2/mindstudio-toolkit
lrwxrwxrwx 1 root root 16 Oct 18 11:13 opp -> …/8.0.RC2.2/opp
lrwxrwxrwx 1 root root 23 Oct 18 11:18 opp_kernel -> …/8.0.RC2.2/opp_kernel
lrwxrwxrwx 1 root root 16 Oct 18 11:13 ops -> …/8.0.RC2.2/opp
-rw-rw-r-- 1 root root 16 Oct 18 11:15 platform.ini
lrwxrwxrwx 1 root root 18 Oct 18 11:15 pyACL -> …/8.0.RC2.2/pyACL
drwxr-xr-x 3 root root 27 Oct 18 11:12 python
-r-xr-x— 1 root root 31988 Oct 18 11:18 remove_latest_softlink.sh
lrwxrwxrwx 1 root root 20 Oct 18 11:12 runtime -> …/8.0.RC2.2/runtime
lrwxrwxrwx 1 root root 25 Oct 18 11:15 test-ops -> …/8.0.RC2.2/opp/test-ops
lrwxrwxrwx 1 root root 20 Oct 18 11:15 toolkit -> …/8.0.RC2.2/toolkit
drwxr-xr-x 2 root root 4096 Oct 18 11:15 tools
drwxr-xr-x 3 root root 59 Oct 18 11:18 var
-rw-r----- 1 root root 1150 Oct 18 11:18 version.cfg

cd aarch64-linux
cat ascend_toolkit_install.info

package_name=Ascend-cann-toolkit
version=8.0.RC2.2
innerversion=V100R001C18SPC002B221
compatible_version=[V100R001C15,V100R001C18],[V100R001C30],[V100R001C13],[V100R003C11],[V100R001C29],[V100R001C10]
arch=aarch64
os=linux
path=/usr/local/Ascend/ascend-toolkit/8.0.RC2.2/aarch64-linux

Logo

昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链

更多推荐